ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

HardwareInterface problem with Gazebo and ros_control

asked 2015-10-22 10:29:04 -0500

maztentropy gravatar image

updated 2015-10-22 10:30:01 -0500

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-10-23 08:32:07 -0500

maztentropy gravatar image

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.

edit flag offensive delete link more

Comments

1

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

R@m gravatar image R@m  ( 2017-02-08 05:56:22 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2015-10-22 10:29:04 -0500

Seen: 3,116 times

Last updated: Oct 23 '15