cartographer with odometry data

1,452 views
Skip to first unread message

Jochem Verboom

unread,
Sep 4, 2017, 9:12:29 AM9/4/17
to google-cartographer
I am currently trying to make cartographer working again (I had it setup in the past with relative ease). My current tf tree is: odom -> base_footprint -> base_link -> laser/imu (where base_footprint -> base_link is static). I am currently getting the following trace:

F0904 15:01:09.542251 12478 imu_tracker.cc:66] Check failed: (orientation_ * gravity_vector_).z() > 0. (nan vs. 0)
[FATAL] [1504530069.542569126, 1493972146.041634822]: F0904 15:01:09.000000 12478 imu_tracker.cc:66] Check failed: (orientation_ * gravity_vector_).z() > 0. (nan vs. 0)
*** Check failure stack trace: ***
    @     0x7f44e0f625cd  google::LogMessage::Fail()
    @     0x7f44e0f64433  google::LogMessage::SendToLog()
    @     0x7f44e0f6215b  google::LogMessage::Flush()
    @     0x7f44e0f64e1e  google::LogMessageFatal::~LogMessageFatal()
    @           0x54f5cb  cartographer::mapping::ImuTracker::AddImuLinearAccelerationObservation()
    @           0x54bdb6  cartographer::mapping::PoseExtrapolator::AdvanceImuTracker()
    @           0x54c295  cartographer::mapping::PoseExtrapolator::ExtrapolateRotation()
    @           0x54cb49  cartographer::mapping::PoseExtrapolator::ExtrapolatePose()
    @           0x509ef0  cartographer_ros::Node::PublishTrajectoryStates()
    @     0x7f44de7cbe3b  ros::TimerManager<>::TimerQueueCallback::call()
    @     0x7f44de7fecf0  ros::CallbackQueue::callOneCB()
    @     0x7f44de8000f3  ros::CallbackQueue::callAvailable()
    @     0x7f44de8586a1  ros::SingleThreadedSpinner::spin()
    @     0x7f44de83d73b  ros::spin()
    @           0x4fbf8b  cartographer_ros::(anonymous namespace)::Run()
    @           0x4fa554  main
    @     0x7f44dd256830  __libc_start_main
    @           0x4fbb79  _start
    @              (nil)  (unknown)
 
Which is weird as explicitly disabled the imu in the lua configuration file:

options = {
  map_builder = MAP_BUILDER,
  trajectory_builder = TRAJECTORY_BUILDER,
  map_frame = "map",
  tracking_frame = "base_footprint",
  published_frame = "odom",
  odom_frame = "odom",
  provide_odom_frame = false,
  use_odometry = true,
  num_laser_scans = 1,
  num_multi_echo_laser_scans = 0,
  num_subdivisions_per_laser_scan = 10,
  num_point_clouds = 0,
  lookup_transform_timeout_sec = 0.2,
  submap_publish_period_sec = 0.3,
  pose_publish_period_sec = 5e-1,
  trajectory_publish_period_sec = 30e-3,
}

MAP_BUILDER.use_trajectory_builder_2d = true
TRAJECTORY_BUILDER_2D.use_imu_data = false
TRAJECTORY_BUILDER_2D.scans_per_accumulation = 10

return options

The odometry + tf is currently performed by robot_localization (operating in 2D mode) and I did check the quaternion in the Odometry msgs (which looks fine, norm == 1). The cartographer_node subscribes to the "/odometry/filtered" topic from robot_localization. I am not sure what is going on here, (as I had it working (like 3 months ago) and it worked stellar. If you need any other data, let me know. Thanks!

Jochem Verboom

unread,
Sep 5, 2017, 5:54:38 AM9/5/17
to google-cartographer
I have tested the basic same mapping lua file with the 0.2.0 releases on github and the results were very good again. So I am not sure what is currently amiss?

Wolfgang Hess

unread,
Sep 6, 2017, 11:51:17 AM9/6/17
to Jochem Verboom, google-cartographer
Hi Jochem,

Even without an IMU, we use the ImuTracker code for integrating angular velocities, see https://github.com/googlecartographer/cartographer/blob/master/cartographer/mapping/pose_extrapolator.cc#L188. This should not lead to NaNs, so it seems there is something wrong either in the code or your data. It would be great if I could reproduce the issue. Can you provide:

1. A link to a Git repository containing a branch of `cartographer_ros`
   containing all the configuration, launch, and URDF files required to
   reproduce your issue.
2. A link to a bag file we can use to reproduce your issue.

This would be very helpful.

Thanks,
Wolfgang


On Tue, Sep 5, 2017 at 11:54 AM, Jochem Verboom <jlve...@gmail.com> wrote:
I have tested the basic same mapping lua file with the 0.2.0 releases on github and the results were very good again. So I am not sure what is currently amiss?

--
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/9cacdf82-37f0-4c32-9222-41fa3b04caa8%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Wolfgang Hess

Software Engineer

wh...@google.com


Google Germany GmbH

Erika-Mann-Str. 33

80636 Munich


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado 

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg

Jochem Verboom

unread,
Sep 11, 2017, 5:10:31 AM9/11/17
to google-cartographer
Hi,

I have added all files to the following repos (including bag file):

https://github.com/jochemverboom/cartographer_ros

Just use the demo_sam.launch file, (you also need robot_localization, I did not include it in the bagfile).

Regards,

Jochem

Op woensdag 6 september 2017 17:51:17 UTC+2 schreef Wolfgang Hess:
Hi Jochem,

Even without an IMU, we use the ImuTracker code for integrating angular velocities, see https://github.com/googlecartographer/cartographer/blob/master/cartographer/mapping/pose_extrapolator.cc#L188. This should not lead to NaNs, so it seems there is something wrong either in the code or your data. It would be great if I could reproduce the issue. Can you provide:

1. A link to a Git repository containing a branch of `cartographer_ros`
   containing all the configuration, launch, and URDF files required to
   reproduce your issue.
2. A link to a bag file we can use to reproduce your issue.

This would be very helpful.

Thanks,
Wolfgang

On Tue, Sep 5, 2017 at 11:54 AM, Jochem Verboom <jlve...@gmail.com> wrote:
I have tested the basic same mapping lua file with the 0.2.0 releases on github and the results were very good again. So I am not sure what is currently amiss?

--
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-ca...@googlegroups.com.
Message has been deleted

Wolfgang Hess

unread,
Oct 13, 2017, 12:04:44 PM10/13/17
to Jochem Verboom, google-cartographer
Hi Jochem,

On Tue, Oct 10, 2017 at 11:03 AM, Jochem Verboom <jlve...@gmail.com> wrote:
Hi Guys,

Any updates yet? I have tried checking the result with the most up-to-date version from github (for both cartographer & cartographer_ros), but the issues largely remained (as opposed to the 0.2.0 release). I noticed in the open house that you are going to focus on fixing the odometry issues.

I cannot reproduce the NaNs. I looked into your configuration though and it has one obvious issue:
num_subdivisions_per_laser_scan was set to 10, but not accumulated, i.e. a tenth of a laser scan was used for scan matching.
You should either set it to 1, or instead and preferably set:
TRAJECTORY_BUILDER_2D.scans_per_accumulation = 10

After fixing this, your odometry data still did not work very well, but disabling it and using
TRAJECTORY_BUILDER_2D.use_online_correlative_scan_matching = true
worked well.

Is there any particular reason you send IMU and odometry data through robot_localization instead of passing it directly to Cartographer?
Also looking at your raw odometry data "/diff_drive_controller/odom", it seems to me that the reported orientation is not accurate and drifts to the right. This seems not to be an issue with "/odometry/filtered".
The distances measured by your odometry also seem not to agree with your LIDAR. Did you calibrate your odometry?

Cheers,
Wolfgang

 

Thanks

Jochem

Op maandag 11 september 2017 11:10:31 UTC+2 schreef Jochem Verboom:
Hi,

I have added all files to the following repos (including bag file):

https://github.com/jochemverboom/cartographer_ros

Just use the demo_sam.launch file, (you also need robot_localization, I did not include it in the bagfile).

Regards,

Jochem

Op woensdag 6 september 2017 17:51:17 UTC+2 schreef Wolfgang Hess:
Hi Jochem,

Even without an IMU, we use the ImuTracker code for integrating angular velocities, see https://github.com/googlecartographer/cartographer/blob/master/cartographer/mapping/pose_extrapolator.cc#L188. This should not lead to NaNs, so it seems there is something wrong either in the code or your data. It would be great if I could reproduce the issue. Can you provide:

1. A link to a Git repository containing a branch of `cartographer_ros`
   containing all the configuration, launch, and URDF files required to
   reproduce your issue.
2. A link to a bag file we can use to reproduce your issue.

This would be very helpful.

Thanks,
Wolfgang

On Tue, Sep 5, 2017 at 11:54 AM, Jochem Verboom <jlve...@gmail.com> wrote:
I have tested the basic same mapping lua file with the 0.2.0 releases on github and the results were very good again. So I am not sure what is currently amiss?

--
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+unsubscribe...@googlegroups.com.

To post to this group, send email to google-ca...@googlegroups.com.



--

Wolfgang Hess

Software Engineer

wh...@google.com


Google Germany GmbH

Erika-Mann-Str. 33

80636 Munich


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado 

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg

--
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+unsubscribe...@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/66adca31-f29c-4ae4-8551-fdda9f048201%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jihoon Lee

unread,
Oct 13, 2017, 1:06:08 PM10/13/17
to Wolfgang Hess, Jochem Verboom, google-cartographer
Hello all,

I just experienced the same issue today. I found that my odometry data contains invalid quaternion(x,y,z,w)=(0,0,0,0) and caused nan value while computing orientation_ in pose extra polatot.

So, i would suggest to check if you are feeding if any invalid quaternion data in either imu or odometry.

Meanwhile, it would be nice to have a check or correction for 0,0,0,0 quaternion in cartographer_ros.

Jihoon
To unsubscribe from this group and stop receiving emails from it, send an email to google-cartogra...@googlegroups.com.

To post to this group, send email to google-ca...@googlegroups.com.

Wolfgang Hess

unread,
Oct 16, 2017, 7:42:39 AM10/16/17
to Jihoon Lee, Jochem Verboom, google-cartographer
Hi,

On Fri, Oct 13, 2017 at 7:06 PM, Jihoon Lee <jihoon...@gmail.com> wrote:
Hello all,

I just experienced the same issue today. I found that my odometry data contains invalid quaternion(x,y,z,w)=(0,0,0,0) and caused nan value while computing orientation_ in pose extra polatot.

So, i would suggest to check if you are feeding if any invalid quaternion data in either imu or odometry.

I'm adding a CHECK in https://github.com/googlecartographer/cartographer/pull/588, but it probably also makes sense to add a ROS specific one to rosbag_validate and the ROS nodes.

Cheers,
Wolfgang

 

Meanwhile, it would be nice to have a check or correction for 0,0,0,0 quaternion in cartographer_ros.

Jihoon
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.
Reply all
Reply to author
Forward
0 new messages