Obstacle avoidance failing with rplidar

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Obstacle avoidance failing with rplidar

aldux
Hi!

I have a turtlebot 2 with a kinect v1 and a rplidar a2.

When launching the rtabmap demo launch with kinect, the map is created and the obstacle avoidance works flawlessly, its amazing!

When switching to lidar, I removed the /scan part on the 3dsensor.launch of the turtlebot bringup and I'm able to generate a nice map, the lidar works nicely. But the problem is that obstacle avoidance is not working... if a new object (I use a garbage can) is in front of the robot path it will go straight and crash to it, while with the kinect only the robot replans in order to avoid the garbage can...

Maybe I integrated the lidar in an incorrect way?
Reply | Threaded
Open this post in threaded view
|

Re: Obstacle avoidance failing with rplidar

matlabbe
Administrator
Hi,
Do you see the obstacle in rtabmap's occupancy grid map? If yes, you may check if move_base connects to new scan topic to update the local costmaps.

Cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Obstacle avoidance failing with rplidar

aldux
yes, I can see the obstacle...

Where do I check if the move_base connects to the new scan topic??

Thanks for the reply!
Reply | Threaded
Open this post in threaded view
|

Re: Obstacle avoidance failing with rplidar

matlabbe
Administrator
Look at the local costmap params yaml file loaded by move_base. With rqt_graph, you would see move_base subscribing to your new scan topic.
Reply | Threaded
Open this post in threaded view
|

Re: Obstacle avoidance failing with rplidar

aldux
Thanks!

Attached is my graph... /scan is connected to /rtabmap and to /move_base...

Maybe the rate of the lidar (10hz) is not enough to make it respond to obstacles?

Reply | Threaded
Open this post in threaded view
|

Re: Obstacle avoidance failing with rplidar

matlabbe
Administrator
This post was updated on .
To help to debug, show the local and global costmaps in rviz. You will see if the global costmap matches the map of rtabmap, and also see if the local costmap sees the same obstacles.
Reply | Threaded
Open this post in threaded view
|

Re: Obstacle avoidance failing with rplidar

aldux
Hi!

What I end up using was the next:

- scan of lidar to rtabmap (different namespace)
- scan of kinect to move_base

now the robot is mapping using the lidar and making obstacle avoidance using kinect... it works nicely!