Open adeguet1 opened 1 year ago
JointSetpoint
is a bad name, can be confused with result from setpoint_js
(same for c
). Could use JointServo
.pose_error
as double?servo_cx
, do we add a identifier (string, enum, char) in message to determine the frame of reference (body vs spatial/world) or do we body/servo_cx
? In ROS, header.frame_id
could be used?
The current
servo_jp
andservo_cp
commands only use a position setpoint. Since these commands are often sent directly to a PID controller (low-level), it would make sense to also add a velocity setpoint along the position one. This would greatly improve trajectory following. By extension, we could also consider sending an effort setpoint as a feed-forward.The user would then be allowed to send
p
,v
,f
(or effort) to the low-level controller. The output would bef = P * (setpoint_p - measured_p) + D (setpoint_v - measured_v) + setpoint_f
.Depending on which values are provided, the behavior can be summarized in the following table.
servo_{j,c}f
servo_{j,c}v
servo_{j,c}p
servo_{j,c}pv
newservo_{j,c}pvf
newTo extend the current CRTK convention, we can either add more information for the existing
servo_{j,c}p
commands or add one or more new commands with new payloads. Changing the payload would not be backward compatible so it is not the preferred solution.This being said, for the ROS implementation of
servo_jp
, we use theJointState
message which does contain 3 vectors,position
,velocity
andeffort
so it is possible to add this feature without breaking the API (we can use the vectors size to determine which setpoints are provided).For
servo_cp
, since we use thePoseStamped
, there is no way to add the feature without a new command. For the cartesian command, we propose to add:servo_cpvf
CartesianSetpoint
with:pose
andpose_defined
twist
andtwist_defined
wrench
andwrench_defined
For consistency's sake, we might also add the command
servo_jpvf
and the message typeJointSetpoint
. We could also add aCartesianState
to mirror theJointState
.