Trouble Getting Started ROS2 Basics in 5 Days Rosject

Just going through the first few steps of the project Getting Started ROS2 Basics in 5 Days.

Right before I start the ROS program there are several commands to start the bridge in the terminal.

source ~/.bashrc_bridge
source /opt/ros/noetic/setup.bash
source /opt/ros/foxy/setup.bash

ros2 run ros1_bridge dynamic_bridge

bridge seems to start up alright, however there were some warnings about switching from noetic to foxy.

when I do a simple check to see what topics I am working with

user:~$ ros2 topic list
/parameter_events/rosout
user:~$ ros2 topic list
/parameter_events
/rosout

So I am not sure if the bridge is working properly

when I re-source ROS1 and list topics i get this
user:~$ source /opt/ros/noetic/setup.bash
ROS_DISTRO was set to ‘foxy’ before. Please make sure that the environment doesnot mix paths from different distributions.
user:~$ rostopic list
/clock
/cmd_vel
/cv_camera/camera_info
/cv_camera/image_raw
/cv_camera/image_raw/compressed
/cv_camera/image_raw/compressed/parameter_descriptions
/cv_camera/image_raw/compressed/parameter_updates
/cv_camera/image_raw/compressedDepth
/cv_camera/image_raw/compressedDepth/parameter_descriptions
/cv_camera/image_raw/compressedDepth/parameter_updates
/cv_camera/image_raw/theora
/cv_camera/image_raw/theora/parameter_descriptions
/cv_camera/image_raw/theora/parameter_updates
/cv_camera/parameter_descriptions
/cv_camera/parameter_updates
/gazebo/link_states
/gazebo/model_states
/gazebo/parameter_descriptions
/gazebo/parameter_updates
/gazebo/performance_metrics
/gazebo/set_link_state
/gazebo/set_model_state
/imu
/joint_states
/odom
/overlord/camera/camera_info
/overlord/camera/image_raw
/overlord/camera/image_raw/compressed
/overlord/camera/image_raw/compressed/parameter_descriptions
/overlord/camera/image_raw/compressed/parameter_updates
/overlord/camera/image_raw/compressedDepth
/overlord/camera/image_raw/compressedDepth/parameter_descriptions
/overlord/camera/image_raw/compressedDepth/parameter_updates
/overlord/camera/image_raw/theora
/overlord/camera/image_raw/theora/parameter_descriptions
/overlord/camera/image_raw/theora/parameter_updates
/overlord/camera/parameter_descriptions
/overlord/camera/parameter_updates
/rosout
/rosout_agg
/scan
/tf
/tf_static

which is what I would expect to see with ROS2, not ROS1.

Should I just continue on with the program?
Everything was taught with ROS2 before this project

Hi @Eldgar ,

Welcome to this Community!

Your ROS Bridge is working fine. If you can see all the topic enlisted when you do ros2 topic list after you start the bridge, then everything is fine. However, before starting the bridge, only minimal topics would be visible like /parameter_events and /rosout.

You will get the below message when you switch from ROS2 (foxy) to ROS1 (noetic).

ROS_DISTRO was set to ‘foxy’ before. Please make sure that the environment
does not mix paths from different distributions.

And, you will get the below message when you switch from ROS1 (noetic) to ROS2 (foxy).

ROS_DISTRO was set to ‘noetic’ before. Please make sure that the environment
does not mix paths from different distributions.

The above two messages are normal and just indicates what version of ROS the current terminal/shell is working with.
To work with ROS2, you need to source ROS1 first and then source ROS2.
Similarly for ROS1, you would directly source ROS1 (if ROS2 is present and/or already sourced).

Yes, you can continue with your program. You have nothing to worry about. You will understand about these messages as you progress through your work.

I hope this solves your issue. Let me know if you still have any questions.
Make sure to check for any previously answered similar questions in this forum.

Regards,
Girish

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.