Cartographer with custom files not running

335 views
Skip to first unread message

mona.bui...@gmail.com

unread,
Oct 27, 2017, 11:56:32 AM10/27/17
to google-cartographer
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
cartographer_test_3D_SL2_SIM.lua
cartographer_test_3D_bag.launch
cartographer_test_3D.urdf
remapping.py
screenshot_rqt_graph.png

Holger Rapp

unread,
Oct 30, 2017, 4:22:03 AM10/30/17
to mona.bui...@gmail.com, google-cartographer

​Hi!​

On Fri, Oct 27, 2017 at 5:56 PM, <mona.bui...@gmail.com> wrote:
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).

​This is unconventional and potentially wasteful. The ROS way of doing this is using topic remapping, which we do in many of our launch files as well. ​The way to deal with different frame_ids is to provide a correct URDF which represent the extrinsics of your robot.
​​

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.

​Yes, that is the case if SLAM is not running. Without the full console output of Cartographer it is unclear what is wrong though. ​If you'd like to have this investigated, please open an issue on cartographer_ros, provide all the information asked for in the text template - including bag file and command line that you are running. Put all text files in a GitHub repo based on cartographer_ros, so we can see what changes you made to your setup.


--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsub...@googlegroups.com.
To post to this group, send email to google-cartographer@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cartographer/37cc6136-bf71-486c-af62-5e30e4d39327%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Google Germany GmbH
Erika-Mann-Straße 33
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

mona.bui...@gmail.com

unread,
Oct 30, 2017, 5:00:15 PM10/30/17
to google-cartographer
Hi !

Thank you for your answer. My bagfile data comes from simulations which are unfortunately confidential, which is why I cannot display them here. I know I could have used topic remapping, but I wanted the other team members to be able to use my files easily without needing to change the urdf and rviz files each time to match their topic and frame names from their own simulated data, and thought changing that small python script would be easier.

The SLAM is now running, the problem actually came from my data. It is a simulation of a robot circling an object and gathering lidar and imu data, and the robot was simply too fast, as soon as I simulated new data with a lower circling speed the SLAM started running. It's probably good for future users to know that their robot can't be too fast.

However now I have another issue : when I launch cartographer with the provided launch file, instead of seeing the robot circling the object, I see the object circling the robot, and therefore the SLAM cannot work properly and the submaps only create a big circle around the robot. I am linking the updated launch, urdf and config files. Any ideas ?

I launch it with the following command line : roslaunch cartographer_ros cartographer_test_3D_bag.launch bag_filename:=${HOME}/simulation/bagfile/my_complete_bag.bag


Thank you for your help !
Mona
cartographer_test_3D_bag.launch
cartographer_test_3D.urdf
cartographer_test_3D_SL2_SIM.lua

Holger Rapp

unread,
Nov 2, 2017, 5:44:29 AM11/2/17
to mona.bui...@gmail.com, google-cartographer
On Mon, Oct 30, 2017 at 10:00 PM, <mona.bui...@gmail.com> wrote:
Hi !

Thank you for your answer. My bagfile data comes from simulations which are unfortunately confidential, which is why I cannot display them here. I know I could have used topic remapping, but I wanted the other team members to be able to use my files easily without needing to change the urdf and rviz files each time to match their topic and frame names from their own simulated data, and thought changing that small python script would be easier.

The SLAM is now running, the problem actually came from my data. It is a simulation of a robot circling an object and gathering lidar and imu data, and the robot was simply too fast, as soon as I simulated new data with a lower circling speed the SLAM started running. It's probably good for future users to know that their robot can't be too fast.

​Not sure what too fast means though. We have been running this SLAM on cars on the highway fine.​

​​
However now I have another issue : when I launch cartographer with the provided launch file, instead of seeing the robot circling the object, I see the object circling the robot, and therefore the SLAM cannot work properly and the submaps only create a big circle around the robot. I am linking the updated launch, urdf and config files. Any ideas ?

​This is really hard to answer without seeing your data. In all likelyhood, this is what your data looks like to the SLAM. Maybe you have contradicting sensor information, i.e. wrong odometry, wrong IMU or something along these lines?
--
You received this message because you are subscribed to the Google Groups "google-cartographer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartographer+unsub...@googlegroups.com.
To post to this group, send email to google-cartographer@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages