0
$\begingroup$

Rosanswers logo

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?


Originally posted by CoffeeKangaroo on ROS Answers with karma: 65 on 2022-09-27

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.)


Originally posted by Mike Scheutzow with karma: 4903 on 2022-09-28

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2022-09-30:
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.

Comment by CoffeeKangaroo on 2022-09-30:
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.

Comment by gvdhoorn on 2022-09-30:
It's not really a problem that's being solved. It's just a different sw+hw configuration for a different use-case.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.