Hello everyone !
I am trying to use 3D SLAM with a bagfile of data containing Imu and PointClouds2 data, and publishing this data onto topics /mavros/imu/data and /scan_pc2. Since those were not associated with the usual cartographer frames, I wrote a small python script that reads those two topics and published the messages again onto the cartographer topics /imu and /points2, changing the original frame_id to the usual imu_link and laser_link used by cartographer. Other than that, my files are pretty close to the demo ones (which run fine on my computer).
However the SLAM doesn't seem to be running, because when I do roslaunch cartographer_ros cartographer_test_3D_bag.launch bag_filename:=${HOME}/simulation/bagfile/my_complete_bag.bag, rviz gives me the error : the frame [map] does not exist, and no messages are published on /tf.
Since I've taken care of my frames there are no warnings or errors in the console, and rosnode info cartographer_node gives :
-----
Node [/cartographer_node]
Publications:
* /constraint_list [visualization_msgs/MarkerArray]
* /submap_list [cartographer_ros_msgs/SubmapList]
* /scan_matched_points2 [sensor_msgs/PointCloud2]
* /rosout [rosgraph_msgs/Log]
* /tf [tf2_msgs/TFMessage]
* /trajectory_node_list [visualization_msgs/MarkerArray]
Subscriptions:
* /points2 [sensor_msgs/PointCloud2]
* /tf [tf2_msgs/TFMessage]
* /tf_static [tf2_msgs/TFMessage]
* /clock [rosgraph_msgs/Clock]
* /imu [sensor_msgs/Imu]
Services:
* /cartographer_node/get_loggers
* /start_trajectory
* /write_state
* /cartographer_node/set_logger_level
* /submap_query
* /finish_trajectory
contacting node
http://Anastacia-ubuntu:36507/ ...
Pid: 12220
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
* topic: /tf
* to: /cartographer_node
* direction: outbound
* transport: INTRAPROCESS
* topic: /clock
* to: /playbag (
http://Anastacia-ubuntu:35699/)
* direction: inbound
* transport: TCPROS
* topic: /tf
* to: /cartographer_node (
http://Anastacia-ubuntu:36507/)
* direction: inbound
* transport: INTRAPROCESS
* topic: /tf
* to: /robot_state_publisher (
http://Anastacia-ubuntu:35393/)
* direction: inbound
* transport: TCPROS
* topic: /tf_static
* to: /robot_state_publisher (
http://Anastacia-ubuntu:35393/)
* direction: inbound
* transport: TCPROS
* topic: /points2
* to: /my_remap (
http://Anastacia-ubuntu:45213/)
* direction: inbound
* transport: TCPROS
* topic: /imu
* to: /my_remap (
http://Anastacia-ubuntu:45213/)
* direction: inbound
* transport: TCPROS
My launch and config files, along with a screenshot of rqt_graph are included.
Any ideas ? That would be a big help !
Thank you !
Mona