How to launch cartographer on my own .bag - RVIZ with missing tf

asked 2019-02-20 09:06:03 -0500

goeldisandro gravatar image

I m relatively new to ROS and thank you in advance for your help

just as a reference; as soon as cartographer is working with the point cloud data i d like also to include the odom data an do a few studies about the quality of the generated Maps.

I went through the tutorials from Google Cartographer ( https://google-cartographer-ros.readt... ). As long as i tried it with the given .bag files everything went well.

Now i am trying to launch it with my own .bag file, which is just a short example and only recorded with a velodyne VLP 16. The important files are located in; https://github.com/goeldisandro/SLAM

The validation of the .bag did not showed some concerns as far as i see.

When i now try to launch it with the command; roslaunch cartographer_ros offline_my_robot.launch bag_filenames:=${HOME}/bagfiles/2019-01-10-14-37-16.bag rviz shows up but with the Global Status: Warn No tf data. Actual error: Fixed Frame [map] does not exist

I think that the problem might occur, because i do not have a tf transformation. I already made the tf tutorials from ROS, but i do not know how to adapt it on my Situation. Is there a place, where i find some similar projects? Or do i just have to make a change in RViz?

everything is launched on a linux laptop with ros kinetic

Thanks for your help and greetings from Switzerland

Sandro

edit retag flag offensive close merge delete

Comments

Hi @goeldisandro, Did you solve the problem please ? I'm having exactly the same problem as the one you described here.. please feel free to hit me up

hachbani gravatar image hachbani  ( 2019-06-10 15:57:46 -0500 )edit

Hi there The problem was with the urdf File. When there is no correct tree, the cartographer node won`t run. This results in no published frame map. You could have a look at my actual Git: https://github.com/goeldisandro/auton... The cartographer parts should work just fine.

Greetings from Switzerland

goeldisandro gravatar image goeldisandro  ( 2019-07-10 03:48:22 -0500 )edit

Hi @goeldisandro How did you generate the urdf file for the bag ?

Vignesh_93 gravatar image Vignesh_93  ( 2020-12-28 09:10:40 -0500 )edit

I had tf in my list of topics, so I assume I need not build a urdf file. Please find my launch file and my lua file for the configuration. lua file:

include "map_builder.lua" include "trajectory_builder.lua"

options = { map_builder = MAP_BUILDER, trajectory_builder = TRAJECTORY_BUILDER, map_frame = "map", tracking_frame = "base_link", published_frame = "base_link", odom_frame = "odom", provide_odom_frame = true, publish_frame_projected_to_2d = false, use_pose_extrapolator = true, use_odometry = true, use_nav_sat = false, use_landmarks = false, publish_to_tf = true, num_laser_scans = 1, num_multi_echo_laser_scans = 0, num_subdivisions_per_laser_scan = 100, num_point_clouds = 0, lookup_transform_timeout_sec = 0.2, submap_publish_period_sec = 0.3, pose_publish_period_sec = 5e-3, trajectory_publish_period_sec = 30e-3, rangefinder_sampling_ratio = 1., odometry_sampling_ratio = 1., fixed_frame_pose_sampling_ratio = 1.,

Vignesh_93 gravatar image Vignesh_93  ( 2020-12-28 09:18:52 -0500 )edit

continued.. imu_sampling_ratio = 1., landmarks_sampling_ratio = 1., }

MAP_BUILDER.use_trajectory_builder_2d = true TRAJECTORY_BUILDER_2D.num_accumulated_range_data = 10

return options

Launch file : <launch> <node name="cartographer_node" pkg="cartographer_ros" type="cartographer_node" args=" -configuration_directory $(find cartographer_ros)/configuration_files -configuration_basename turtlebotBag.lua" output="screen"> </node>
<node name="rviz" pkg="rviz" type="rviz" required="true" args="-d $(find cartographer_ros)/configuration_files/my_robot_2d.rviz"/>

<node name="cartographer_occupancy_grid_node" pkg="cartographer_ros" type="cartographer_occupancy_grid_node" args="-resolution 0.05"/> <node name="playbag" pkg="rosbag" type="play" args="--clock $(arg bag_filename)"/> </launch>

Vignesh_93 gravatar image Vignesh_93  ( 2020-12-28 09:20:27 -0500 )edit