iRobotEducation / create3_sim

ROS 2 Simulation for the iRobot® Create® 3 Educational Robot
BSD 3-Clause "New" or "Revised" License
110 stars 56 forks source link

Docking action succeeds but not centered on dock #221

Open slowrunner opened 11 months ago

slowrunner commented 11 months ago

The bug Docking action succeeds but Create3 model is not in valid "Charging Position" on dock

Screenshot 2023-12-09 at 11 07 47 AM

To Reproduce

  1. (Unbuntu 22.04, ROS 2 Humble or Galactic, update/upgrade, clone create3_sim main, rosdep, build, source setups, run classic gazebo)
    ros2 launch irobot_create_gazebo_bringup create3_gazebo.launch.py

Screenshot 2023-12-09 at 11 39 11 AM

  1. Undock, Move, Dock:
    • pub undock
      ros2 action send_goal /undock irobot_create_msgs/action/Undock "{}"

      Screenshot 2023-12-09 at 11 39 58 AM

![Screenshot 2023-12-09 at 11 40 24 AM](https://github.com/iRobotEducation/create3_sim/assets/8950202/a08b7197-e3a1-4c52-a22c-3711d99c2679)

- pub dock goal:

ros2 action send_goal /dock irobot_create_msgs/action/Dock "{}"

(Or /DockServo for Galactic - same issue Galactic or Humble)


![miss-docked](https://github.com/iRobotEducation/create3_sim/assets/8950202/e1883eaf-d73e-48e9-b9f9-a25fb9b0f447)

3. Echo dock_status, odom
![Screenshot 2023-12-09 at 11 07 25 AM](https://github.com/iRobotEducation/create3_sim/assets/8950202/e39df985-b19a-4369-a08b-ea611ae9a8f6)

**Expected behavior:**   Return to dock in "Charging Position"

**Additional context**

$ uname -a Linux FU22 6.2.0-37-generic #38~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 2 18:01:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

$ more /etc/os-release PRETTY_NAME="Ubuntu 22.04.3 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.3 LTS (Jammy Jellyfish)"

(20.04 used for Galactic test)

$ dpkg -l | grep gazebo11 ii libgazebo11:amd64 11.10.2+dfsg-1 amd64 Open Source Robotics Simulator - shared library

$ more package.xml <?xml version="1.0"?> <?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematype ns="http://www.w3.org/2001/XMLSchema"?>

irobot_create_gazebo_sim 2.0.0 ``` Update: I see [that this was first reported two years ago](https://github.com/iRobotEducation/create3_sim/issues/142#issue-1085815249), not closed as working as designed and not fixed. Is this actually working as designed? Does the simulation odometry error approximate what is seen with the physical Create3?
slowrunner commented 11 months ago

Suggest adding a reset of odometry when dock status docked changes from false to true. This will allow the “drift” but correct the odometry based on known “localization”.