why given only the quaternion, a pose can be determined [closed]

line 121, 214, 337. eg,

geometry_msgs::Pose target_pose1;
target_pose1.orientation.w = 1.0;
target_pose1.position.x = 0.28;
target_pose1.position.y = -0.2;
target_pose1.position.z = 0.5;
move_group.setPoseTarget(target_pose1);


question: why given only the quaternion, a pose can be determined??

thanks!

edit retag reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by lyh458 close date 2020-01-06 01:38:48.716052

( 2019-12-21 00:09:41 -0500 )edit

Sorry for my poor expression. I think a pose of a robot should be determined by both position and quaternion, because the quaternion only contain the orientation information of a joint. The "pose1", "pose2" and "pose3" presented in MoveIt tutorials, move_group_interface_tutorial.cpp only given the quaternion, I am so doubt that how can compute complete infromation of a joint only with this.

( 2019-12-21 00:34:39 -0500 )edit
( 2019-12-22 05:06:31 -0500 )edit

Sort by ยป oldest newest most voted

As you said the pose is determined by both orientation and the position. It is what exactly what they have done in the tutorial

target_pose1.position.x = 0.28;
target_pose1.position.y = -0.2;
target_pose1.position.z = 0.5;


This 3 lines defines the position.

target_pose1.orientation.w = 1.0


this line shows the orientation (quarternion). They haven't defined remaining 3 components of quarternion. So it will be set to default zero value. If you want you can define remaining components as per your requirements as

target_pose1.orientation.x = ...

target_pose1.orientation.y=...

target_pose1.orientation.z = ...


more