ROBOTIS-GIT / turtlebot3_simulations

Simulations for TurtleBot3
http://turtlebot3.robotis.com/
Apache License 2.0
309 stars 427 forks source link

waffle_pi cartographer failing #135

Closed GrueneNeun closed 3 years ago

GrueneNeun commented 3 years ago

I am running the Turtlebot3 in a gazebo environment with ros foxy on Ubuntu 20.04. While the Burger model is running fine within cartographer as far as i can tell (i let it run for over an hour), the waffle_pi model starts behaving weird some minutes after the start of cartographer:

cartographer_fail

I tried this on the ros2, ros2-devel and foxy-devel branch - all waffle_pi models behave the same way.

ROBOTIS-Will commented 3 years ago

Hi, It looks like the Rviz has some issue with filtering the IMU sensor data. Could you turn off the imu data option and see if it fixes the issue? https://github.com/ROBOTIS-GIT/turtlebot3/blob/foxy-devel/turtlebot3_cartographer/config/turtlebot3_lds_2d.lua#L52

GrueneNeun commented 3 years ago

Yes, turning off the imu data option clearly helps. But is the IMU sensor data different between the burger and the waffle_pi model?

ROBOTIS-Will commented 3 years ago

No, both Burger and Waffle Pi use the identical IMU as they are using the IMU on OpenCR1.0 board.

GrueneNeun commented 3 years ago

But where is the difference then? Burger model is running fine with IMU data option turned on while waffle_pi is not?

ROBOTIS-Will commented 3 years ago

There was a missing imu joint in the sdf file and this PR(#133) will fix the issue in the gazebo.

GrueneNeun commented 3 years ago

After seeing that you merged the PR into branch ros2-devel, i switched to this branch, pulled (i did see the change in the 4 sdf files), turned IMU data back on in the cartographer config and ran my usual setup:

  1. ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
  2. ros2 run turtlebot3_gazebo turtlebot3_drive
  3. ros2 launch turtlebot3_cartographer cartographer.launch.py use_sim_time:=True

in parallel terminals. While the bot moved very well and avoided objects as intended before the change, it now starts after a short time (usually under one minute) to move backwards, collide with the walls and flip over and over. If i switch to the burger model in all 3 terminals and run the same commands it still behaves as expected.

ROBOTIS-Will commented 3 years ago

@GrueneNeun Thanks for the update. I'm currently checking on the Waffle Pi. I'll update the package when the issue is resolved.

GrueneNeun commented 3 years ago

After this commit the waffle_pi behaves nearly as in the beginning - it avoids objects as expected, but the cartographer does the same flipping as before. Turning off the IMU option in cartographer still helps.

ROBOTIS-Will commented 3 years ago

@GrueneNeun Thank you for the feedback. I'll run the simulation again and see if I can reproduce the problem. Happy New Year!

=========Appended=========== I just ran a good 15 minutes cartographer SLAM with the latest foxy-devel commits of turtlebot3 and turtlebot3_simulations packages, but wasn't able to reproduce the issue. Screenshot from 2021-01-04 17-46-12

Could you check if your packages are up to date, especially the turtlebot3 package?

GrueneNeun commented 3 years ago

It seems i indeed forgot to update the turtlebot3 package - now everything runs as expected.

Thank you for your efforts ;)