px4_ros_com icon indicating copy to clipboard operation
px4_ros_com copied to clipboard

micro_ros_agent px4 topics are not visible

Open maltinho8 opened this issue 2 years ago • 2 comments

I want to list all the published topics with the command "ros2 topic list" - but only 2 (default) topics are showing up:

topics

Connection is also there:

connection

I already tried to clean all the builds, got the newest version of the repository, etc. Also did the ros2 daemon stop/start - no success.

Any tips for this problem?

maltinho8 avatar Nov 01 '22 22:11 maltinho8

Are you able to check if it works with the ROS_DOMAIN_ID environment variable set to 0 consistently across your environment?

JohnTGZ avatar Nov 08 '22 16:11 JohnTGZ

I also had this issue and the fix was as @JohnTGZ suggested: Ensure you issue a export ROS_DOMAIN_ID=0 in all terminal windows:

  • The terminal window where you launch Gazebo
  • The terminal window where you run the micro_ros_agent
  • The terminal where you run the ros2 topic list command
  • ....any other windows running ROS2 nodes)

I'm also passing the ROS_DOMAIN_ID to the micro_ros_agent:

ros2 run micro_ros_agent micro_ros_agent udp4 --port 8888 ROS_DOMAIN_ID=0

stevehenderson avatar Dec 03 '22 20:12 stevehenderson