What is the name of the velocity topic for ROS2 Basics in 5 days? I ran the command ‘ros2 topic list’ but could not find the cmd_vel topic.
How do I publish to the velocity topic of the robot? I am unable to find the cmd_vel topic in the rosject Section 1, 1.1 Wall following behaviour.
Hi, welcome to the community!
The topic is called /cmd_vel
. Have you launched the simulation and the ros1_bridge
as specified in the instructions?
Hi!
Yes, I have launched the simulation and the ros1_bridge as specified in the instructions. I could see the /scan topic for LaserScan but not the /cmd_vel topic when I ran the command ros2 topic list.
How do I solve this problem?
Thank you
That’s because you haven’t established the connection for that topic since nothing is being published.
Try publishing from ROS2:
ros2 topic pub --rate 10 /cmd_vel geometry_msgs/msg/Twist \"{linear: {x: 0.0, y: 0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.2}}\"
It’s working now, I’m so new to this. Thanks so much for your help.
1 Like
This topic was automatically closed after 22 hours. New replies are no longer allowed.