Coder Social home page Coder Social logo

achuthankrishna / quad_controller Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 141.83 MB

PX4 Autopilot Velocity Controller and Teleoperation using ROS2 and C++

License: MIT License

CMake 5.01% C++ 90.67% Python 4.32%
controller px4-autopilot px4-ros2 ros2

quad_controller's Introduction

PX-4 off-board Velocity Control and Teleop

This package consists of C++ implementation of teleoperation and velocity controller for PX4 in ROS2. This project was inspired by python implementation done by : https://github.com/Jaeyoung-Lim/px4-offboard

px4-teleop

Prerequisites

  • ROS2 Humble
  • PX4 Autopilot
  • Micro XRCE-DDS Agent
  • px4_msgs
  • OpenCV (Further implementation of vison based obstacle avoidance)

Installations

Some of the steps to install the dependency packages :

Install PX4 Autopilot

To Install PX4 run this code

git clone https://github.com/PX4/PX4-Autopilot.git --recursive

Run this script in a bash shell to install everything

bash ./PX4-Autopilot/Tools/setup/ubuntu.sh

Restart once done

Install Dependencies

Install Python dependencies as mentioned in the PX4 Docs with this code

pip3 install kconfiglib
pip install --user jsonschema
pip install --user jinja2

Build Micro DDS

Micro DDS is used for communication between fastRTPS(ROS2) and u-ORB.

git clone https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
cd Micro-XRCE-DDS-Agent
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig /usr/local/lib/

Workspace Setup

  • Open your ROS2_wS
cd ~/ros2_px2/src
  • Clone the PX4_msgs repo inside src first. This helps in ROS messages for PX4 commands.Be sure you're in the src directory of your workspace and then run this code to clone in the px4_msgs repo
git clone https://github.com/PX4/px4_msgs.git
  • Clone the package inside SRC
git clone https://github.com/Achuthankrishna/quad_controller.git

Run this code to clone the repo

Building the Workspace

  • Before building these two packages, source your ROS2 installation . Run this code to do that
source /opt/ros/humble/setup.bash
  • Now build the packages
cd ..
colcon build
  • Source the workspace again
source install/setup.bash

Running the Code

  • Split your terminal into 3 parts. IN the forst part get into the PX4-autopilot folder and then type the following
make px4_sitl gazebo-classic_iris_depth_camera__warehouse

  • Then in the second terminal, lets start the udp4 agent for micro-ros connection to connect to port 8888. For in-depth theory, check out PX4 Documantation
micro-ros-agent udp4 --port 8888

  • In the Third terminal,Open our ros2 workspace, sourced and type the following
ros2 launch quad_off_board teleop_launch.py

Live Demo

PX-4

quad_controller's People

Contributors

achuthankrishna avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.