ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org
Ask Your Question
0

Joint Trajectory Controller Problem - ROS Hydro, Gazebo 1.9, MoveIt

asked 2014-02-07 22:12:15 -0600

M@verick gravatar image

updated 2014-04-20 14:09:39 -0600

ngrennan gravatar image

Hi, I am trying to build a simple simulation that uses ROS, Gazebo and MoveIt. I am currently trying to implement joint trajectory controllers on the Gazebo model so that it can communicate with MoveIt. Its only a very simple model as I want to master the basics before building a more complicated robot in simulation.

So far I have: 1) loaded a 'joint_trajectory_controllers.yaml' file (defines the joints to be controlled with type:position_controllers/JointTrajectoryController ) onto parameter server 2) passed the controller names to the node that spawns the controllers

When I run the code, it fails to load the controller and returns the error: "This controller requires a hardware interface of type 'hardware_interface::PositionJointInterface'. Make sure this is registered in the hardware_interface::RobotHW class."

I have tried to modify the hardware interface arguments in the transmissions but nothing seems to work?!

Can someone who has done this before outline the discrete steps required to implement this controller and/or tell me how to fix this error. Or link me to a (preferably simple) example that works in Hydro - I have been using the Reem model as a reference so far and while it works perfectly, its complexity makes it hard to use for debugging my problem. Any help would be greatly appreciated!

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-02-09 21:10:53 -0600

Adolfo Rodriguez T gravatar image

The issue seems to be a mismatch between the control mode exposed by your robot joints and what the controller is expecting.

More specifically, you're trying to load a controller of type position_controllers/JointTrajectoryController, which expects position-controlled joints, i.e., hardware_interface::PositionJointInterface, and your robot does not expose it.

The current version of gazebo_ros_control does not add a position control interface by default. This pull request should address the issue, but is pending for release. As solutions, you can either switch your controller to a hardware_interface::EffortJointInterface, or build gazebo_ros_control from source.

The reason why it works with REEM is that it has a custom Gazebo plugin that properly registers a position control interface.

Let me know if you still have any doubts.

edit flag offensive delete link more

Comments

Thanks for the clarification on this. I managed to get it to work last night using the EffortJointInterface so I'm happy now. That being said I prefer the REEM control interface - so time permitting I will do as suggested and build gazebo_ros_control. Thanks again for your time and help with this. M

M@verick gravatar image M@verick  ( 2014-02-09 23:18:12 -0600 )edit

Glad to hear that it worked. If you're not time-constrained, you can wait until the next gazebo_ros_control release and get the pos interface without having to build from source. Also, if the answer was satisfactory, please mark it as such (checkmark on the left), so the question shows as resolved.

Adolfo Rodriguez T gravatar image Adolfo Rodriguez T  ( 2014-02-10 00:05:26 -0600 )edit

Sorry - new user :)

M@verick gravatar image M@verick  ( 2014-02-10 00:22:54 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-02-07 22:12:15 -0600

Seen: 2,196 times

Last updated: Feb 09 '14