I have converted a grid_map_msgs type message from ros1 to ros2. I have a ros1 version for noetic and ros2 version for foxy. I have installed ros-noetic-grid-map-msgs from binaries in ros1 and built grid-map-msgs foxy devel in ros2 from the source. Now I can convert the message to 90% using ros1_bridge and I can see the message is able to publish the grid_map_msgs in ros2 but for some reason, the header and frame id seems to be publishing null value in ros2 side. Other data are correct.
# Grid map header
GridMapInfo info
# Grid map layer names.
string[] layers
# Grid map basic layer names (optional). The basic layers
# determine which layers from `layers` need to be valid
# in order for a cell of the grid map to be valid.
string[] basic_layers
# Grid map data.
std_msgs/Float32MultiArray[] data
# Row start index (default 0).
uint16 outer_start_index
# Column start index (default 0).
uint16 inner_start_index
grid_map_info looks following:
# Header (time and frame)
Header header
# Resolution of the grid [m/cell].
float64 resolution
# Length in x-direction [m].
float64 length_x
# Length in y-direction [m].
float64 length_y
# Pose of the grid map center in the frame defined in `header` [m].
geometry_msgs/Pose pose
For ros2 side,
grid_map_msgs looks following:
# Header (time and frame)
std_msgs/Header header
# Grid map header
GridMapInfo info
# Grid map layer names.
string[] layers
# Grid map basic layer names (optional). The basic layers
# determine which layers from `layers` need to be valid
# in order for a cell of the grid map to be valid.
string[] basic_layers
# Grid map data.
std_msgs/Float32MultiArray[] data
# Row start index (default 0).
uint16 outer_start_index
# Column start index (default 0).
uint16 inner_start_index
grid_map_info_msgs looks the following:
# Resolution of the grid [m/cell].
float64 resolution
# Length in x-direction [m].
float64 length_x
# Length in y-direction [m].
float64 length_y
# Pose of the grid map center in the frame defined in `header` [m].
geometry_msgs/Pose pose
As you can clearly see, in ros2 side the header and frame id has been swapped from grid_map_info to grid_map_msgs. In ros1 side, the header and frame id was inside grid_map_info and grid_map_info was called inside grid_map_msgs.
Expected behavior
The grid_map_msgs ros2 package should map the frame id and header from the grid_map_info_msgs in ros1 package.
During mapping, the way it should map:
grid_map_msgs.msgs.GridMap.header (ros2) = grid_map_msgs.GridMapInfo.header (ros1)
grid_map_msgs.msgs.GridMap.frame_id (ros2) = grid_map_msgs.GridMapInfo.frame_id (ros1)
Actual behavior
The grid_map_msgs ros2 package is mapping the frame id and header from the grid_map_msgs in ros1 package right now.
grid_map_msgs.msgs.GridMap.header (ros2) = grid_map_msgs.GridMap.header (ros1, which is null)
grid_map_msgs.msgs.GridMap.frame_id (ros2) = grid_map_msgs.GridMap.frame_id (ros1, which is null)
The Problem showing right now
[INFO] [1670545266.987060675] [rviz]: Message Filter dropping message: frame '' at time 0.000 for reason 'EmptyFrameID'
My question is, how can I manually edit the conversion file (inside build/install of bridge workspace) so that I can map that specific element (header and frameid) inside grid_map_msgs manually before or after the build?
Bug report
Required Info:
Steps to reproduce issue
I have converted a grid_map_msgs type message from ros1 to ros2. I have a ros1 version for noetic and ros2 version for foxy. I have installed ros-noetic-grid-map-msgs from binaries in ros1 and built grid-map-msgs foxy devel in ros2 from the source. Now I can convert the message to 90% using ros1_bridge and I can see the message is able to publish the grid_map_msgs in ros2 but for some reason, the header and frame id seems to be publishing null value in ros2 side. Other data are correct.
ROS2 repo: https://github.com/ANYbotics/grid_map/tree/foxy-devel/grid_map_msgs/msg ROS1 repo: https://github.com/ANYbotics/grid_map/tree/master/grid_map_msgs/msg
For ros1 side, grid_map_msgs looks following:
grid_map_info looks following:
For ros2 side, grid_map_msgs looks following:
grid_map_info_msgs looks the following:
As you can clearly see, in ros2 side the header and frame id has been swapped from grid_map_info to grid_map_msgs. In ros1 side, the header and frame id was inside grid_map_info and grid_map_info was called inside grid_map_msgs.
Expected behavior
The grid_map_msgs ros2 package should map the frame id and header from the grid_map_info_msgs in ros1 package. During mapping, the way it should map: grid_map_msgs.msgs.GridMap.header (ros2) = grid_map_msgs.GridMapInfo.header (ros1) grid_map_msgs.msgs.GridMap.frame_id (ros2) = grid_map_msgs.GridMapInfo.frame_id (ros1)
Actual behavior
The grid_map_msgs ros2 package is mapping the frame id and header from the grid_map_msgs in ros1 package right now. grid_map_msgs.msgs.GridMap.header (ros2) = grid_map_msgs.GridMap.header (ros1, which is null) grid_map_msgs.msgs.GridMap.frame_id (ros2) = grid_map_msgs.GridMap.frame_id (ros1, which is null)
The Problem showing right now
My question is, how can I manually edit the conversion file (inside build/install of bridge workspace) so that I can map that specific element (header and frameid) inside grid_map_msgs manually before or after the build?