rosbag_editor icon indicating copy to clipboard operation
rosbag_editor copied to clipboard

Feature request: rename frame_id

Open ulterzlw opened this issue 1 year ago • 0 comments

Description

Add a new column beside rename topic to rename frame_id.

Use Case

Due to the incorrect configuration at the upstream or two messages with the same frame_id having a conflict, we can rename the frame_id after the rosbag recording.

Proposed Implementation

I can easily rename the frame_id by instantiating the message according to its datatype, say sensor_msgs/PointCloud2, and then writing back to the bag after changing the frame_id.

rosbag::MessageInstance::instantiate<tf2_msgs::TFMessage>()

Such implementation, however, needs to check the datatype and use a switch-case flow structure. Is there a way to rename the frame_id without considering the specific datatype of the message?

ulterzlw avatar Mar 25 '23 06:03 ulterzlw