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

ros_control for hardware with PID controller

asked 2022-09-27 07:35:18 -0500

CoffeeKangaroo gravatar image

updated 2022-09-28 03:44:37 -0500

ros_control is designed as an interface to create robot agnostic access to hardware with ros AND allow to have a (easily exchangeable) controller for the hardware.

For me it is unclear which kind of hardware is meant to be controlled with ros_control and ros_controllers.

For example consider any Dynamixel (assuming compatibility with the U2D2) servo with a U2D2. The U2D2 has its own PID controller (e.g. for position) for the servo. Is it still considerable to be good practice to write a hardware interface (hardware_interface::RobotHW inheriting class as mentioned for example here) for this servo? If so should the controller on the hardware be utilized or the a controller from the ros_controller?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-09-28 10:48:29 -0500

Mike Scheutzow gravatar image

The two PID loops (in ros_control and in your motor controller) can work together without a problem. You should use both. The ros_control one typically has more cpu available, so it may be able to output better commands to the motor controller, giving you nicer robot motion (compared to using the motor controller one alone.)

edit flag offensive delete link more

Comments

1

Something which is unclear to many users is that the majority of ros_control controllers don't actually implement PID control. Most of them are instances of ForwardCommandController, which don't implement any control law whatsoever. They simply forward the incoming setpoint to the underlying hardware resource (ie: joint).

The main purpose of those controllers is to use them with the kind of setup described by @CoffeeKangaroo: there is an embedded/remote system which already implements (PID-based or more advanced) motion control, but it's desirable to abstract that all away behind the same controller interfaces as all the other ros_control controllers.

That's when you'd use a forwarding command controller.

It's been mentioned a few times here on ROS Answers already, but ros_control is really much more of a resource management framework.

gvdhoorn gravatar image gvdhoorn  ( 2022-09-30 01:15:25 -0500 )edit

Thanks for the clue! I am aware that there are ForwardCommandControllers. I am using such a controller right now. I did not know that this controller is designed to be the solution to my problem.

CoffeeKangaroo gravatar image CoffeeKangaroo  ( 2022-09-30 02:31:47 -0500 )edit

It's not really a problem that's being solved. It's just a different sw+hw configuration for a different use-case.

gvdhoorn gravatar image gvdhoorn  ( 2022-09-30 03:13:24 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2022-09-27 07:35:18 -0500

Seen: 196 times

Last updated: Sep 28 '22