cartographer-project / cartographer_ros

Provides ROS integration for Cartographer.
Apache License 2.0
1.67k stars 1.21k forks source link

How to make carto grapherwork with turtlebot simulator in a custom gazebo environment #837

Open samby707 opened 6 years ago

samby707 commented 6 years ago

I am trying to use cartographer with ros using a turtlebot simulator in a gazebo environment. I have launched a gazebo environment and have recorded a bag file. When I'm trying to use the demo launch file to create the slam using the bag file, I am getting errors. When I'm running the following command I'm getting this error. sambuddha@sambuddha-OABLN1786:~$ roslaunch cartographer_turtlebot turtlebot.launch ... logging to /home/sambuddha/.ros/log/43a978c6-478e-11e8-84b2-54ee75d43118/roslaunch-sambuddha-OABLN1786-3869.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

[/home/sambuddha/catkin_ws/src/cartographer_turtlebot/cartographer_turtlebot/launch/turtlebot.launch] requires the 'configuration_basename' arg to be set The traceback for the exception was written to the log file

I launch a world in gazebo using this command. sambuddha@sambuddha-OABLN1786:~$ roslaunch turtlebot_gazebo turtlebot_world.launch Then I use the following command to move the bot around in the environment. sambuddha@sambuddha-OABLN1786:~/bagfiles$ roslaunch turtlebot_teleop keyboard_teleop.launch Then I'm using the following command to record a bagfile. sambuddha@sambuddha-OABLN1786:~/bagfiles$ rosbag record -a Then I'm running the following command and getting the following error. sambuddha@sambuddha-OABLN1786:~$ roslaunch cartographer_turtlebot demo_depth_camera_3d.launch bag_filename:=${HOME}/bagfiles/2018-04-24-12-40-48.bag.active ... logging to /home/sambuddha/.ros/log/752eee08-4798-11e8-a803-54ee75d43118/roslaunch-sambuddha-OABLN1786-6157.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://sambuddha-OABLN1786:45470/

SUMMARY

PARAMETERS

NODES / cartographer_node (cartographer_ros/cartographer_node) cartographer_occupancy_grid_node (cartographer_ros/cartographer_occupancy_grid_node) cloudifier (nodelet/nodelet) dropper (topic_tools/drop) flat_world_imu_node (cartographer_turtlebot/cartographer_flat_world_imu_node) image_processing_manager (nodelet/nodelet) metricizer (nodelet/nodelet) playbag (rosbag/play) rectifier (nodelet/nodelet) rviz (rviz/rviz)

auto-starting new master process[master]: started with pid [6169] ROS_MASTER_URI=http://localhost:11311

setting /run_id to 752eee08-4798-11e8-a803-54ee75d43118 process[rosout-1]: started with pid [6182] started core service [/rosout] ERROR: cannot launch node of type [cartographer_ros/cartographer_node]: can't locate node [cartographer_node] in package [cartographer_ros] ERROR: cannot launch node of type [cartographer_ros/cartographer_occupancy_grid_node]: can't locate node [cartographer_occupancy_grid_node] in package [cartographer_ros] ERROR: cannot launch node of type [cartographer_turtlebot/cartographer_flat_world_imu_node]: can't locate node [cartographer_flat_world_imu_node] in package [cartographer_turtlebot] process[dropper-5]: started with pid [6200] process[image_processing_manager-6]: started with pid [6207] process[metricizer-7]: started with pid [6218] process[rectifier-8]: started with pid [6231] process[cloudifier-9]: started with pid [6237] process[rviz-10]: started with pid [6244] process[playbag-11]: started with pid [6251] [FATAL] [1524558076.816694557]: Error opening file: /home/sambuddha/bagfiles/2018-04-24-12-40-48.bag.active [playbag-11] process has died [pid 6251, exit code 1, cmd /opt/ros/indigo/lib/rosbag/play --clock /home/sambuddha/bagfiles/2018-04-24-12-40-48.bag.active name:=playbag log:=/home/sambuddha/.ros/log/752eee08-4798-11e8-a803-54ee75d43118/playbag-11.log]. log file: /home/sambuddha/.ros/log/752eee08-4798-11e8-a803-54ee75d43118/playbag-11*.log [ERROR] [1524558077.266996239]: PluginlibFactory: The plugin for class 'Submaps' failed to load. Error: Could not find library corresponding to plugin Submaps. Make sure the plugin description XML file has the correct name of the library and that the library actually exists.

Can you please help me debug this error?

cschuet commented 6 years ago

You need to provide a configuration_basename. Any of the filenames in this folder should do: https://github.com/googlecartographer/cartographer_turtlebot/tree/master/cartographer_turtlebot/configuration_files

samby707 commented 6 years ago

When I sourced the install/setup.bash the error went away. Now I'm getting warning in the terminal and error in rviz that fixed frame map doesn't exist. Also screenshot from 2018-04-24 14 03 47

This is the warning. [ WARN] [1524558846.444680548, 144.750000000]: W0424 14:04:06.000000 10545 tf_bridge.cc:52] Lookup would require extrapolation at time 144.690000000, but only time 145.240000000 is in the buffer, when looking up transform from frame [base_footprint] to frame [gyro_link]

samby707 commented 6 years ago

How to provide a configuration_basename? Where to provide it?