Skip to content

WaliaRohan/px4_nav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

px4_nav

ROS 2 navigation package for PX4-based aerial vehicles with waypoint following and obstacle avoidance logic.
Designed for use with PX4 SITL and Gazebo, but extensible to real hardware.

Prerequisites

Recommended environment:

  • Ubuntu 22.04
  • ROS 2 Humble

Required dependencies:

  • PX4 Autopilot
  • px4_msgs (PX4 ROS 2 message definitions)
  • Micro XRCE-DDS Agent (PX4 ↔ ROS 2 communication)
  • Gazebo (for SITL simulation)

Useful references:

Setup

1. Install PX4 Autopilot

git clone https://github.com/PX4/PX4-Autopilot.git --recursive
cd PX4-Autopilot
bash ./Tools/setup/ubuntu.sh

Restart your terminal after installation.

2. Create ROS 2 Workspace

mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src

Clone required packages:

git clone https://github.com/WaliaRohan/px4_nav.git
git clone https://github.com/PX4/px4_msgs.git

3. Build

cd ~/ros2_ws
source /opt/ros/humble/setup.bash
colcon build
source install/setup.bash

Running (PX4 SITL)

1. Start PX4 SITL

In a separate terminal:

cd PX4-Autopilot
make px4_sitl gazebo

2. Start Micro XRCE-DDS Agent

In another terminal:

MicroXRCEAgent udp4 -p 8888

3. Run Navigation Node

source ~/ros2_ws/install/setup.bash
ros2 run px4_nav <node_executable>

Replace <node_executable> with the actual executable name defined in CMakeLists.txt.

Notes

  • This package assumes PX4 offboard control via ROS 2 topics.
  • Message interfaces are defined using px4_msgs.

About

ROS2 package for px4 navigation with obstacle avoidance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors