Vishwad
Vishwad

Reputation: 231

How to publish Twist messages cmd_vel to turtlebot on ROS?

this question mainly comes due to my lack of understanding of the ROS and inability to find exactly the topic.

For turtlesim, the topic is turtle1/cmd_vel to publish command velocity messages to
For turtlebot3, what is the topic to publish cmd_vel messages to?

I have done something like this for turtlesim

command_topic_velocity = '/turtle1/cmd_vel'
publisher_velocity = rospy.Publisher(command_topic_velocity, Twist, queue_size=10)

what would command_topic_velocity be for Turtlebot3 on ROS melodic?

Upvotes: 0

Views: 5952

Answers (1)

erfan karimian
erfan karimian

Reputation: 29

you shoud use cmd_vel

 pub = rospy.Publisher('cmd_vel', Twist, queue_size=10)

https://github.com/ROBOTIS-GIT/turtlebot3/blob/master/turtlebot3_teleop/nodes/turtlebot3_teleop_key

and you can use rostopic nameoftopic show

Upvotes: 0

Related Questions