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

Revision history [back]

Sadly ros_control does not do stacked/hierarchical control particularly well. In a perfect world, you'd have diff_drive_controller running toegher with a velocity controller in the controller manager, passing messages in some standard RT-safe fashion. Your hardware would be exposed as an EffortInterface or similar.

You can take a look at how hector_quadrotor's control hierarchy works (stacked position/velocity/attitude controllers, using pointer 'handles' to pass data instead of slow pub/sub).

Another alternative is to have your RobotHW class expose the VelocityInterface diff_drive_controller is looking for, and add the PID controller in the RobotHW to transform the velocity command into whatever your hardware ACTUALLY needs. Not as 'modular' as ros_control feels like it should be, but it would work.

PS see control_toolbox package in ros_control for a standard PID implementation.

Sadly ros_control does not do stacked/hierarchical control particularly well. In a perfect world, you'd have diff_drive_controller running toegher with a velocity controller in the controller manager, passing messages in some standard RT-safe fashion. Your hardware would be exposed as an EffortInterface or similar.

You can take a look at how hector_quadrotor's control hierarchy works (stacked position/velocity/attitude controllers, using pointer 'handles' to pass data instead of slow RT-unsafe pub/sub).

Another alternative is to have your RobotHW class expose the VelocityInterface diff_drive_controller is looking for, and add the PID controller in the RobotHW to transform the velocity command into whatever your hardware ACTUALLY needs. Not as 'modular' as ros_control feels like it should be, but it would work.

PS see control_toolbox package in ros_control for a standard PID implementation.

Sadly ros_control does not do stacked/hierarchical control particularly well. In a perfect world, you'd have diff_drive_controller running toegher together with a velocity controller in the controller manager, passing messages in some standard RT-safe fashion. Your hardware would be exposed as an EffortInterface or similar.similar. Alas, it is not (yet) a perfect world.

You can take a look at how hector_quadrotor's control hierarchy works (stacked position/velocity/attitude controllers, using pointer 'handles' to pass data instead of RT-unsafe pub/sub).

Another alternative is to have your RobotHW class expose the VelocityInterface diff_drive_controller is looking for, and add the PID controller in the RobotHW to transform the velocity command into whatever your hardware ACTUALLY needs. Not as 'modular' as ros_control feels like it should be, but it would work.

PS see control_toolbox package in ros_control for a standard PID implementation.