Skip to content

evannsm/MoralesCuadrado_ACC2024

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

MoralesCuadrado_ACC2024

Videos of the quadrotor flying may be seen (here) MAKE PUBLIC

Preliminary

  1. 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
  2. In the same workspace with the communication folders as above, go to the /src/ folder and clone this repository
  3. In the root of the workspace, build everything as:
colcon build --packages-select newton_raphson_controller --symlink-install
  1. Create a conda environment with simpy, scipy, and numpy

Simulation Run and Communication (simulation)

  1. Run the SITL simulation
make px4_sitl gazebo-classic
  1. Run the Micro XRCE Agent as the bridge between ROS2 and PX4.
MicroXRCEAgent udp4 -p 8888

Using The NR Controller Computation and Offboard Publisher

  1. 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
  2. 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.
  3. 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.
  4. 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.

Running the controller:

  1. In another terminal tab, source the environment from the root of your ROS2 workspace:
source install/setup.bash
  1. Activate your conda environment in this same terminal with sourcing (wardiNN is just the name I used for my environment :) )
conda activate wardiNN 
  1. After sourcing and activating environment, run the file:
ros2 run newton_raphson_controller newton_raphson
  1. When prompted, answer [0/1] whether in simulation or hardware.

Citing this Work:

Please site (this paper (add link when done))

Authors:

Evanns G. Morales-Cuadrado, Christian Llanes, Yorai Wardi, Samuel Coogan

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages