ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
tf::Transform has methods for obtaining rotations like getRotation().
Though, you can multiply Transform
s directly to have angular and linear transformations. No need to separate them.
2 | No.2 Revision |
tf::Transform has methods for obtaining rotations like getRotation().
Though, you can multiply Transform
s directly to have angular and linear transformations. No need to separate them.
Edit:
I'm not sure if I get you correct but you can transform your laser scan to map using TF like this;
tf::StampedTransform transform;
ros::Time t = ros::Time(0);
tf_->waitForTransform("map", "laser", t, ros::Duration(1.0));
tf_->lookupTransform("map", "laser", t, transform);
then, you can get x, y and theta like;
double x = transform.getOrigin().getX();
double y = transform.getOrigin().getY();
double th = tf::getYaw(transform.getRotation());
Is this what you ask for?