Robotics StackExchange | Archived questions

How Gazebo process VelocityJoint data?

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:

<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>

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?

Asked by vitsensei on 2019-11-09 07:20:52 UTC

Comments

Answers

"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.

Asked by kumpakri on 2019-11-11 05:56:06 UTC

Comments