Skip to content

tau-adl/Position-Control-Using-ORBSLAM2-on-the-Jetson-Nano

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

Autonomous drone using ORBSLAM2 on the Jetson Nano

Run ORBSLAM2 on the Jetson Nano, using recorded rosbags (e.g., EUROC) or live footage from a Bebop2 Drone. Tested with Monocular camera in real time - https://www.youtube.com/watch?v=nSu7ru0SKbI&feature=youtu.be

The first part of the repo is based on the work of Thien Nguyen (hoangthien94)

Prerequisite

  • Start with a fresh flash for Jetson Nano.

Installation

  1. source /opt/ros/melodic/setup.bash
  2. export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/your_comp/ORB_SLAM2_CUDA/Examples/ROS

Running OrbSLAM2 on the EUROC dataset:

Add the euroc.yaml configuration file from the EUROC dataset to:

~/ORB_SLAM2_CUDA/Examples/ROS/ORB_SLAM2_CUDA/conf

Change the ros_mono.launch in the original repo to the file in this repo.

Then, type the following commands in a terminal:

  1. sudo jetson_clocks
  2. roslaunch ~/ORB_SLAM2_CUDA/Examples/ROS/ORB_SLAM2_CUDA/launch/ros_mono.launch bUseViewer:=true
  3. rosbag play bag file (the bagfile is from EUROC)

Running OrbSLAM2 with the Bebop2 camera's video feed:

(See this link for additional help: https://forum.developer.parrot.com/t/sdk3-build-error/3274/3 )

Copy the bebop.yaml file from this repo to:

~/ORB_SLAM2_CUDA/Examples/ROS/ORB_SLAM2_CUDA/conf

Change the bebop_ros_mono.launch in the original repo to the file in this repo.

Then, type the following commands in a terminal:

  1. sudo jetson_clocks
  2. connect to bebop wifi
  3. roslaunch ~/bebop_ws/src/bebop_autonomy/bebop_driver/launch/bebop_node.launch
  4. roslaunch ~/ORB_SLAM2_CUDA/Examples/ROS/ORB_SLAM2_CUDA/launch/bebop_ros_mono.launch bUseViewer:=true (now, check the slam manually by moving drone around in your hand)

Close loop position control using the OrbSLAM2's pose as feedback:

Add the drone_control ros package from this repo to the src directory of bebop_ws, and build.

From now on please be very cautious

  1. In a terminal type: roslaunch ~/bebop_ws/src/drone_control_fb_slam/launch/drone_bebop_control.launch this will make the drone hover in one place using it's own OF and height sensors
  2. In a terminal type: rostopic pub --once /bebop/state_change std_msgs/Bool "data: true" this will make the drone hover in one place using the SLAM's pose
  3. To land the drone, rostopic pub --once /bebop/land std_msgs/Empty

About

Run ORBSLAM2 on the Jetson Nano, using recorded rosbags (e.g., EUROC) or live footage from a Bebop2 Drone

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published