• Stars
    star
    150
  • Rank 247,323 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created about 4 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ROS 2 implementation of a Teleoperated robot with live video feed using webrtc and SLAM using realsense's stereocameras. Running on a Jetson Nano

Jetbot-ros2

explore_lite.mp4

This is an implementation of a mobile robot in ros2. The software includes the following functionalities:

  • Teleoperation through websockets with live video feed using webrtc (aiortc).

  • Integration of Intel realsense d435 and t265 cameras for depth estimation and localization respectively.

  • Autonomous Navigation using Nav2

  • Autonomous Exploration using m-explore

  • 2D SLAM with slam-toolbox.

  • 3D SLAM using rtabmap.

I used the Xiaor Geek Jetbot as a base platform and modified it to include a wide-angle camera, as well as the Intel Realsense d435 and t265.

rs-viewer

Requirements

Installation

  1. Clone this repo and its submodules.

    git clone --recurse-submodules https://github.com/jdgalviss/jetbot-ros2.git
  2. Clone additional thirdparty packages

    1. SLAM-TOOLBOX

      cd jetbot-ros2/dev_ws/src
      git clone -b eloquent-devel [email protected]:stevemacenski/slam_toolbox.git 
    2. Navigation2

      git clone https://github.com/ros-planning/navigation2.git --branch eloquent-devel
    3. m-explore

      git clone -b eloquent https://github.com/robo-friends/m-explore-ros2.git
    4. BehaviorTree.CPP

      git clone https://github.com/BehaviorTree/BehaviorTree.CPP.git
      cd BehaviorTree.CPP
      git checkout 3.5.1
      cd ../..
  3. Copy our modified files

    cd thirdparty_files
    source copy_files.sh
    cd ../..

Teleoperation support

  1. Install aiortc for webrtc support.

    pip3 install crc32c==2.0
    pip3 install aiortc==0.9.28
    pip3 install aiohttp==3.6.2
  2. Install pyfakewebcam so that camera frames can be modified inside a ROS2 node and then shared through webrtc:

    apt-get install v4l2loopback-utils
    pip3 install pyfakewebcam==0.1.0
  3. Write a service that creates fake webcam devices that can be used to share camera frames.

    gedit /etc/rc.local

    Copy and paste in file:

    #!/bin/sh -e
    modprobe v4l2loopback devices=2 # will create two fake webcam devices
    exit 0

    Save the file and make it executable with this command:

    chmod +x /etc/rc.local

SLAM Support

Install rtabmap and rtabmap_ros following these instructions in the branch ros2.

Build ros 2 workspace

cd dev_ws
rosdep install -y -r -q --from-paths src --ignore-src --rosdistro eloquent
colcon build --symlink-install

Run

Teleoperation

  1. Run local teleoperation server.

    python3 local_server/webcam.py

    In a browser, open the teleoperation interface by going to: <jetson_nano's ip-address>:8080

  2. In a new terminal, run the motion control launchfile to start streaming video and receiving motion commands.

    ros2 launch motion_control jetbot_launch.py

Navigation

  1. In a new terminal, run nav2
    ros2 launch nav2_bringup nav2_navigation_launch.py

SLAM

  1. To Run SLAM.
    • For 2D-SLAM, in another terminal:
      ros2 launch realsense_ros2 realsense_launch.py
      In another terminal:
      ros2 launch slam_toolbox online_async_launch.py
    • For 3D-SLAM, in another terminal:
    ros2 launch realsense_ros2 slam_rtabmap_launch.py
    3D Dense SLAM is too resource consuming for the Jetson Nano, in this case it is recommended to run it on a remote host. For this, simply set the same DOMAIN_ID on both the Jetson Nano and the remote host. (e.g. export DOMAIN_ID=0) and run the cameras in the Jetson Nano:
    ros2 launch realsense_ros2 realsense_launch.py
    Comment the nodes corresponding to the cameras on the host and run the rtabmap launch:
    ros2 launch realsense_ros2 slam_rtabmap_launch.py

Exploration

  1. In a new terminal, run explore_lite
    ros2 run explore_lite explore --ros-args -p costmap_topic:=/map -p visualize:=true -p use_sim_time:=false -p min_frontier_size:=0.4 -p planner_frequency:=0.5

Some Results

Video

jetbot cartographer rtabmap

explore_lite.mp4

More Repositories

1

autonomous_mobile_robot

Implementation of an autonomous mobile robot with semantic segmentation, object detection, motion planning and control systems
Jupyter Notebook
120
star
2

realsense_ros2

Ros 2 wrapper for intel realsense cameras d435 and t265
C++
16
star
3

full-scene-reconstruction

Full Scene Reconstruction of a 3D scene (geometry, instance ids, semantic labels, and color) from an RGB Image
Shell
7
star
4

PathPlanning

Path planning algorithm for highway driving
C++
4
star
5

semantic-scene-completion

Semantic Scene Completion on the SemanticKITTI dataset
Python
4
star
6

TFMiniPlusROS

This is a package and test application of an I2C driver for the TF Mini Plus Range Sensor. It was tested on Ubuntu 16.04 Xenial for the Jetson TX2.
C++
4
star
7

mobile_robots_robust_control

This repository includes simulation, implementations and some tools to design robust trajectory tracking control algorithms for mobile robots
Jupyter Notebook
3
star
8

ObjectDetectionData

Pipeline to create TF records and labels from data tagged in Scalabel for an Object Detector
Jupyter Notebook
3
star
9

logger_cpp

C++
2
star
10

socket_can_ros

Simple implementation of socketCAN in ROS
C++
2
star
11

object-detection-ros-cpp

A ROS-implementation of an object detector in c++ using OpenCV's dnn module.
CMake
2
star
12

AMR_semantic_segmentation

Implementation of semantic segmentation for an AMR
Jupyter Notebook
2
star
13

concurrent-traffic-simulation

This is the project for the fourth course in the Udacity C++ Nanodegree Program: Concurrency.
C++
2
star
14

osm-route-planner

Open Street Maps Route Planner using A* Algorithm implemented in C++
C++
2
star
15

multi_agent_DRL

Deep Reinforcement learning applied to solving unity multi-agent environments: tennis and football
ASP
1
star
16

robot_continuous_control_RL

RL-based control for robotic agents in the unity environment
Jupyter Notebook
1
star
17

covid19_xray_pytoch

Jupyter Notebook
1
star
18

system-monitor

Simple system monitor, similar to htop
C++
1
star
19

cv2_color_segmentation

Simple implementation of a GUI for color segmentation and centroid calculation using opencv in python
Python
1
star
20

cpp_examples

Some cpp examples developed while making the udacity course "C++ for programmers"
C++
1
star
21

lane_lines-detection

classic vision implementation of a lane line detector
Jupyter Notebook
1
star