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

How to propagate actuator commands from actuator to joint space

asked 2017-06-27 14:13:40 -0500

jlack gravatar image

I'm working in on the kinetic-devel branch, and need to have the transmissions propagate actuator commands from actuator to joint space, but am having trouble figuring out how to make this happen because no ActuatorToJoint interfaces are created when the transmissions are created. I know this is not typically something you need to do, but humor me.

I'm trying to do all of this without copy/pasting/modifying all of the work done by the transmission_interface_loader. I feel like there's gotta be a "built in" way to make this happen, but i'm struggling to see it.

So picture a SimRobotHw in a gazebo plugin that will read joint state information from the sim robot, convert to actuator space, then give that to another HardwareRobotHw implementation that converts that actuator state info to joint state info in the read() method. Then in the write() method, it'll convert any joint commands to actuator commands and send it back over to the SimRobotHw. So now the SimRobotHw has a bunch of actuator commands it needs to convert back into joint space so it can send those commands to the simulated robots joints.

Edit: This kinda looks like,

class SimRobotHw : public RobotHw
{
    read()
   {
       sim_jnts_to_ros_control_jnts();
       propegate_jnt_state_to_act_state();
       publish(); // publish actuator data to be received by HardwareRobotHw in its read() method
   }

   write()
   {
       subscribe(); // Receive actuator commands from HardwareRobotHw in its write() method
       propegate_joint_cmd_to_act_cmd();
       ros_cntrl_joints_to_sim_jnts();
   }

}

Then the other side looks like a typical implementation of a RobotHw as you would expect and doesn't do any reverse propegation.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-06-29 11:22:54 -0500

jlack gravatar image

Got this working, but requires a slight modification to ros_control. Answer included here and corresponding PR

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-06-27 14:13:40 -0500

Seen: 278 times

Last updated: Jun 29 '17