Skip to content
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

Propose generic messages for commanding and getting states from controllers. #69

Merged
merged 10 commits into from Mar 31, 2023
4 changes: 4 additions & 0 deletions control_msgs/CMakeLists.txt
Expand Up @@ -29,7 +29,11 @@ set(msg_files
msg/JointJog.msg
msg/JointTolerance.msg
msg/JointTrajectoryControllerState.msg
msg/MultiDOFCommand.msg
msg/MultiDOFStateStamped.msg
msg/PidState.msg
msg/SingleDOFState.msg
msg/SingleDOFStateStamped.msg
)

set(action_files
Expand Down
2 changes: 2 additions & 0 deletions control_msgs/msg/JointControllerState.msg
@@ -1,5 +1,7 @@
# This message presents current controller state of one joint.

# It is deprecated as of Humble in favor of SingleDOFStateStamped.msg

# Header timestamp should be update time of controller state
std_msgs/Header header

Expand Down
14 changes: 14 additions & 0 deletions control_msgs/msg/MultiDOFCommand.msg
@@ -0,0 +1,14 @@
# The message defines command for multiple degrees of freedom (DoF) typically used by many controllers.
# The message intentionally avoids 'joint' nomenclature because it can be generally use for command with
# different semantic meanings, e.g., joints, Cartesian axes, or have abstract meaning like GPIO interface.

# names of degrees of freedom
string[] dof_names

# values used by most of the controller
float64[] values

# First derivation of the values, e.g., velocity if values are positions.
# This is useful for PID and similar controllers.
float64[] values_dot
destogl marked this conversation as resolved.
Show resolved Hide resolved

6 changes: 6 additions & 0 deletions control_msgs/msg/MultiDOFStateStamped.msg
@@ -0,0 +1,6 @@
# This message presents current controller state of multiple degrees of freedom.

# Header timestamp should be update time of controller state
std_msgs/Header header

SingleDOFState[] dof_states
26 changes: 26 additions & 0 deletions control_msgs/msg/SingleDOFState.msg
bmagyar marked this conversation as resolved.
Show resolved Hide resolved
@@ -0,0 +1,26 @@
# This message presents current controller state of one degree of freedom.

# DoF name, e.g., joint or Cartesian axis name
string name

# The set point, that is, desired state.
float64 set_point

# Current value of the process (ie: latest sensor measurement on the controlled value).
float64 process_value

# First time-derivative of the process value.
float64 process_value_dot

# The error of the controlled value, essentially process_value - set_point (for a regular PID implementation).
float64 error

# First time-derivative of the error of the controlled value.
float64 error_dot

# Time between two consecutive updates/execution of the control law.
float64 time_step

# Current output of the controller.
float64 command
destogl marked this conversation as resolved.
Show resolved Hide resolved

6 changes: 6 additions & 0 deletions control_msgs/msg/SingleDOFStateStamped.msg
bmagyar marked this conversation as resolved.
Show resolved Hide resolved
@@ -0,0 +1,6 @@
# This message presents current controller state of one degree of freedom.

# Header timestamp should be update time of controller state
std_msgs/Header header

SingleDOFState dof_state
bmagyar marked this conversation as resolved.
Show resolved Hide resolved