Servers by jDrones

Rover Object Avoidance using ROS for Path Planning

object-avoidance
rover

(rmackay9) #1

This is a first test of ArduPilot Rover-3.6 using ROS’s base local planner to do path planning around objects.

A rover moving around objects using ROS has been done before but what is special here is the improved integration with ArduPilot and the Ground station. The user can input the target directly into their normal ground station (by right-mouse-button clicking on the GCS map) instead of having to use ROS directly.

What is happening is the target position from the ground station is transmitted to mavros (with this extra change applied) to ROS’s navigation library (running on a TX2 on the vehicle). This library calculates the path around the objects and then sends velocity commands back to the flight controller. The flight controller is running Rover (in Guided mode) which then executes these lower level velocity commands and the vehicle moves to the target.

Instructions for setting up ROS with ArduPilot are here on the developer wiki. The page with specific object avoidance setup is here.

There are a few issues to be solved including figuring out why the Rover is moving so incredibly slowly. I suspect it is a configuration issue on the ROS side but perhaps it is something else.

We also want to get this working for multicopters as well.

Above is a follow-up video showing how ROS’s path planning can also be used from within Auto mode when GUIDED_ENABLED parameters are added to the mission (sorry the clip showing the mission setup was somehow truncated). When these commands are executed Rover continuously sends the target position to ROS and also accepts the low-level velocity commands from ROS just like it did in Guided mode. ArduPilot also checks it’s position and once it gets within WP_RADIUS of the point it moves onto the next command.

A number of issues are clear after doing this test:

  • ROS is constantly re-calculating the path because ArduPilot is sending the position target at 1hz and this causes the rover to get too close to objects. This is why the green path in the rviz view always starts at the vehicle’s current position. In the original Guided test the green line started at the vehicle’s original position. I think we will need a mavros change so the position is only resent to the path planner if the destination has changed
  • When the vehicle reached the destination it did not immediately turn around and travel back to waypoint2. Instead i had to manually set the active waypoint to waypoint2. The reason is because Rover’s WP_RADIUS parameter was only 0.2m while ROS’s path planner’s tolerance was set to 0.5m. This is just a configuration issue so not a big problem.

By the way, the vehicle is an AION Robotics R1 (ArduPilot Edition) with an NVidia TX2 running ROS, Cartographer, mavros, Base Local Planner. The Lidar in an RPLidarA2.

Special thanks to Mario Rodriguez from EAMSLab and Jaime Machuca from AION Robotics for help with the ROS setup.


Dev Call Mar 11 2019 2300 UTC
Dev Call Mar 11 2019 2300 UTC
(Thien Nguyen) #2

Thanks for the great work, Randy!

Regarding the moving speed of the rover, have you tried changing the parameters on the ROS side, specifically max_vel_x, accel_lim_x, acc_lim_theta? With $ rosrun rqt_reconfigure rqt_reconfigure you can change them in real time.

How do you think the rover would behave if we have obstacle avoidance running on ROS as well as ArduPilot?
I guess it would be fine if the two complements each other (i.e. ROS for long distance, static objects and path planning while ArduPilot avoids short range, moving obstacles), but there can be cases where they don’t agree and we might end up in a loop.


(rmackay9) #3

Hi @LuckyBird,

Txs for the suggestions on the ROS parameters. I poked around with those parameters a bit and I think I set max_vel_x to “5.0” (m/s) but it hasn’t helped much. Still, I know very little about ROS so I may have made a mistake. I certainly haven’t tried changing them in real-time. Txs!

ArduPilot Rover has two types of avoidance built-in,“Dodge” and “Simple”. I think Dodge won’t work well with this new method but “Simple” (which simply stops before hitting objects) should work. So ROS can do the high level path-planning and ArduPilot can continue to do the low level ensuring we don’t hit things.