0
$\begingroup$

Hello everyone i'm simulating a differential drive robot on gazebo 11.0 (i'm using ROS noetic), and i'm trying to control each wheel separately using velocity control and using an EffortJointInterface, but my robot don't show up correctly whel i use the effort interface, but if i use a velocity interface my robot is simulated correctly.

My robot look like this when using velocity interface and work well:

enter image description here

But once i use an effort interface my robot is no longuer showed correctly and not moving: enter image description here

Here are my codes:

-Transmissions:

<?xml version="1.0"?>
<robot>

<!-- Transmission 1 -->
  <transmission name="tran1">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="wheel1_joint">
      <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
    </joint>
    <actuator name="motor1">
      <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  
  <!-- Transmission 2 -->
  <transmission name="tran2">
    <type>transmission_interface/SimpleTransmission</type>
    <joint name="wheel2_joint">
      <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
    </joint>
    <actuator name="motor2">
      <hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
      <mechanicalReduction>1</mechanicalReduction>
    </actuator>
  </transmission>
  
  
  </robot>

-the Yaml control file:

carbot:
  joint_state_controller:
    type: joint_state_controller/JointStateController
    publish_rate: 50  

  joint1_velocity_controller:
    type: effort_controllers/JointVelocityController
    joint: wheel1_joint
    pid: {p: 100.0, i: 0.01, d: 10.0}
  joint2_velocity_controller:
    type: effort_controllers/JointVelocityController
    joint: wheel2_joint
    pid: {p: 100.0, i: 0.01, d: 10.0}
  • my control launch file:
<?xml version="1.0"?>
<launch>

  <rosparam file="$(find robot_control)/config/carbot_control.yaml" command="load"/>

  <node name="controller_spawner" pkg="controller_manager" type="spawner" respawn="false"
    output="screen" ns="/carbot" args="joint1_velocity_controller joint2_velocity_controller joint_state_controller"/>

  <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"
    respawn="false" output="screen">
    <remap from="/joint_states" to="/carbot/joint_states" />
  </node>

</launch>

thank you for your answers. (i'm new here)

$\endgroup$
2
  • $\begingroup$ Welcome at RSE. Please always add the versions of ROS, ros-control, and gazebo to your questions. $\endgroup$ Commented Mar 25 at 7:39
  • $\begingroup$ I am facing the same issue, with a similar wheeled configuration. Whenever I try to spin a wheel by feeding an effort to it through a transmission, I am unable to do so, unless the effort is above some value. For smaller efforts, the wheel remains static. In case of a velocity, everything works fine. Check my question for some insight: question EDIT 1: I am trying to overcome this issue by coding a gazebo plugin which simulate the wheel dynamic plant, because I couldn't solve the aforemention $\endgroup$ Commented Mar 25 at 23:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.