ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

calc new pose according to twist

asked 2015-07-26 21:40:09 -0600

rubick gravatar image

Is there any library to do this? input geometry_msgs::Pose and geometry_msgs::Twist, output new geometry_msgs::Pose.

I found tf::addDelta(), but it's a little bit different: /// Starting from a Pose from A to B, apply a Twist with reference frame A and reference point B, during a time t. geometry_msgs::Pose addDelta(const geometry_msgs::Pose &pose, const geometry_msgs::Twist &twist, const double &t) __attribute__((deprecated)); and it's deprecated.

so is there any other library to calc new pose according to twist?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-07-27 08:54:32 -0600

Assuming that your Pose and Twist are already in the same reference frame, simply add the linear portion of the Twist to your pose's position.

Then, convert your Pose's orientation to a tf::Quaternion. Store the angular portion of the Twist as a second quaternion using setRPY() and multiply the two Quaternions together.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2015-07-26 21:40:09 -0600

Seen: 1,200 times

Last updated: Jul 27 '15