ros_control: Using an existing interrface

209 views
Skip to first unread message

Marius

unread,
Jun 30, 2016, 1:18:53 PM6/30/16
to ROS/Orocos Robot Control Special Interest Group
Hi everyone,

I want to change an existing hardware interface of the KUKA youBot so that I can use it with ros_control. This procedure ist explained in ros_control wiki.
The existing youbot_driver_ros_interface interfaces the youbot_driver to ROS.
My problem is that I have no idea how to change the existing interface to the structure described in the tutorial in the link above.
The current joint interface looks like this: 
topicName.str("");

topicName << youBotConfiguration.youBotArmConfigurations[armIndex].commandTopicName << "arm_controller/position_command"; // e.g. arm_1/arm_controller/positionCommand

youBotConfiguration
.youBotArmConfigurations[armIndex].armPositionCommandSubscriber = node.subscribe<brics_actuator::JointPositions > (topicName.str(), 1000, boost::bind(&YouBotOODLWrapper::armPositionsCommandCallback, this, _1, armIndex));
(URL to code)

and I want to have something like this:
hardware_interface::JointHandle pos_handle_a(jnt_state_interface.getHandle("A"), &cmd[0]);
   jnt_pos_interface
.registerHandle(pos_handle_a);
like in the link above.

Is there a simple way to do it?
Any ideas?

BTW: There is a gazebo simulation for the youbot which uses ros_control (youbot_simulation). In this simulation the "hardware-interface" is realized by an URDF transmission file which works with an inbuild default hw-interface in gazebo (gazebo default interface). At least, this is how I think it works.

I've been working with ROS/MoveIt! for the last few month but I havn't used ros_control yet an I can't find any other tutorials.

Any help is much appreciated!




Michele Mambrini

unread,
Jun 30, 2016, 4:22:57 PM6/30/16
to ROS/Orocos Robot Control Special Interest Group
Hi Marius, 

Some months ago I encountered the same problem. You need to develop a fake ROS:Hardware_Interface that works as medium layer between the KUKA youBot and one controller of the ros_control package. I found a useful bachelor thesis, completely shared on Github that helps me a lot (https://github.com/kaffeesiader/bachelor_thesis) . In addition to the thesis, the author, Martin Griesser, has shared also the package developed on his own to provide a fake position interface  to work with a Kuka Lightweight and Ros Control (https://github.com/kaffeesiader/uibk_moveit_adapter).

I'm quite sure that it is what you are looking for. 

Marius

unread,
Jun 30, 2016, 4:59:14 PM6/30/16
to ROS/Orocos Robot Control Special Interest Group
Hi Michele,

this looks indeed pretty good. Thank you for the hint!
What kind of robot did you work on?

Cheers

Marius

unread,
Jul 1, 2016, 6:22:49 PM7/1/16
to ROS/Orocos Robot Control Special Interest Group
I realized that one important difference to the suggestion with the fake hardware_interface is that the youbot interface already uses the FollowJointTrajectory topic directly. So what I want is that for example MoveIt! sends a FollowJointTrajectory command to a ros_controller and the ros_controller sends a command to the joints via a hardware_interface. So instead of using an adapter I have to change the youbot interface so that it doesn't receive the FollowJointTrajectory command directly.

Is this correct?
Reply all
Reply to author
Forward
0 new messages