-
Notifications
You must be signed in to change notification settings - Fork 6
msg: pose
Salvo Virga edited this page Sep 22, 2018
·
3 revisions
simple_msgs::Pose
messages represent a 3D position and orientation in space.
It is composed of a simple_msgs::Point
: X, Y, Z
and a simple_msgs::Quaternion
: X, Y, Z, W.
A simple_msgs::PoseStamped
message is a Pose
+ Header
:
the pose can then be linked to a reference frame defined by Header.frame_id
and their timestamp can be stored in Header.timestamp
.
In code:
simple_msgs::Header my_header{0, "root", 1.0};
simple_msgs::Point my_point{1.0, 3.0, 2.0};
simple_msgs::Quaternion my_quaternion{0.0, 0.0, 0.0, 1.0};
simple_msgs::PoseStamped my_posestamped{my_header, simple_msgs::Pose{my_point, my_quaternion}};
You can manipulate the PoseStamped
message using its setters/getters. E.g.
my_posestamped.getPose.getPosition.setX(0.0);
Note: simple
sends the message that you create, you are responsible to check if the sent pose is valid.