Home | Tutorials | Wiki | Issues
Ask Your Question
0

How Gazebo process VelocityJoint data?

asked 2019-11-09 06:20:52 -0600

vitsensei gravatar image

Hi, I'm currently trying to use ros_control and Gazebo to simulate a unicycle rover. I used Velocity Joint Interface to control the velocity of each of my joint. Here's the transmission tag in URDF file: <transmission name="tran2">

<type>transmission_interface/SimpleTransmission</type>
<joint name="holder2wheel_right">
  <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
</joint>
<actuator name="motor_right">
  <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
  <mechanicalReduction>1</mechanicalReduction>
</actuator>

</transmission> And in the launch file:

  <!-- load the controllers -->
  <node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
    output="screen" ns="/rover" args="left_wheel right_wheel joint_state_controller"/>

  <!-- convert joint states to TF transforms for rviz, etc -->
  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"
    respawn="false" output="screen">
    <remap from="/joint_states" to="/rover/joint_states" />
  </node>

So my question is, if I set the wheel joint to have a velocity of 1 rad/s, would the wheel guarantee to have 1 rad/s?:

rospy.init_node("movement_controller_node")
left_wheel_pub = rospy.Publisher("/rover/left_wheel/command", Float64, queue_size=10)
left_wheel_pub.publish(1)

And is there a way to check the actual speed of the joint? Like a topic that is published by Gazebo?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-11-11 04:56:06 -0600

kumpakri gravatar image

updated 2019-11-11 05:03:19 -0600

"is there a way to check the actual speed of the joint?"

Yes.

The /imow/joint_states gazebo topic contains the velocity field for each joint loaded by the controller.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-11-09 06:20:52 -0600

Seen: 21 times

Last updated: Nov 11