ros_controllers icon indicating copy to clipboard operation
ros_controllers copied to clipboard

Pass effort through joint_trajectory_controller.

Open liarokapisv opened this issue 7 years ago • 3 comments

We would like to have a controller acting the same as position_controllers/JointTrajectoryController that would also forward effort values via a PosEff interface adaptor. The effort values do not need interpolation and could simply stay constant between TrajectoryPoints. Is this currently possible without rewriting a big part of the controller ? If not would it be possible to have a sketch of the required changes?

liarokapisv avatar Mar 30 '18 13:03 liarokapisv

I take it you are aware of how the hardware interfaces are a template parameter in the controller implementation. Doesn't any of the current ones suit your needs?

I don't have the capacity to come up with new implementations at the moment but pull requests are welcome :)

bmagyar avatar Mar 31 '18 08:03 bmagyar

Yes I am aware of that. I believe that only changes the adaptor's behaviour when mapping the position/velocity/acceleration to the interface. The problem is that we need a PosVelEff interface and while writing a new adaptor for a new interface isn't hard in general, the controller apparently does not do anything with the trajectory message's effort values so I can't use them in the adaptor. What I propose is adding effort to the QuinticSplineSegment's state and simple do a linear interpolation, it is a natural addition to the controller's features.

I can make the changes myself but I am not completely sure of all the changes that need to happen to support this feature. On the top of my head I think the following changes are necessary:

Change QuanticSplineSegment to support effort sampling. Change JointTrajectorySegment to read the messages' effort values. Change initJointTrajectory Appropriately change JointTrajectoryController's methods.

What do you think? Is this feature useful for the generic trajectory controller?

liarokapisv avatar Mar 31 '18 11:03 liarokapisv

Is there any update on this ?

amjack0 avatar Jan 03 '21 12:01 amjack0