-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why don't position_controllers publish the controller state like effort_controllers do? #606
Comments
Just a missing implementation AFAIK. Happy to review a PR ;)
…On Sat, 27 Aug 2022, 23:34 João André, ***@***.***> wrote:
I was forced to migrate from effort_controllers/JointPositionController
to position_controllers/JointPositionController and I noticed I no longer
get topics publishing the controller state for each controller joint. Is
this by design (is there any particular reason for it?) or there was just
never the need to implement it?
—
Reply to this email directly, view it on GitHub
<#606>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA24PYMP6L2NGVVE4O5AKOTV3KJW7ANCNFSM572AMPKQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I believe it's because it's a forward_controller rather than a PID controller. (I've implemented the controller state publishing for |
I assume internally there is some kind of PID loop though, considering the PID gains can be tuned through parameters in the controller namespace? In truth when setting |
If we are speaking of a
|
I haven't tried to tune these "PID" parameters to check whether they do anything at all, but I've seen some models/packages providing those parameters, and ROS complains about those missing parameters if not provided under For instance, we can see that in configuration files for simulating of a NAO humanoid with position controllers, whose hardware interface is defined in the URDF model as I've also seen it in some URDF tutorials that define PID gains for position-controlled joints. Again not sure if they are supposed to do anything because I've never tried to edit these values. |
Thank you for providing the references and links. The links above refer to an issue present in older versions of Gazebo (7, available with ROS Kinetic) for which a workaround was to set the PID gains for the PositionJointInterface. The |
The PID gains for gazebo_ros_control are for setting either forces or velocities and positions in the simulation directly. If you omit the PID gains for gazebo_ros_control, the control_toolbox's PID controller throws an error during initialization (https://github.com/ros-simulation/gazebo_ros_pkgs/blob/noetic-devel/gazebo_ros_control/src/default_robot_hw_sim.cpp#L222). If the PID controller could be initialized, the hardware interface sets effort commands (https://github.com/ros-simulation/gazebo_ros_pkgs/blob/noetic-devel/gazebo_ros_control/src/default_robot_hw_sim.cpp#L351 and https://github.com/ros-simulation/gazebo_ros_pkgs/blob/noetic-devel/gazebo_ros_control/src/default_robot_hw_sim.cpp#L379). If the PID controller could not be initialized, the commanded position or velocity are set directly in the simulation, which sometimes results in weird behavior for mobile robots (sliding, wobbling). (i think that multiple people are finding this issue when attempting to tune the gazebo controller from gazebo_ros_control - so I'm writing this here) EditI just realized there is a parameter for the PID controller that is used in ros_gazebo_control But still - having a publisher for the feed forward controllers from ROS control might be good for real robots that use external motor controllers that itself publish their internal controller states. |
I was forced to migrate from
effort_controllers/JointPositionController
toposition_controllers/JointPositionController
and I noticed I no longer get topics publishing the controller state for each controller joint. Is this by design (is there any particular reason for it?) or there was just never the need to implement it?The text was updated successfully, but these errors were encountered: