Skip to content

fcanlnony/MAVROS-EXAMPLES

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAVROS EXAMPLES

简体中文


Environment

OS: Ubuntu 20.04

ROS Version: Noetic

PX4 Version: v1.17.0-alpha1

Gazebo Version: 11.15.1

Python Version: >= 3.8


Trajectory Examples

Basic Trajectories

These examples use position-only control with waypoint-based navigation:

  • Circle: Circle - Circular trajectory with constant radius
  • Rectangle: Rectangle - Rectangular trajectory with sharp corners
  • Cylinder: Cylinder - Cylindrical spiral ascending trajectory
  • Figure-8: Figure-8 - Figure-8 (infinity symbol) trajectory using Lissajous curves
  • Helix: Helix - Helical spiral with adjustable radius (cylindrical/conical)

Wind-Resistant Trajectories

These examples use position + velocity feedforward control for improved tracking accuracy in windy conditions:

  • Circle (Wind-Resistant): Circle Wind-Resist - Time-based circular trajectory with velocity feedforward
  • Rectangle (Wind-Resistant): Rectangle Wind-Resist - Rectangular trajectory with velocity feedforward and dynamic yaw
  • Cylinder (Wind-Resistant): Cylinder Wind-Resist - Time-based cylindrical spiral with velocity feedforward
  • Figure-8 (Wind-Resistant): Figure-8 Wind-Resist - Time-based figure-8 trajectory with velocity feedforward
  • Helix (Wind-Resistant): Helix Wind-Resist - Time-based helical spiral with velocity feedforward

Key Differences

Feature Basic Trajectories Wind-Resistant Trajectories
Control Method Position only Position + Velocity
Topic setpoint_position/local setpoint_raw/local
Message Type PoseStamped PositionTarget
Trajectory Logic Waypoint-based Time-based continuous
Wind Performance Moderate lag Reduced lag, better tracking

Quick Start

  1. Build the workspace:

    catkin_make
    source devel/setup.bash
  2. Launch a trajectory example:

    # Basic trajectory
    roslaunch src/circle/launch/circle.launch
    
    # Wind-resistant trajectory
    roslaunch src/circle_wind_resist/launch/circle_wind_resist.launch
  3. The drone will automatically:

    • Connect to PX4 SITL
    • Switch to OFFBOARD mode
    • Arm and execute the trajectory

Documentation

For detailed implementation information, please refer to:

  • CLAUDE.md - Project architecture and development guidelines
  • Individual trajectory README files linked above

License

This project is for educational and research purposes.

About

MAVROS examples for controlling PX4 Multirotor Drone

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •