0
$\begingroup$

Gazebo Answers logo

When I create a transmission for the wheels of my robot like this

 <transmission name="tran_robot_wheel"> <type>transmission_interface/SimpleTransmission</type> <joint name="wheel_joint"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> </joint> <actuator name="wheel_motor"> <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> 

or

 <transmission name="tran_robot_wheel"> <type>transmission_interface/SimpleTransmission</type> <joint name="wheel_joint"> <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface> </joint> <actuator name="wheel_motor"> <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface> <mechanicalReduction>1</mechanicalReduction> </actuator> </transmission> 

And I configure the controller as so

 joint_wheel_controller: type: effort_controllers/JointVelocityController joint: wheel_joint pid: {p: 100, i: 10, d: 0.1} 

or

 joint_wheel_controller: type: velocity_controllers/JointVelocityController joint: wheel_joint pid: {p: 100, i: 10, d: 0.1} 

And I run the simulation and sent a command to both left and right wheel to set velocity to 1.0

rostopic pub /robot/joint_wheel_controller/command std_msgs/Float64 "data: 1.0" 

The robot moves about 1 meter in 10 second. The robot wheel turns once around in about 8 seconds. What kind of velocity unit is that? How do I convert it to m/s?


Originally posted by kumpakri on Gazebo Answers with karma: 755 on 2019-01-30

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

The robot wheel turns around once in about 8 seconds (6.283, actually), because the value assigned as velocity is angular velocity omega

omega = 2 * pi * f

that means the time t it takes to turn the wheel all the way around

t = 1/f

is

t = ( 2 * pi ) / omega = 2 * 3.1415 / 1 = 6.283 s

and you need to assign the velocity omega of 6.283 to achieve 1 rotation per second

omega = 2 * pi * f = 2 * 3.1415 * 1 = 6.283

To get the desired linear velocity v you divide the desired linear velocity v with the radius r of the wheel in meters.

v = 2 * pi * f * r = omega * r

omega = v / r


Originally posted by kumpakri with karma: 755 on 2019-02-22

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by vaichu on 2020-03-20:
I noticed that, right after controllers are spawned. They start to receive some noise as commands. is this normal?

Comment by kumpakri on 2020-03-30:
Why do you think they receive noise as commands? Do you see that on the command topic?

$\endgroup$