How to use fake localization with PR2

asked 2021-07-13 17:15:36 -0500

creazy gravatar image

Hello,

I'm trying to use fake_localization for my PR2 robot to get its world position.

In my controller code I try to localize the robot with the help of tf:

geometry_msgs::TransformStamped transform;
transform = tf_buffer_.lookupTransform("map", "base_link", ros::Time(0));

But the error message shows, that map is not found:

"map" passed to lookupTransform argument target_frame does not exist.

I tried to run fake_localization for generating the world map via:

rosparam set /fake_localization/odom_frame_id odom_combined
rosparam set /fake_localization/base_frame_id base_footprint
rosrun fake_localization fake_localization

but it's neither showing any output nor working for my code and still generating the error message.

How could I fix this? Any suggestions?

edit retag flag offensive close merge delete