Setting different motor speeds


How to set different motor speed with respect to each other?
Eg. One motor running at 0.5 times the speed of the normal (other motor) speed.


You need to publish a cmd_vel message with the motor velocities that you want.

To understand topics look at this:

To understand more about the cmd_vel message specifically there are lots of references - here is a popular one:

You can do this from the command line using:

rostopic pub

Something like

rostopic pub /cmd_vel geometry_msgs/Twist “linear:
x: 0.5
y: 0.0
z: 0.0
x: 0.0
y: 0.0
z: 0.0” -r 10

in the alternative

rostopic pub -1 /cmd_vel geometry_msgs/Twist – ‘[2.0, 0.0, 0.0]’ ‘[0.0, 0.0, 1.8]’

Although check the proper topic name (it could be magni_robot/cmd_vel) or something similar. You can look at the list of topics by typing

rostopic list