Thanks in advance for you help guys.
I've been fiddling with ROS for quite a few months now and I have a good basic understanding of how to advertise and subscribe to nodes, I even built a speech action!
I am, however, very confused on how to translate Twist messages into movement on an actual robot. In the Sim, robots just magically move :)
My plan is to use an arduino to send signals to a Sabertooth 2x25 which has the ability to accept analog linear (0V-5V), Servo signal (1000us-2000us), Simplified Serial (1-255 and some combination controls both motors) and Serial at 38400 baud - which i completely don't understand...
My understanding is the Twist msg contains linear and angular values for all 3 axis and in order to use these some trig. calculations - in some relation to the wheel base width - will allow the robot move using the left and right motors independently. I dont understand the math here...
I currently have a sketch that takes the "cmd_vel" topic and maps a value (-1 to 1) to (0 to 180) from "linear.x" to move a servo using a node that publishes from the keyboard.
I need some direction, because I want to use a Twist topic for both autonomous movement and remote teleop (rc transmitter) input.
I found the "differential drive", "simple drive" and a few other packages - but I fail to see how they help since they publish to a twist topic and I cant seem to find any documentation on how to utilize these messages.
Does anyone have a secret decoder ring?
Thank you, Keith
Originally posted by cerebraldad on ROS Answers with karma: 45 on 2018-01-05
Post score: 0
Original comments
Comment by Humpelstilzchen on 2018-01-08:
Do you have any encoders on your wheels to measure the current speed? Also I recommend my answer in https://answers.ros.org/question/209963/cmd_veltwist-transform-twist-message-into-left-and-right-motor-commands/#209966