AutonomyLab / create_robot

ROS driver for iRobot Create 1 and 2.
http://www.autonomylab.org/create_autonomy
BSD 3-Clause "New" or "Revised" License
198 stars 165 forks source link

Odom is wrong on Create 1 #42

Closed mzahana closed 5 years ago

mzahana commented 6 years ago

Hi. I am working with Create 1 and no matter how the robot moves the only change in /odom is in pose.position.x only! all others are zeros. Also, the orientation is always x=0, y=0, z=0, w=1

I am building the package from source on ROS Kinetic/ Ubuntu 16

Here is an output of the odom topic, after i did some random moves:

header: 
  seq: 6659
  stamp: 
    secs: 1511204611
    nsecs: 762806633
  frame_id: odom
child_frame_id: base_footprint
pose: 
  pose: 
    position: 
      x: 1.17099511623
      y: 0.0
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: 0.0
      w: 1.0
  covariance: [0.6134979128837585, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 18.377765655517578, 0.0, 0.0, 0.0, 22.565868377685547, 0.0, 0.0, 1.7976931348623157e+308, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.7976931348623157e+308, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.7976931348623157e+308, 0.0, 0.0, 22.565868377685547, 0.0, 0.0, 0.0, 36.8668212890625]
twist: 
  twist: 
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 0.0
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.7976931348623157e+308, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.7976931348623157e+308, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.7976931348623157e+308, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
jacobperron commented 6 years ago

This has been reported previously #41. I recall experiencing the same issue with Create 1 previously. I can take another look into the code, but I'm pretty sure it is an error in the firmware.

I've been considering adding an option to the driver so that it will report integrated velocity commands as "odometry" (similar to the autolab-rapi driver).

mzahana commented 6 years ago

@jacobperron Thanks for your reply. Is upgrading the Create 1 firmware possible? If yes, is there a newer firmware that fixes this problem? Thanks.

jacobperron commented 6 years ago

@mzahana iRobot no longer supports firmware upgrades for Create 1. I am not aware of a way to do so.

I've just pushed an experimental change to the branch feat-odom-estimate. I have not tested it yet and won't have access to a Create 1 until next week, but you're welcome to give it a try. The idea is to integrate the requested velocity commands to produce the odometry estimate. This means that pushing the robot around by hand with have no affect on odometry, but driving it around should produce a better estimate than the firmware.