This project implements autonomous navigation using ROS. It builds over the simulation environment provided by Virtual RobotX (VRX) challenge.
The USV is equipped with a LIDAR and IMU sensor. The acceleration readings from IMU sensor helps localize the robot using the robot_localization package and the point cloud from LIDAR sensor is converted to a laser scan for detecting obstacles around.
Features added:
Autonomous navigation using move_base package with obstacle avoidance.
A navigation sequence written in C++, given a list goal to move_base node the robot goes to each goal and reports back a success or failure feedback, it serving as a template for users for further development.
This script can work for both with and without obstacle cases, as only move_base is running in background to send navigation goals to controllers. It utilizes ROS action, move_base. It accepts goal from client as input and attempts to move the USV to the specified position/orientation in the world.
Challenge: Most ROS packages are written w.r.t wheeled robots, and hence the parameters are also in accordance to it. A USV doesn't have wheels but thrusters instead to push it in water current. VRX has provided a thrust2twist node to convert thrust commands to equivalent geometry twist commands.
The following nodes exist: robot state publisher, joint state publisher, tf, localization, odom filter node, odom tf, point cloud to laser scan
I found three different ways of performing autonomous navigation:
1. With a pre-built known map: gmapping for building map and then amcl and move_base to navigate
2. Building and saving map simultaneously while autonomously navigating and exploring environment: slam and move_base to map and navigate simultaneously or RTAB Map and move_base
3. Without a known map, mapless navigation: just pure move_base navigation, obstacles are avoided on exploration but map and obstacle information is lost globally
Moving forward with the third approach, without a known map. Dynamic Window Approach (DWA), dwa_local_planner has been used. Given a global plan to follow and a costmap, the local planner produces velocity commands to send to a mobile base. DWA generates control velocities to achieve a goal position by using the dynamic model of the robot to optimize the distance to obstacles, its velocity, and the heading towards the goal.
The basic idea of the Dynamic Window Approach (DWA) algorithm is as follows:
Discretely sample in the robot's control space (dx, dy, dtheta)
For each sampled velocity, perform forward simulation from the robot's current state to predict what would happen if the sampled velocity were applied for some (short) period of time.
Evaluate (score) each trajectory resulting from the forward simulation, using a metric that incorporates characteristics such as: proximity to obstacles, proximity to the goal, proximity to the global path, and speed. Discard illegal trajectories (those that collide with obstacles).
Pick the highest-scoring trajectory and send the associated velocity to the mobile base.
Rinse and repeat.