Videos of the quadrotor flying may be seen (here) MAKE PUBLIC
- Follow the instructions (here) to set up the PX4 Autopilot Stack, ROS2, Micro XRCE-DDS Agent & Client, and build a ROS2 workspace with the necessary px4 communication repos
- In the same workspace with the communication folders as above, go to the /src/ folder and clone this repository
- In the root of the workspace, build everything as:
colcon build --packages-select newton_raphson_controller --symlink-install
- Create a conda environment with simpy, scipy, and numpy
- Run the SITL simulation
make px4_sitl gazebo-classic
- Run the Micro XRCE Agent as the bridge between ROS2 and PX4.
MicroXRCEAgent udp4 -p 8888
- The length of time the algorithm runs before the land sequence begins may be changed via the variable in the __init__ function at the top: self.time_before_land
- The reference path may be changed through the reffunc variable starting in line 400 of the nr_tracker_final.py file. New ones may be defined below in functions around line 646.
- The mass for the quadrotor may be changed for your specific hardware on the elif not self.sim statement in the __init__ at the top. Don't change for simulation unless you change the simulation model explicitly.
- The thrust/throttle mapping may be changed for your specific hardware on the get_throttle_command_from_force and get_force_from_throttle_command functions. Don't change for simulation unless you change the simulation model explicitly.
- In another terminal tab, source the environment from the root of your ROS2 workspace:
source install/setup.bash
- Activate your conda environment in this same terminal with sourcing (wardiNN is just the name I used for my environment :) )
conda activate wardiNN
- After sourcing and activating environment, run the file:
ros2 run newton_raphson_controller newton_raphson
- When prompted, answer [0/1] whether in simulation or hardware.
Please site (this paper (add link when done))
Evanns G. Morales-Cuadrado, Christian Llanes, Yorai Wardi, Samuel Coogan