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

calc new pose according to twist

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

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
1

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

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

Question Tools

Stats

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

Seen: 1,371 times

Last updated: Jul 27 '15