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

MoveIt! Euler angles or rotation vector?

asked 2018-05-23 03:54:09 -0600

machinekoder gravatar image

updated 2018-05-23 03:55:32 -0600

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 flag offensive close merge delete

Comments

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

gvdhoorn gravatar image gvdhoorn  ( 2018-05-23 04:07:51 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-05-24 02:16:30 -0600

machinekoder gravatar image

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],
        )
    )
    manipulator.set_pose_target(target, end_effector_link)
    manipulator.go()
edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2018-05-23 03:54:09 -0600

Seen: 1,206 times

Last updated: May 24 '18