0
$\begingroup$

Rosanswers logo

Hello! I am trying to simulate a full custom robot with Gazebo and MoveIt but I am running into one problem: gazebo cannot find the proper hardware interface for the joints in the URDF file.

I need to control two arms (UR10) so similarly to what's done in the package universal_robot I define a controller for each joint type position_controllers/JointTrajectoryController. My URDF file uses UR10's original URDF file which defines the transmission elements as "PositionJointInterface":

    <transmission name="${prefix}shoulder_pan_trans">
  <type>transmission_interface/SimpleTransmission</type>
  <joint name="${prefix}shoulder_pan_joint">
    <hardwareInterface>PositionJointInterface</hardwareInterface>
  </joint>
  <actuator name="${prefix}shoulder_pan_motor">
    <mechanicalReduction>1</mechanicalReduction>
  </actuator>
</transmission>

And yet when I try to run gazebo and spawn the controllers I get this error:

[ERROR] [1445527289.044457090, 0.821000000]: Could not find joint 'leftshoulder_pan_joint' in 'hardware_interface::PositionJointInterface'.
[ERROR] [1445527289.044594098, 0.821000000]: Failed to initialize the controller

I have been digging around trying to find the problem and I noticed that after my URDF was converted with xacro PositionJointInterfaces turned into EffortJointInterfaces:

  <transmission name="leftshoulder_pan_trans">
<type>transmission_interface/SimpleTransmission</type>
<joint name="leftshoulder_pan_joint">
  <hardwareInterface>EffortJointInterface</hardwareInterface>
</joint>
<actuator name="leftshoulder_pan_motor">
  <mechanicalReduction>1</mechanicalReduction>
</actuator>
  </transmission>

Can somebody explain what is going on?


Originally posted by maztentropy on ROS Answers with karma: 35 on 2015-10-22

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Solved: It turns out I was starting gazebo's plugin ros_control twice and the second one was giving me the error. Fixed it by removing one of the executions.

I still do not know why the joint interfaces change type but it is not giving me an error anymore so I consider this solved.


Originally posted by maztentropy with karma: 35 on 2015-10-23

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by R@m on 2017-02-08:
I'm facing the same issue, I'm loading the ros_control only once and yet I face the same error...is there any solution??

$\endgroup$

Your Answer

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