cartographer-project / cartographer

Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
Apache License 2.0
7.09k stars 2.25k forks source link

cannot run cartographer ROS on my own bag #1555

Open 6yhnujm opened 5 years ago

6yhnujm commented 5 years ago

Hello n I run these two commands, I got an error: roslaunch cartographer_ros offline_my_robot.launch bag_filenames:=/home/nexteer/2019-03-22-15-22-32.bag

roslaunch cartographer_ros demo_my_robot_localization.launch load_state_filename:=/home/nexteer/2019-03-22-15-22-32.bag.pbstream bag_filename:=/home/nexteer/2019-03-22-15-22-32.bag

F0327 14:00:50.765429 16950 proto_stream_deserializer.cc:69] Check failed: posegraph.pose_graph().trajectory_size() == all_trajectory_builderoptions.all_trajectory_builder_options() .options_with_sensor_ids_size() (0 vs. 1) [FATAL] [1553709650.765687476]: F0327 14:00:50.000000 16950 proto_stream_deserializer.cc:69] Check failed: posegraph.pose_graph().trajectory_size() == all_trajectory_builderoptions.all_trajectory_builder_options() .options_with_sensor_ids_size() (0 vs. 1) Check failure stack trace: @ 0x7fe3cfd095cd google::LogMessage::Fail() @ 0x7fe3cfd0b433 google::LogMessage::SendToLog() @ 0x7fe3cfd0915b google::LogMessage::Flush() @ 0x7fe3cfd0be1e google::LogMessageFatal::~LogMessageFatal() @ 0x64d198 cartographer::io::ProtoStreamDeserializer::ProtoStreamDeserializer() @ 0x5f3b59 cartographer::mapping::MapBuilder::LoadState() @ 0x5cf0d3 cartographer_ros::MapBuilderBridge::LoadState() @ 0x5a0daf cartographer_ros::Node::LoadState() @ 0x59757a cartographer_ros::(anonymous namespace)::Run() @ 0x5944f4 main @ 0x7fe3cbd44830 __libc_start_main @ 0x596fe9 _start @ (nil) (unknown) [cartographer_node-2] process has died [pid 16950, exit code -6,

offline_my_robot.launch, and demo_my_robot_localization.launch are similar as the demo launch files. I follow the google tutorial to create these files. I have a velodyne and a IMU when I recorded the bag. I made the changes in the lua, and launch files.

I set num_point_clouds = 1, (I only use 1 velodyne). In launch file, I made change,

Could anyone help me solve this problem? Thanks.

//-------offline_my_robot.launch----------------------------------------

//---------demo_my_robot_localization.launch-----------------

aunsid commented 5 years ago

Hey,

I received the same error message were you able to resolve this?

Loading saved state '/home/csm/slam_ws/install_isolated/share/cartographer_ros/bags/new_mag.bag.pbstream'... F0729 17:24:26.216395 23063 proto_stream_deserializer.cc:69] Check failed: pose_graph_.pose_graph().trajectory_size() == all_trajectory_builder_options_.all_trajectory_builder_options() .options_with_sensor_ids_size() (0 vs. 1) [FATAL] [1564442666.216625153]: F0729 17:24:26.000000 23063 proto_stream_deserializer.cc:69] Check failed: pose_graph_.pose_graph().trajectory_size() == all_trajectory_builder_options_.all_trajectory_builder_options() .options_with_sensor_ids_size() (0 vs. 1) *** Check failure stack trace: *** @ 0x7efedec5e5cd google::LogMessage::Fail() @ 0x7efedec60433 google::LogMessage::SendToLog() @ 0x7efedec5e15b google::LogMessage::Flush() @ 0x7efedec60e1e google::LogMessageFatal::~LogMessageFatal() @ 0x6f68f8 cartographer::io::ProtoStreamDeserializer::ProtoStreamDeserializer() @ 0x5f04b9 cartographer::mapping::MapBuilder::LoadState() @ 0x5d1553 cartographer_ros::MapBuilderBridge::LoadState() @ 0x59e35f cartographer_ros::Node::LoadState() @ 0x59756a cartographer_ros::(anonymous namespace)::Run() @ 0x5944e4 main @ 0x7efedafac830 __libc_start_main @ 0x596fd9 _start @ (nil) (unknown) [cartographer_node-2] process has died [pid 23063, exit code -6, cmd /home/csm/slam_ws/install_isolated/lib/cartographer_ros/cartographer_node -configuration_directory /home/csm/slam_ws/install_isolated/share/cartographer_ros/configuration_files -configuration_basename my_robot_localization_aun.lua -load_state_filename /home/csm/slam_ws/install_isolated/share/cartographer_ros/bags/new_mag.bag.pbstream points2:=/os1_node/points imu:=/os1_node/imu __name:=cartographer_node __log:=/home/csm/.ros/log/00f102d4-b258-11e9-a7f7-54bef7245d59/cartographer_node-2.log]. log file: /home/csm/.ros/log/00f102d4-b258-11e9-a7f7-54bef7245d59/cartographer_node-2*.log

My Launch file:

'

<node name="cartographer_node" pkg="cartographer_ros" type="cartographer_node" args=" -configuration_directory $(find cartographer_ros)/configuration_files -configuration_basename my_robot_localization_aun.lua -load_state_filename $(arg load_state_filename)" output="screen">

<remap from="points2" to="/os1_node/points" />
<remap from="imu" to="/os1_node/imu" />

<node name="cartographer_occupancy_grid_node" pkg="cartographer_ros" type="cartographer_occupancy_grid_node" args="-resolution 0.05" />

'