facontidavide / rosbag_editor

Create a rosbag from a given one, using a simple GUI
413 stars 82 forks source link

Feature request: rename frame_id #18

Open ulterzlw opened 1 year ago

ulterzlw commented 1 year ago

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?