Skip to content

AkshayArjun/FlyingArm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manipulator Drone

A ROS 2 package that integrates PX4 SITL, Gazebo Harmonic, and ros2_control for simulating and controlling a manipulator-equipped drone.


🚀 Overview

This package provides:

  • PX4 + Gazebo SITL integration.
  • ros2_control interface for actuators.
  • Support for custom URDF/Xacro and SDF models.

The goal is to simulate and control a quadrotor drone with an attached manipulator arm using ROS 2 and Gazebo.


📦 Requirements


⚙️ Installation

  1. Clone PX4 and setup SITL with ROS 2:

    git clone https://github.com/PX4/PX4-Autopilot.git --recursive
    cd PX4-Autopilot
    make px4_sitl gz_x500
  2. Install ROS 2 Humble (desktop version recommended).

  3. Source install Gazebo Harmonic:

    git clone https://github.com/gazebosim/gz-sim -b harmonic
    colcon build --merge-install
  4. Install gz_ros2_control:

    git clone https://github.com/ros-controls/gz_ros2_control.git
    colcon build --merge-install
  5. Export required environment variables:

    export GZ_SIM_RESOURCE_PATH=$HOME/iiit_ws/install/darm/share/darm/models:$GZ_SIM_RESOURCE_PATH
    export GZ_SIM_SYSTEM_PLUGIN_PATH=$HOME/gz_ros2_control_ws/install/gz_ros2_control/lib:$GZ_SIM_SYSTEM_PLUGIN_PATH
  6. Build this package:

    colcon build --packages-select darm
    source install/setup.bash

▶️ Usage

To launch the simulation.

#inside PX4-Autopilot:
prime-run make px4_sitl gz_x500 

#launch qgc

#inside arm workspace
prime-run ros2 launch darm trial.launch.py 

#inside a serperate terminal 
ros2 run darm thrust

#launch xrce dds agent in a seperate terminal
MicroXRCEAgent udp4 -p 8888

#finally publish commands to the arm topics once everything is initialised
ros2 topic pub /{insert controller name here}_effort_controller/commands std_msgs/msg/Float64MultiArray "{data: [0]}"

This will:

  • Spawn the x500_base drone model with manipulator.
  • Launch ros2_control with the configured controllers.

🛠 Troubleshooting

Check the Error.md file for common issues and their fixes.

Example:

Error Fix Reason
The supplied world name [world] is reserved Rename world in SDF world is a reserved keyword in Gazebo
Could not load resource ... Unable to open file Ensure meshes are installed under share/darm/urdf/... Symlink issues during build
Failed to load system plugin [gz_ros2_control-system] Export GZ_SIM_SYSTEM_PLUGIN_PATH Plugin library path not found

📚 Resources


✨ TODO

  • Add unit tests for controller plugins.
  • Extend manipulator control with MoveIt.
  • Automate mesh/URDF installation without symlinks.

📝 License

This project is licensed under the Apache 2.0 License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors