ROS2 Topics part2 : Exercice 2.4

Hi,

In exercice they say :

The odometry of the robot is published by the robot into the /odom topic.
and :
Remember that in order to be able to read the odometry data from the /odom topic of the simulation, you will need to first launch a ROS1 Bridge.

So I run the bridge :
user:~$ ros2 run ros1_bridge dynamic_bridge
Created 2 to 1 bridge for service /camera/set_camera_info
Created 2 to 1 bridge for service /gazebo/clear_body_wrenches
Created 2 to 1 bridge for service /gazebo/clear_joint_forces
Created 2 to 1 bridge for service /gazebo/delete_light
Created 2 to 1 bridge for service /gazebo/delete_model
Created 2 to 1 bridge for service /gazebo/get_joint_properties
Created 2 to 1 bridge for service /gazebo/get_light_properties
Created 2 to 1 bridge for service /gazebo/get_link_properties
Created 2 to 1 bridge for service /gazebo/get_link_state
Created 2 to 1 bridge for service /gazebo/get_model_properties
Created 2 to 1 bridge for service /gazebo/get_model_state
Created 2 to 1 bridge for service /gazebo/get_physics_properties
Created 2 to 1 bridge for service /gazebo/get_world_properties
Created 2 to 1 bridge for service /gazebo/pause_physics
Created 2 to 1 bridge for service /gazebo/reset_simulation
Created 2 to 1 bridge for service /gazebo/reset_world
Created 2 to 1 bridge for service /gazebo/set_joint_properties
Created 2 to 1 bridge for service /gazebo/set_light_properties
Created 2 to 1 bridge for service /gazebo/set_link_properties
Created 2 to 1 bridge for service /gazebo/set_link_state
Created 2 to 1 bridge for service /gazebo/set_model_configuration
Created 2 to 1 bridge for service /gazebo/set_model_state
Created 2 to 1 bridge for service /gazebo/set_physics_properties
Created 2 to 1 bridge for service /gazebo/spawn_sdf_model
Created 2 to 1 bridge for service /gazebo/spawn_urdf_model
Created 2 to 1 bridge for service /gazebo/unpause_physics
created 2to1 bridge for topic ‘/rosout’ with ROS 2 type ‘rcl_interfaces/msg/Log’ and ROS 1 type ‘rosgraph_msgs/Log’

But when I run :
$ ros2 topic echo /odom
Could not determine the type for the passed topic

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

I can’t find the “odom” topic. What am I doing wrong ?

Regards.

Hi @akrbdx,

I apologize for this error - it seems that something is not working right. Please let’s look into it and get back to you ASAP.

Hi,

I had the same problem, when I tried to read the odom inside the command line, it was not working (even with the bridge launch). You need to write your subscriber to the topic and launch it to initialize the data inside the ros bridge (I think this is it, because if I stop my subscriber, I can’t access to the odom topic after that).

2 Likes