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.