ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange

# MoveIt! Euler angles or rotation vector?

I'm trying to figure out whether the MoveIt MoveGroupInterface, in particular, moveit_commander uses rotation vectors or Euler angles as orientation input. The documentation for move_group.set_position_target is not clear in this regard:

[x, y, z, rot_x, rot_y, rot_z] or a list of 7 floats [x, y, z, qx, qy, qz, qw]

The list is then passed to MoveGroupInterface where it is converted by Eigen to a Pose (XYZ and Quaternion) which looks more like the original input should be a rotation vector.

The MoveGroupInterface also has a setRPYTarget function, which expects roll pitch yaw == (fixed XYZ?) Euler angles.

Therefore, I'm not 100% sure if set_pose_target expects Euler angles or a rotation vector.

Can anyone please clarify me on which pose representation is expected.

edit retag close merge delete

2

moveit_commander uses rotation vectors or Euler angles as orientation input

I believe only if you chose to pass it a list. Other options are:

a Pose message, [or] a PoseStamped message

( 2018-05-23 04:07:51 -0500 )edit

Sort by ยป oldest newest most voted

Since we don't really know if set_pose_target expects a rotation vector we figured it might be best to convert to a Pose message "by hand":

    quaternion = quaternion_from_euler(self.pose.a, self.pose.b, self.pose.c, axes='sxyz')  # static/fixed frame XYZ
target = Pose(
position=Point(
x=self.pose.x,
y=self.pose.y,
z=self.pose.z,
),
orientation=Quaternion(
x=quaternion[0],
y=quaternion[1],
z=quaternion[2],
w=quaternion[3],
)
)