I am working on the real robot project for the ROS2 Basics in 5 Days (C++) course. In the rosject, I have created my wall following and it works well in simulation, so I tried to test on the real robot. However, as shown below, I was not able to use the robot using my code and the instructions provided in the course project notebook.
Test 1:
- Upon launching the real robot simulation, I opened a new terminal, and ran the following in the terminal to use ros1_bridge:
source ~/catkin_ws/devel/setup.bash
roslaunch load_params load_params.launch
source /opt/ros/foxy/setup.bash
ros2 run ros1_bridge parameter_bridge
- However, after running the last line, I get these errors:
[ERROR] [1700329495.689358465]: [registerPublisher] Failed to contact master at [10.8.0.1:11311]. Retrying...
[ INFO] [1700329510.931532520]: Connected to master at [10.8.0.1:11311]
The parameter 'topics' either doesn't exist or isn't an array
The parameter 'services_1_to_2' either doesn't exist or isn't an array
The parameter 'services_2_to_1' either doesn't exist or isn't an array
- I then run my wall following node in a new terminal, but nothing happens. Also at this point, the joystick in the video feed of the real robot stops working and the robot cannot be controlled.
Test 2: (in a new instance of the real robot sim)
- Launch my wall following node first (maybe it needs to be publishing first for ros1_bridge to pick up the topics? Note sure)…
- Then run the same lines in terminal again, to try to start ros1_bridge.
- Get the same erorrs as above.
Please let me know how I can properly use ros1_bridge with my ros2 code. More detailed instructions and explanations would be appreciated.