ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Why no cmd_vel topic during ROS + Gazebo Turtlebot Simulation?

asked 2019-01-10 11:16:33 -0500

scottr gravatar image

I have been having a very difficult time trying to understand why my system does not have the cmd_vel topic. I am trying to get a ROS system running with Gazebo so that I can work through tutorials and learn ROS. I started with the ROS Development Studio (online) and it was great! But sooner or later one must be able to get ROS going on a local system. So I built a Ubuntu system and installed ROS + Gazebo, then installed Turtlebot including the simulator. It all works! I can launch a Turtlebot simulation then launch the Turtlebot_teleop package and I am able to move the robot around. But when I list the running topics cmd_vel is not one of them. These are the list of topics grep'd on "cmd":

scott@Ubvm:~/catkin_ws/devel$ rostopic list | grep cmd
/cmd_vel_mux/active
/cmd_vel_mux/input/navi
/cmd_vel_mux/input/safety_controller
/cmd_vel_mux/input/switch
/cmd_vel_mux/input/teleop
/cmd_vel_mux/parameter_descriptions
/cmd_vel_mux/parameter_updates

No /cmd_vel ! So I can't work through tutorials to drive the robot around. Besides, I just don't understand why it is not there but teleop works.

Could someone tell me why I do not see the cmd_vel topic?

System info:

Ubuntu 16.04

ROS Kinetic

Gazebo 7 (not sure exactly which version but it launches and runs)

Installed Turtlebot based on Indigo install but replaced with kinetic.

sudo apt-get install 
ros-kinetic-turtlebot 
ros-kinetic-turtlebot-apps 
ros-kinetic-turtlebot-interactions 
ros-kinetic-turtlebot-simulator 
ros-kinetic-kobuki-ftdi 
ros-kinetic-rocon-remocon 
ros-kinetic-rocon-qt-library 
ros-kinetic-ar-track-alvar-msgs
edit retag flag offensive close merge delete

Comments

I had the same issue and found a video - https://youtu.be/2WBDRbYmE7A

This video made sense.

Hope this helps

pranali gravatar image pranali  ( 2021-01-18 12:22:03 -0500 )edit

1 Answer

Sort by » oldest newest most voted
3

answered 2019-01-10 13:25:53 -0500

jayess gravatar image

updated 2019-01-10 13:33:39 -0500

You need to use the /cmd_vel_mux/input/navi topic. If you do

rostopic info /cmd_vel_mux/input/navi

you should see that its message type is of a geometry_msgs/Twist message. If you look at this file (line 40) from the Going Forward and Avoiding Obstacles with Code tutorial from the turtlebot tutorials, you'll see that the /cmd_vel_mux/input/navi topic is used.

edit flag offensive delete link more

Comments

A mux is being used here which is why you're not seeing a /cmd_vel topic exactly.

jayess gravatar image jayess  ( 2019-01-10 13:35:05 -0500 )edit
1

Note that using the /cmd_vel topic to carry commands is a ROS convention and is not enforced which is another reason why you may find other topics being used to carry commands.

jayess gravatar image jayess  ( 2019-01-10 13:36:05 -0500 )edit

The revelation that cmd_vel is only a convention helped immensely. The strange thing on my system is that writing to cmd_vel_mux/input/navi does nothing. I have to write to cmd_vel_mux/input/teleop to make the robot go. That topic is there whether the teleop node is running or not.

scottr gravatar image scottr  ( 2019-01-25 11:46:53 -0500 )edit

Maybe it is because it is only a Gazebo simulation. I’m just happy to be able to control the robot and move on. :)

scottr gravatar image scottr  ( 2019-01-25 11:47:37 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-01-10 11:16:33 -0500

Seen: 2,121 times

Last updated: Jan 10 '19