17/01/2021 ROS, Jarvis, Arduino, firmware, booklet

Jarvis Arduino firmware

This post is the follow up post of the previous JETTY: Jarvis Serial to ROS-2 Transport Layer post.

The arduino firmware on the one hand implements the JETTY protocol for communicating with ROS and on the other hand takes care of all low-level hardware communication including:

  • Reading of battery voltage from the ADS1115 16-Bit ADC sensor
  • Reading of 9DOF IMU sensor data from MPU 9250 IMU sensor
  • Reading of raw odometry data from two motor magnetic encoders
  • Control two motor via Adafruit Motor Shield V2

The Jarvis booklet section Arduino Firmware presents the insight detail on the firmware implementation. It covers the following topics:

  1. The JETTY protocol implementation on Arduino
  2. Different routines implemented on the firmware
  3. Odometry data reading from hall effect sensor
  4. A strategy for battery voltage reading and monitoring
  5. Motors controlling

Follow up reading at: https://doc.iohub.dev/jarvis/Ym9vazovLy9jXzIvc18yL0lOVFJPLm1k/Arduino_Firmware.md

JETTY: Jarvis Serial to ROS-2 Transport Layer

My ROS based DIY robot( presented in the previous post) uses the NVIDIA Jetson Nano for high level robotic algorithms with the ROS 2 middle-ware. The Jetson is connected to an Arduino via a serial link for low-level hardware interaction and control.

As the Arduino is used for low-level communication with actuators/sensors. We need a software transport layer on top of the physical serial link (Jetson - Arduino) to stream (sensor) data/command from Arduino to ROS 2 and vice versa. On Dolly (my previous robot version), which used ROS 1, this was handled by Rosserial, a protocol for wrapping standard ROS serialized messages and multiplexing multiple topics and services over a serial link. On ROS 2, however, Rosserial is not available. Other alternative solutions exist but are not mature enough, some implementations require more computational resource which exceeds the capability of the Arduino Mega 2560.

So i decided to implement a dedicated transport layer for Jarvis called JETTY (Jarvis SErial to ROS-2 TransporT LaYer). I do not aim at a generic protocol for ROS to serial communication like ROS serial. Instead, the implementation of the transport layer should be specific only to the robot. However, the protocol must be easy to extend to adapt to any future upgrade of the robot such as adding more sensor/actuators.

Requirements on the transport layer:

  1. The transport layer must allow to stream data in form of frames (fixed size or not)
  2. Simple but reliable, unambiguous packet framing protocol, frame should be easy to identify
  3. Fast frame synchronization: When an endpoint (Arduino or ROS) connects to the Serial link in the middle of the data streaming, frame synchronization should be fast while minimizing the frames lost in the synchronization phase
  4. Frame should be verified using checksum before being consumed by an endpoint
  5. Packet framing overhead is allowed but need to be minimized
  6. The algorithms should be easy to implement and computationally inexpensive on both Jetson and Arduino

Brief, we need an efficient and reliable delimiting/synchronization scheme to detect the frame with short recovery time.

The detail on the choice of protocol and algorithm as well as insight implementation is presented on a section of my Jarvis booklet accessible via the following link:

https://doc.iohub.dev/jarvis/Ym9vazovLy9jXzIvc18xL0lOVFJPLm1k/JETTY:_Jarvis_Serial_to_ROS-2_transport_layer.md

Jarvis: The DIY robot

It has been a while since i started to build an upgraded version of Dolly, my first DIY ROS based robot. This upgraded version is named Jarvis.

Changes from the previous version:

  • Hardware:
    • The robot is now use tracks instead of wheels
    • Jarvis footprint is bigger and has more room to mount addition components
    • Jarvis uses NVIDIA Jetson Nano as high-level control board instead of Raspberry 3B (used in Dolly). The Jetson board has more GPU and processing power, and is suitable for machine learning stuffs (with the camera).
    • Jarvis uses step-down voltage regulator instead of step-up regulator (Dolly), the regulator provide more juice (up to 3A for each output)
    • 128 GB USB based SSD for operating system and storage instead of SD card
  • Software:
    • Linux Ubuntu 20.04
    • ROS 2 is used instead of ROS (on Dolly)

As a work in progress, I'm now writing a booklet that detail the building process of the robot both on hardware and soft software (Arduino, ROS 2), as well as some application use cases. The initial plan is:

  1. Introduction
  2. Robot modeling and simulating with ROS 2 and Gazebo
  3. Building the robot hardware step by step
  4. Basic robot controlling software with ROS 2
  5. Use case projects: such as localisation and mapping, autonomous navigation, obstacle avoidance with machine learning, etc.

All further updates on the booklet can be found here: https://doc.iohub.dev/jarvis/.

Stay tunned!!!

Meet Dolly the robot

Ladies and gentlemen, please meet "Dolly the robot", the first version of my DIY mobile robot. My goal in this DIY project is to make a low-cost yet feature-rich ROS (Robot Operating System) based mobile robot that allow me to experiment my work on autonomous robot at home. To that end, Dolly is designed with all the basic features needed. To keep the bill of material as low as possible, i tried to recycle all of my spare hardware parts.

Specification

  • Robot's chassis is 3D printed, the chassis's plate design is borrowed from the design of Turtlebot 3 which is a smart design, IMO. The other hardware parts, however, are completely different from the Turtlebot 3.
  • IMU sensor with 9 DOF (accelerometer, magnetometer and gyroscope) for robot orientation measurement
  • Two DC motors with magnetic encoders using as wheels and odometer
  • Arduino Mega 2560 for low level control of the robot
  • Raspberry PI 3B+ with embedded Linux for high level algorithm and network communication. The ROS middle-ware on top of the Linux system offers a powerful robotic software environment
  • A 360 degree Neato LiDAR (laser scanner) up to 6 m range
  • A 8 Mega pixel camera (Raspberry PI camera)
  • Adafruit Motor shield V2 for motor controlling
  • 10000 Mah battery
  • ADS1115 analog sensor to measure and monitor battery usage
  • 0.95" (128x64) mini OLED display
  • The robot can be tele-operated using a bluetooth controller such as a PS4 controller

Applications

  • Localization and mapping (SLAM)
  • Obstacle avoidance
  • Autonomous navigation
  • Robot perception algorithms with LIDAR sensor and camera
  • Much more...
18/06/2019 PhaROS, ROS, Pharo, tutorial

A first step guide to PhaROS

PhaROS is a collection of Pharo libraries that implements the ROS (Robot Operating System ) based client protocol. It allows developing robotic applications right in the Pharo environment by providing an abstract software layer between Pharo and ROS. This guide makes an assumption that readers already have some basic knowledge about ROS, if this is not the case, please check the following links before going any further on this page:

Powered by antd server, (c) 2017 - 2024 Dany LE.This site does not use cookie, but some third-party contents (e.g. Youtube, Twitter) may do.