Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map broken when use ros2_control #1243

Closed
AnhHazz opened this issue Nov 23, 2024 · 6 comments
Closed

Map broken when use ros2_control #1243

AnhHazz opened this issue Nov 23, 2024 · 6 comments

Comments

@AnhHazz
Copy link

AnhHazz commented Nov 23, 2024

I'm following the demo with turtlebot3 model and my model. Both work fine when using libgazebo_ros_diff_drive.so
Screenshot from 2024-11-23 21-24-10
The rqt_graph show
Screenshot from 2024-11-23 22-38-06

But when i change to gazebo ros2_control plugin, it the map look really bad
Screenshot from 2024-11-23 22-26-32
The rqt_graph for this
image

I see that the only difference between those two plugins is the odom so maybe the problem is in there. But i haven't find out how to fix.
Edit: the hz of depth camera also decrease so much when running rtabmap, from 20hz to 5hz but this also happen with the demo
It also show warnings: [ WARN] (2024-11-23 23:06:05.325) Rtabmap.cpp:3036::process() Rejected loop closure 73 -> 102: Not enough inliers 14/20 (matches=24) between 73 and 102

Tks for reading and i hope you guys help me solve this problem

@matlabbe
Copy link
Member

Which example are you using? The one with wheel odometry and RGB-D image requires relatively good odometry. If the new plugin gives very bad odometry, it won't work as expected. The rejected loop closure is because there is not enough visual features.

@AnhHazz
Copy link
Author

AnhHazz commented Nov 24, 2024

Hi @matlabbe , i'm using turtlebot3_rgbd launch file which mean it's using differential_drive plugin. Everything in this example work perfectly with odometry and RGBD camera.

With the ros2_control plugin i use robot_localization to fusion plugin's odom and imu. It show in the under rqt_graph and the final odom looks quiet good. But the problem still the same

Should i change to another map with more feature? But in your example there still enough features to loop closure so i think it's not cause by map

@matlabbe
Copy link
Member

Switching to a map with more visual features won't fix the odometry drifting issue. Note that odometry is looking fine with ros2_control, maybe I didn't see if there was a bad loop closure. Can you share the database with the wrong result? Maybe the covariance in the resulting odometry topic is too large.

@AnhHazz
Copy link
Author

AnhHazz commented Nov 25, 2024

Switching to a map with more visual features won't fix the odometry drifting issue. Note that odometry is looking fine with ros2_control, maybe I didn't see if there was a bad loop closure. Can you share the database with the wrong result? Maybe the covariance in the resulting odometry topic is too large.

https://drive.google.com/file/d/12Rz1XZm0XG331Y1bCgEiyz2lvRp2JcPD/view?usp=drive_link
Here is the link to .db file. Is that the database you mentioned? If not please tell me what to do. I'm new to this

@matlabbe
Copy link
Member

matlabbe commented Dec 1, 2024

I think it looks normal. The odometry is slowly drifting, which is expected on any robots. There are no loop closures because the environment is mainly featureless. That kind of environment is however pretty good for lidar proximity detections. If you cannot use lidar, you may try with turtlebot3 "house" world.

@AnhHazz AnhHazz closed this as completed Dec 3, 2024
@AnhHazz
Copy link
Author

AnhHazz commented Dec 3, 2024

Thanks for your help. The turtlebot3_house world works as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants