mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-07 18:27:46 +08:00
ros1: Migrating tf to tf2 (#1425)
* Migrating tf to tf2 * Added ci action to test PR on ros1 * updated dev container with nvidia working * backward compatibility with topics having frame_id with leading slash not allowed with tf2 * backward compatibility of leading slash for other tf2 buffers * updated comment
This commit is contained in:
@@ -406,7 +406,10 @@ void VoxelLayer::updateOrigin(double new_origin_x, double new_origin_y)
|
||||
{
|
||||
geometry_msgs::TransformStamped transformStamped;
|
||||
#ifdef COSTMAP_2D_POINTCLOUD2
|
||||
transformStamped = tf_->lookupTransform(global_frame_, robot_base_frame_, ros::Time(0));
|
||||
transformStamped = tf_->lookupTransform(
|
||||
!global_frame_.empty()&&global_frame_.at(0)=='/'?global_frame_.substr(1):global_frame_,
|
||||
!robot_base_frame_.empty()&&robot_base_frame_.at(0)=='/'?robot_base_frame_.substr(1):robot_base_frame_,
|
||||
ros::Time(0));
|
||||
#else
|
||||
tf::StampedTransform stampedTransform;
|
||||
tf_->lookupTransform(global_frame_, robot_base_frame_, ros::Time(0), stampedTransform);
|
||||
|
||||
Reference in New Issue
Block a user