This package contains package in a Dockerfile and devcontainer to build out the messages to link that ROS1 messages of the GPS to ROS2. This package was build using information from:
There are several components to making the BRIDGE work:
- a ROS1 message
- a matching ROS2 message
- a yaml malling file (see bridge_mapping_rules.yaml)
- building the bridge from source
All of these are needed to make the bridges work.
The order of building is VERY important. If the packags are built out of order then it will not work. The packages MUST be built in the following order, if the packags are built out of order then the messages will not be passed from ROS1 to ROS2.
In TERMINAL 1
cd catkine_ws
source /opt/ros/noetic/setup.bash
catkin_make_isolated --install
In TERMINAL 2
cd ros2ws
source /opt/ros/foxy/setup.bash
colcon build --symlink-install --packages-skip ros1_bridge
source install/setup.bash
ros2 interface list
ENSURE THAT YOU CAN SEE
gps_reader2/msg/LoggerBox
In TERMINAL 3
cd ros2ws
source /opt/ros/noetic/setup.bash
source /opt/ros/foxy/setup.bash
source ../catkin_ws/devel/setup.bash
source install/setup.bash
ros2 interface list
ENSURE THAT YOU CAN SEE
gps_reader2/msg/LoggerBox
colcon build --symlink-install --packages-select ros1_bridge --cmake-force-configure
ros2 run ros1_bridge dynamic_bridge --print-pairs | grep gps
ENSURE THAT YOU CAN SEE
- 'gps_reader2/msg/LoggerBox' (ROS 2) <=> 'gps_reader/LoggerBox' (ROS 1)
If you are are here then everything is good, at least the files are build correctly.
Additionaly, You will need to have a ROS2 node subscribed to any topics that you are bridging. so if you have a ROS1 node called GPS1/gps
then you MUST have a ROS2 node that subscribs to GPS1/gps