Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion control_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ add_action_files(DIRECTORY action FILES
GripperCommand.action
JointTrajectory.action
PointHead.action
SingleJointPosition.action)
SingleJointPosition.action
JointGroupCommand.action)

add_message_files(DIRECTORY msg FILES
GripperCommand.msg
Expand Down
34 changes: 34 additions & 0 deletions control_msgs/action/JointGroupCommand.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Used in time-stamping the goal.
Header header

# Name list of the joints. You don't need to specify all joints of the
# robot. Joint names are case-sensitive.
string[] joint_names

# A command to the joints listed in joint_names.
# The order must be identical.
float64[] command
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wold it make sense to make this command more explicit, e.g. trajectory_msgs/JointTrajectoryPoint. This would probably avoid future extensions and fields can be used explicitly (positions, velocities, accelerations).

Does this makes sense for you?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pros:

  • Could allow for dual command types (e.g. position with a max velocity/acceleration)
  • Explicit command is easier to interpret

Cons:

  • Doesn't allow for non-traditional joint commands (only position, velocity, acceleration, effort) outside of overloading a variable
  • Makes the coding in ros_controllers a bit more difficult (need to add logic that detects the command type and writes to the appropriate field)

I think the pros can outweigh the cons, so let me make the changes in both packages.


# Command duration / timeout
# Set to 0 for no timeout.
duration timeout
---
int32 error_code
int32 SUCCESSFUL = 0
int32 INVALID_GOAL = -1
int32 INVALID_JOINTS = -2
int32 OLD_HEADER_TIMESTAMP = -3

# Human readable description of the error code. Contains complementary
# information that is especially useful when execution fails, for instance:
# - INVALID_GOAL: The reason for the invalid goal (e.g., the requested
# command violates the controller limits).
# - INVALID_JOINTS: The mismatch between the expected controller joints
# and those provided in the goal.
string error_string

---
Header header
string[] joint_names
float64[] desired
trajectory_msgs/JointTrajectoryPoint actual