I have a Magni Silver robot with the MCB version 5.2. I was wondering if there is any way to get individual wheel angular velocities for the motor-operated wheels? Also, if anyone knows what the rostopics ‘left error’ and ‘right error’ from the ‘motor_node’ mean that would be helpful?
If you have current firmware of v40 and are running current ubiquity_motor node then the angular velocities are in topic joint_states for the array of velocity
Mark
You are describing a defect which we addressed but I now must verify that it made it’s way into our main ubiquity_motor repository. Can you tell me if if you have a folder of /home/ubuntu/catkin_ws/src/ubiquity_motor?
If you do not have that folder or if it is not current that would explain this right away. This fix was within the last couple months so it does not exist on our images yet by default.
For getting current code you need your Pi to be able to access the internet to pull from our github. If you do not know how to setup to be on the internet see this:
Below are short instructions on use of our repository code which is a form of Beta software distribution for those who want mostly newest features.
If you have questions from below see this page in the middle: https://learn.ubiquityrobotics.com/updating
If the folder is not there that would explain what you describe.
If the folder is there then cd into it and type ‘git pull’.
Second question for the two error terms is that these indicate the current PID loop error for each wheel. When steady these sit near 0. When you do an abrupt step in velocity (perhaps using teleop_twist_keyboard) the error will jump up and as the PID loop catches up with proper speed error settles back to zero. These topics are used to graph in realtime this error and tune the PID cooefficients.
We implement our PID loop based on expected position, not expected velocity. So this error term is error in expected position. Regulating on position allows more precise endpoint determination is why we do it this way.
Hey Mark thanks for the tips. Sorry for replying so late. I did not have access to the robot over the weekend. Adding the ubiquity_motor in catkin workspace helped in getting the wheel velocities. I just want to knw whether they are angular velocities or linear velocities?
I believe they are angular velocities for the joint topic.
The units for ROS for angular are radians per second.
Our standard wheels have a circumference of 0.637 Meters
Here is a verification you can put the robot on blocks so wheels don’t hit ground.
rostopic pub -r 10 /cmd_vel geometry_msgs/Twist ‘{ linear: {x: 0.32} }’
Doing this the velocities will read about 3.14 sort of number or Pi rads/sec
And the wheels will rotate one turn every 2 seconds.
It just so happens the circumference comes out to a ‘nice’ value in being about 0.64 meters it is ‘close’ to 2 Pi / 10 but that is basically per chance.