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