Robotics StackExchange | Archived questions

why given only the quaternion, a pose can be determined

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!

Asked by lyh458 on 2019-12-20 22:30:41 UTC

Comments

Can you please clarify your question ??

Asked by Abhishekpg on 2019-12-21 01:09:41 UTC

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.

Asked by lyh458 on 2019-12-21 01:34:39 UTC

Cross-posted: ros-planning/moveit_tutorials#439.

Asked by gvdhoorn on 2019-12-22 06:06:31 UTC

Answers

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 = ...

Hope this clarifies your question

Asked by Abhishekpg on 2019-12-21 06:15:34 UTC

Comments

Yeah, thanks! I mistook the "position" for "orientation".

Asked by lyh458 on 2019-12-22 22:25:45 UTC