Skip to content

Commit 16742c2

Browse files
authored
Add messages for motion primitives (#228)
1 parent 077825c commit 16742c2

File tree

5 files changed

+46
-1
lines changed

5 files changed

+46
-1
lines changed

control_msgs/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ set(msg_files
2424
msg/JointTolerance.msg
2525
msg/JointTrajectoryControllerState.msg
2626
msg/MecanumDriveControllerState.msg
27+
msg/MotionArgument.msg
28+
msg/MotionPrimitive.msg
29+
msg/MotionPrimitiveSequence.msg
2730
msg/MultiDOFCommand.msg
2831
msg/MultiDOFStateStamped.msg
2932
msg/PidState.msg
@@ -35,10 +38,11 @@ set(msg_files
3538
)
3639

3740
set(action_files
38-
action/ParallelGripperCommand.action
41+
action/ExecuteMotionPrimitiveSequence.action
3942
action/FollowJointTrajectory.action
4043
action/GripperCommand.action
4144
action/JointTrajectory.action
45+
action/ParallelGripperCommand.action
4246
action/PointHead.action
4347
action/SingleJointPosition.action
4448
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# A list of MotionPrimitive messages that are executed in sequence. They don't have to be of the
2+
# same type, as long as the robot supports executing them one after another.
3+
MotionPrimitiveSequence trajectory
4+
---
5+
int32 SUCCESSFUL = 0
6+
int32 INVALID_GOAL = -1
7+
int32 OLD_HEADER_TIMESTAMP = -3
8+
9+
int32 error_code
10+
string error_string
11+
---
12+
# Index of the currently executed motion primitive in the sequence.
13+
uint8 current_primitive_index

control_msgs/msg/MotionArgument.msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Key Value pair to be used in MotionPrimitive messages
2+
3+
string name
4+
float64 value

control_msgs/msg/MotionPrimitive.msg

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
int8 UNKNOWN=-1
2+
int8 LINEAR_JOINT=0 # Often referred as PTP
3+
int8 LINEAR_CARTESIAN=50 # Often referred as LIN
4+
int8 CIRCULAR_CARTESIAN=51 # Often referred as CIRC
5+
# potentially more, such as spline motion
6+
7+
int8 type -1 # one of the above
8+
9+
float64 blend_radius
10+
11+
# MotionArguments are meant to be used as vendor-specific or use-case-specific arguments to
12+
# MotionPrimitive messages. This is to avoid bloating the MotionPrimitive message with all possible
13+
# uses cases but rather add specific data using as a list of key-value pairs, which is what this
14+
# message represents.
15+
MotionArgument[] additional_arguments # (max) velocity, (max) acceleration, efficiency
16+
17+
# Targets should be either specified through joint configurations or Cartesian poses.
18+
# Depending on the motion type and implementation, there might be multiple poses allowed.
19+
# For example, circular motions are often specified as via and target
20+
# Usually one of these is empty, in some edge cases even both can be empty, when all input is given
21+
# in the more flexible MotionArgument[] field.
22+
geometry_msgs/PoseStamped[] poses
23+
float64[] joint_positions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MotionPrimitive[] motions

0 commit comments

Comments
 (0)