Coder Social home page Coder Social logo

clover_tools's Introduction

clover_tools

Useful ROS nodes and stuff for Clover drone kit, that is not included to the Raspberry Pi image.

Installation

Clone repository to the catkin workspace sources:

cd ~/catkin_ws/src
git clone https://github.com/CopterExpress/clover_tools.git

Execute catkin_make in catkin workspace directory and source environment setup files:

cd ~/catkin_ws
catkin_make
source devel/setup.bash

If you don't want to install all packages in catkin workspace, you can install specified package:

cd ~/catkin_ws
catkin_make --pkg <package_name>
source devel/setup.bash

clover_tools package

Nodes

interactive.py

Control the drone using interactive markers in Rviz!

rosrun clover_tools interactive.py

undistort_camera.py

Publish undistorted image from camera topic. Use calibration from camera_info topic or from file if specified. Undistorted image can be viewed with web_video_server.

usage: rosrun clover_tools undistort_camera.py [-h] [-f FILE] [namespace]

Publish undistorted image from camera topic. Use calibration from camera_info
topic or from file if specified.

positional arguments:
  namespace             Namespace of camera topics, default is /main_camera

optional arguments:
  -h, --help            show this help message and exit
  --file FILE, -f FILE  Path to file with calibration

clever_flight_routines package

Nodes

create_route.py

Create flying route by moving drone in space and recording its coordinates by triggering RC pitch stick (channel 2).

usage: rosrun clever_flight_routines create_route.py [-h] [-f FRAME_ID] [filename]

positional arguments:
  filename              Filename of route csv table. Default is route.csv.

optional arguments:
  -h, --help            show help message and exit
  -f FRAME_ID, --frame_id FRAME_ID
                        Coordinates will be recorded relative to frame_id
                        parameter. Default is map.

fly_route.py

Fly route from the csv table with x y z values.

usage: rosrun clever_flight_routines fly_route.py [-h] [-r] [-z HEIGHT] [-f FRAME_ID] [-s SPEED] [filename]

positional arguments:
  filename              Filename of the route csv table

optional arguments:
  -h, --help            show this help message and exit
  -r, --repeat          Program will repeat the route infinite if you use this
                        arg.
  -z HEIGHT, --height HEIGHT
                        Height of flight. Default is 1 m. If height is 'nan'
                        then the drone will takeoff to 1 m and fly on the
                        route point heights.
  -f FRAME_ID, --frame_id FRAME_ID
                        Coordinates will be used relative to frame_id
                        parameter. Default is map.
  -s SPEED, --speed SPEED
                        Copter speed. Default is 1 m/s.

test_flight.py

Just example node of flight: takeoff to 1m, fly forward 1m, and land.

Python module

Usage example

#!/usr/bin/env python
import rospy
from clever_flight_routines import get_telemetry, takeoff, reach_point, land

rospy.init_node('clever_flight_example')

# copter parameters

speed = 1
z = 1
frame = 'map'
x0 = get_telemetry(frame_id = frame).x
y0 = get_telemetry(frame_id = frame).y

# flight program

takeoff(z)                                                  # takeoff
reach_point(x=x0, y=y0+1, z=z, speed=speed, frame_id=frame) # flight 1m toward
land()

Documentation

Documentation can be found here.

clover_tools's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

clover_tools's Issues

opencv3 dependency

As of Melodic, opencv3 is no longer a ROS package and is not listed among known packages. Please consider removing it as a direct dependency and use cv_bridge (or other packages that depend on OpenCV) instead.

I know how inconvenient and painful this is (you'll have to ensure your code builds against OpenCV 3.2 and runs correctly), but if we're switching to Melodic, we'll have to do that. As an alternative we can probably introduce an opencv4 dependency (which will resolve to libopencv-dev=4.1.1), but that would break a lot of stuff and make these packages nearly unusable for anyone not using our Clever platform.

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.