P3DX Potential Fields Navigation

ROS package for autonomous navigation of Pioneer P3-DX robot using potential fields algorithm in Gazebo simulation

Project Overview

This project implements an autonomous navigation system for the Pioneer P3-DX robot using the potential fields algorithm. The system enables the robot to navigate through complex environments while avoiding obstacles and reaching specified goals autonomously.

The potential fields approach creates attractive forces toward the goal and repulsive forces away from obstacles, resulting in smooth and efficient navigation paths. The implementation includes real-time visualization tools and interactive goal setting capabilities.

The project demonstrates advanced robotics concepts including autonomous navigation, obstacle avoidance, and real-time path planning. It's built using ROS (Robot Operating System) and integrates with Gazebo simulation environment for testing and validation.

Key Features:

  • Autonomous obstacle avoidance using potential fields
  • Real-time path planning and navigation
  • Interactive goal setting via terminal
  • Real-time visualization tools
  • Gazebo simulation integration
  • Customizable algorithm parameters

Demo:

P3DX Potential Fields Navigation Demo

Real-time demonstration of the potential fields navigation algorithm in action

Language Python
Category Robotics & AI
Application Autonomous Navigation
License MIT
Technologies
Python ROS Gazebo Robotics Autonomous Navigation

Technical Implementation

Core Algorithm

The potential fields algorithm creates two types of forces:

  • Attractive Force: Pulls the robot toward the goal position
  • Repulsive Force: Pushes the robot away from detected obstacles

The resulting force vector determines the robot's movement direction and velocity.

System Architecture

The system follows a modular architecture with three main components:

  • Sensor Input: Laser scan data and odometry from the robot
  • Potential Fields: Force calculation algorithm for navigation
  • Motion Control: Velocity commands sent to the robot

Key Parameters

The algorithm can be tuned using several configurable parameters:

  • K_att: Attractive force gain - controls how strongly the robot is pulled toward the goal
  • K_rep: Repulsive force gain - controls how strongly the robot avoids obstacles
  • epsilon_0: Obstacle influence distance - determines how far obstacles affect the robot
  • v_max: Maximum linear velocity - limits the robot's forward/backward speed
  • omega_max: Maximum angular velocity - limits the robot's turning speed
  • tol: Goal tolerance distance - how close the robot must get to reach the goal

Usage Instructions

1. Basic Simulation

Launch the Gazebo simulation with potential fields navigation:

roslaunch p3dx_potential_fields p3dx_world.launch

2. Start Potential Fields

In a new terminal, start the potential fields algorithm:

rosrun p3dx_potential_fields p3dx_potential_field.py

Enter goal coordinates when prompted in the terminal.

3. Visualization

Start the visualization tool in another terminal:

rosrun p3dx_potential_fields p3dx_view.py

In the visualization window:

  • Press SPACE to clear the visualization
  • Use mouse scroll to zoom in/out

ROS Nodes

p3dx_potential_field.py

Main node implementing the potential field algorithm. Subscribes to robot pose and laser data, publishes velocity commands for autonomous navigation.

Subscribes to: /RosAria/odom, /RosAria/laser/scan Publishes to: /RosAria/cmd_vel

p3dx_view.py

Visualization tool for monitoring robot behavior in real-time. Displays robot position, obstacles, and navigation trajectory.

Robot position (blue) Obstacles (red) Trajectory (green)

potential_fields_and_visualization.py

Combined algorithm and visualization implementation with interactive goal input via terminal for comprehensive testing and demonstration.

Potential field algorithm Real-time visualization Interactive goal input

Customization Options

World Modification

To change the simulation environment, modify the world files and update launch configurations to create different testing scenarios and environments.

Modify worlds/mundo_corredor.world Update launch file paths Add/remove obstacles

Algorithm Tuning

Optimize performance by adjusting algorithm parameters for different environments and robot capabilities.

Edit p3dx_potential_field.py Adjust force gains Modify velocity limits
Back to All Projects