ros_gz
ros_gz copied to clipboard
Add custom GZ -> ROS mapping (Humble/Garden)
Hi all,
I need to use Gazebo Garden alongside ROS 2 Humble . I want to use the ros_gz_bridge to obtain measurements from virtual sensors on my robot and process them in ROS.
In my ros_gz version (this one ) there is no mapping between gz.msgs.NavSat
and gps_msgs/msg/GPSFix
.
I need this mapping because I want to transport also the ENU velocity in ROS, which is not possible using sensor_msgs/msg/NavSatFix
Desired behavior
A map betweem gz.msgs.NavSat
and gps_msgs/msg/GPSFix
in ros_gz_bridge (ros-humble-ros-gzgarden).
Alternatives considered
I've cloned the "humble" branch (which should correspond to my installed version of ros_gz_bridge) and:
- I've included
gps_msgs.hpp
inros_gz/ ros_gz_bridge/include/ros_gz_bridge/convert
- Added
#include <ros_gz_bridge/convert/gps_msgs.hpp>
toconvert.hpp
- Added
gps_msgs.cpp
inros_gz/ros_gz_bridge/src/convert
- Added inside
ros_gz/ros_gz_bridge/mappings.py
:
'gps_msgs': [
Mapping('GPSFix', 'NavSat'),
],
- Added
gps_msgs package.xml
I am unsure if this will work because I've installed gps_msgs as a custom interface inside my custom interfaces package and I also need to ffigure out how to install this "new package" I've created. Am I missing anything?
Additional context:
OS: Ubuntu 22.04.