cartographer-project / cartographer_ros

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

Cartographer with Pepper isn't mapping; transform lookup would require extrapolation into the future #950

Closed frederikscholz closed 6 years ago

frederikscholz commented 6 years ago

Hello,

my rosbag_validate the repository bag file of the robot driving around around the laboratory

I am trying to implement cartographer with the humanoid robot Pepper, but I can't seem to get it to work. When working with the actual robot, I get the following errors:

Lookup would require extrapolation into the future. Requested time 1531920071.319276300 but the latest data is at time 1531920071.242339395, when looking up transform from frame [base_link] to frame [base_footprint] [ WARN] [1532513380.649813399]: W0725 12:09:40.000000 23330 tf_bridge.cc:48] Lookup would require extrapolation into the future. Requested time 1531920071.319276300 but the latest data is at time 1531920071.242339395, when looking up transform from frame [base_link] to frame [base_footprint] [ WARN] [1532513381.925707926]: W0725 12:09:41.000000 23330 tf_bridge.cc:48] Lookup would require extrapolation into the future. Requested time 1531920072.697648400 but the latest data is at time 1531920072.332341064, when looking up transform from frame [CameraDepth_frame] to frame [base_footprint]

When simply playing the bagfiles, the errors disappear, and the scans seem to be showing in rviz, but no map is being generated.

I use naoqi driver, which is why I disabled robot_state_publisher. roswtf shows no errors, only the warnings

WARNING

The following node subscriptions are unconnected:

  • /cartographer_node:
    • /tf_static
  • /rviz:
    • /tf_static

I also use laserscan_kinect to transform the depth camera into a laser, which has shown a vast improvement over the robot's normal laserscans when working with gmapping.

If someone could take a look at my data and provide any pointers I'd be most grateful. Unfortunately I'm very new at this, so should anything be missing I'll provide it as soon as possible.

Thanks in advance, Frederik

gaschler commented 6 years ago

[ WARN] [1532513380.649813399]: W0725 12:09:40.000000 23330 tf_bridge.cc:48] Lookup would require extrapolation into the future. Requested time 1531920071.319276300 but the latest data is at time 1531920071.242339395, when looking up transform from frame [base_link] to frame [base_footprint]

You could try increasing options.lookup_transform_timeout_sec. But this is only a work around. The root cause is your tf publisher is too slow. Or, do you have separate machines with out-of-sync clocks?

fapsros@fapsros:~/bagfiles$ rosrun cartographer_ros cartographer_rosbag_validate -bag_filename pepper.bag E0725 11:43:54.523360 16316 rosbag_validate_main.cc:326] frame_id "base_footprint" is send on multiple topics. It was seen at least on /naoqi_driver_node/imu/base and /naoqi_driver_node/laser E0725 11:43:54.524031 16316 rosbag_validate_main.cc:326] frame_id "base_footprint" is send on multiple topics. It was seen at least on /naoqi_driver_node/imu/base and /naoqi_driver_node/laser E0725 11:43:54.524547 16316 rosbag_validate_main.cc:326] frame_id "base_footprint" is send on multiple topics. It was seen at least on /naoqi_driver_node/imu/base and /naoqi_driver_node/laser W0725 11:43:54.525095 16316 rosbag_validate_main.cc:352] frame_id "CameraDepth_frame" on topic /scan has serialization time 1531920058.852702645 but sensor time 1531920058.752381336 differing by -0.100321 s. E0725 11:43:54.530411 16316 rosbag_validate_main.cc:190] Sensor with frame_id "base_footprint" sends exactly the same range measurements multiple times. Range data at time 1531920099.756376996 equals preceding data with 4 points.

Why only 4 points in a scan?

E0725 11:43:54.530850 16316 rosbag_validate_main.cc:190] Sensor with frame_id "base_footprint" sends exactly the same range measurements multiple times. Range data at time 1531920103.994726082 equals preceding data with 4 points. E0725 11:43:54.531209 16316 rosbag_validate_main.cc:190] Sensor with frame_id "base_footprint" sends exactly the same range measurements multiple times. Range data at time 1531920108.632081386 equals preceding data with 4 points. Speicherzugriffsfehler (Speicherabzug geschrieben)

This is a segfault. Please compile the latest version and re-run with gdb or other debugger and post the stack trace.

(This my hide more issues because the validate tool crashed here.)

frederikscholz commented 6 years ago

Hello, thanks for the quick response!

You could try increasing options.lookup_transform_timeout_sec. But this is only a work around. The root cause is your tf publisher is too slow. Or, do you have separate machines with out-of-sync clocks?

The clocks of the PC and the Robot might be out of sync, I will try to confirm this the next time I'm in the lab

Why only 4 points in a scan?

I'm not entirely sure what this means; could you elaborate?

This is a segfault. Please compile the latest version and re-run with gdb or other debugger and post the stack trace.

I am a bit lost, sorry. Could you point me to where I could read up on this topic?

Again, thank you very much for your help!

frederikscholz commented 6 years ago

A clean reinstall of cartographer seems to have fixed the issue.