add file costmap_2d_robot
This commit is contained in:
@@ -412,12 +412,12 @@ namespace costmap_2d
|
||||
return false;
|
||||
}
|
||||
// Copy map data given proper transformations
|
||||
tf3::Transform tf2_transform;
|
||||
tf2_transform = convertToTf2Transform(transformMsg.transform);
|
||||
x = tf2_transform.getOrigin().x();
|
||||
y = tf2_transform.getOrigin().y();
|
||||
tf3::Transform tf3_transform;
|
||||
tf3_transform = convertTotf3Transform(transformMsg.transform);
|
||||
x = tf3_transform.getOrigin().x();
|
||||
y = tf3_transform.getOrigin().y();
|
||||
// Extract the rotation as a quaternion from the transform
|
||||
tf3::Quaternion rotation = tf2_transform.getRotation();
|
||||
tf3::Quaternion rotation = tf3_transform.getRotation();
|
||||
// Convert the quaternion to a yaw angle (in radians)
|
||||
yaw = tf3::getYaw(rotation);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user