ROS package for obstacle avoidance using a sidescan sonar. The aim of this obstacle avoidance package is to solely use the measurements from a 2D scanning sonar to move an underwater robot without colliding with any obstacle in the environment.
We will send the robot velocity commands in the
This package has been tested under Ubuntu 18.04 with ROS Melodic.
Implemented in potential_avoidance.py
We want to move an underwater robot in an unknown environment without colliding. For that, we have a sidescan sonar sensor whose measurements are being published in a sensor_msgs/LaserScan
topic. The topic's message content is outlined here.
The velocity comands will be sent through the geometry_msgs/Twist
topic named ${robot_namespace}/cmd_vel
, with values ranging between 0 and 1. The topic's message content is outlined here
In our potential-field like approach for obstacle avoidance, the obstacles will generate repulsive fields that will make the robot decrease the linear speed and/or rotate as the vehicle approaches them.
When a sonar beam collides with an obstacle, we will define a potential vector
The overall projection of the potential fields in the
We will obtain the new velocity vector
The robot can receive commands for linear velocity in
Linear velocity:
Angular velocity:
That is, the new linear velocity
Testing in the maze environment defined here, with uneven brick walls that challenge more the laser measurements. The video is speeded up by x10.
Note that only the 2D sonar is used, and the 3D sonar is displayed for visualization purposes only.
- Better tuning of parameters: higher linear velocity and smoother rotations.
- Handling symmetry of obstacles.