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

Revision history [back]

After calling the update on the controller manager, we read back the command_effort variable and send it to our actuator drives. Look into the ethercat_hardware package or even pr2_gazebo_plugins and the gazebo_ros_controller_manager to see how they do it on the PR2. The later is a bit easier to follow, everything is done in the gazebo_ros_controller_manager.cpp file, from URDF parsing to sending commanded efforts.

Here we actually cheat a little bit on our setup. Since we already have microcontrollers with PID loops that accepts positions as commands for each of our actuators, we set the joint spline trajectory controller p and d parameters as {1,0} so the commanded_effort variable only contain the full joint position error.

After calling the update on the controller manager, we read back the command_effort commanded_effort variable and send it to our actuator drives. Look into the ethercat_hardware package or even pr2_gazebo_plugins and the gazebo_ros_controller_manager to see how they do it on the PR2. The later is a bit easier to follow, everything is done in the gazebo_ros_controller_manager.cpp file, from URDF parsing to sending commanded efforts.

Here we actually cheat a little bit on our setup. Since we already have microcontrollers with PID loops that accepts positions as commands for each of our actuators, we set the joint spline trajectory controller p and d parameters as {1,0} so the commanded_effort variable only contain the full joint position error.