/mobile_base_controller/cmd_vel#

Caution

This documentation page has been auto-generated.

It may be missing some details.

/mobile_base_controller/cmd_vel Quick Facts

Category

Robot hardware

Message type

geometry_msgs/Twist

Direction

⬅️ you normally publish to this topic.

Set the desired linear and angular velocity of the robot (in meters per second).

Quick snippets#

Publish data on the topic#
$ rostopic pub /mobile_base_controller/cmd_vel geometry_msgs/Twist # press Tab twice to complete

How to use in your code#

Publish to the topic using Python#
 1import rospy
 2from geometry_msgs.msg import Twist
 3
 4if __name__ == "__main__":
 5    rospy.init_node("publisher")
 6
 7    pub = rospy.Publisher("/mobile_base_controller/cmd_vel", Twist, queue_size=10)
 8    rate = rospy.Rate(10) # 10Hz
 9    msg = Twist()
10
11    while not rospy.is_shutdown():
12
13        # check http://docs.ros.org/en/api/geometry_msgs/html/msg/Twist.html
14        # for the msg structure
15        # msg.data = ...
16        pub.publish(msg)
17
18        rate.sleep()