Code Monkey home page Code Monkey logo

drone_rover's Introduction

Robotics-Project

Dependencies

Install Ardupilot from here

Setup ardupilot-gazebo link from here

Setup catkin workspace

To start working with ros, you need to setup ROS workspace using catkin. Open up a terminal to setup the base directory.

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin_make

Once done, clone this repo inside catkin_ws/src,

cd ~/catkin_ws/src
git clone https://github.com/akj127/Robotics-project

Import models

Add the Open Gazebo Models Database

Use git to get a bunch of open source gazebo models from the Open Source Robotics Foundation (OSRF)

Also, add the models directory to the GAZEBO_MODEL_PATH

cd ~/
git clone https://github.com/osrf/gazebo_models.git
echo 'export GAZEBO_MODEL_PATH=~/gazebo_models:${GAZEBO_MODEL_PATH}' >> ~/.bashrc
source ~/.bashrc

Import the new Husky model (with the Aruco marker)

The new Husky model can be found in the models directory of this repo. Simply replace the original Husky model with this updated model. To do that you would need sudo priveleges

sudo cp ~/catkin_ws/src/Robotics-project/models/tagged_husky/husky.urdf.xacro $(catkin_find husky_description/urdf)/

Model taken from here

How to Run

1. Initiate animation in gazebo

Open a new terminal and enter following command,

export GAZEBO_RESOURCE_PATH=~/catkin_ws/src/drone_rover/worlds/
roslaunch husky_gazebo husky_empty_world.launch world_name:=robo.world

Now gazebo should be launched, and a world consisting of rover, drone should be visible open new terminal,

sim_vehicle.py -v ArduCopter -f gazebo-iris --console --map

2. Start Tracking

In a new terminal (python 2.7)
The ports are generally either 14550 or 14551.

cd ~/catkin_ws/src/drone_rover/dronekit/
python drone_move.py --connect 127.0.0.1:14550

3. To view the Tracking

In a new terminal

rqt

Alternatively you can run the script below to execute all the 3 steps

cd ~/catkin_ws/src/drone_rover/
bash run.sh

Note: If image is not appearing in rqt go into Plugins -> Visualization -> Image View
For steering the rover: Plugins -> Robot Tools -> Robot Steering

Plotting the Errors

In a new terminal (python 3.5+)

cd ~/catkin_ws/src/drone_rover/dronekit/
python3 plot_error.py

A video of the working model can be viewed here

drone_rover's People

Contributors

siddharth17196 avatar aniket-pradhan avatar shivasaini avatar akj127 avatar harshitrai17152 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

shivasaini

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.