All posts by AlessioMorale

Setting up Realsense R200 on Odroid XU4 with ROS

This post will guide you through the configuration of a Realsense R200 on Odroid XU4. There is nothing strictly related to this platform so they should apply to any armhf/x86 Ubuntu 16.04.xx systems.

 

Lets start from the requirements:

Preparing the workspace

Skip this section if you have already a workspace.

If don’t, let’s do it now (remember to ‘source /opt/ros/kinetic/setup.bash’ in case you have not added it to your .bashrc):

Prerequisites

Librealsense requires some prerequisites to be built:

Cloning the repositories

now it’s time to clone the librealsense and the Realsense nodelet¬†repo:

Please note that you need to use librealsense v1.12.1 with R200 as the support was dropped in later versions.

Building and testing

You may move to the root of your workspace (ros_ws) and build it:

(j4 is required to prevent the compilation failures due to RAM constraints)

In case of failure check whether it is asking for some dependencies (every distribution  has always a slightly different set of packages preinstalled).

Now you can test if everything is working fine.

Ensure to have ROS Kinetic installed on your pc and to configure properly the odroid XU4 netbios name inside your PC /etc/hosts file (all details for network setup here).

then you can show the image topics from camera using:

Change 192.168.2.15 with the IP of your embedded linux box(Odroid XU4).

“Padre Balistico” a (hopefully) fast line follower robot

photo_2016-09-26_23-10-24

Spending time¬†with¬†the guys at¬†Officine Robotiche¬†(a huge thank to¬†Stefano Artigianato Robotico),¬†¬†i’ve discovered the world of line followers. Apparently simple robots whose ultimate goal is to, guess what, follow a line ūüôā

This simple task involves several issues:

  • reading sensors to determine the line displacement;
  • employing a control algorithm to determine the movement vector;
  • motor control;
  • several other ancillary stuffs, like telemetry, etc;

Obviously mine will¬†run¬†LibrePilot ūüôā and that simplifies a lot of things as most of the component needed are either in place or needs minor rework.

Unfortunately I¬†had no enough time to make a custom board so I went for some ready stuffs for sensor board and motor driver.¬†Thanks to Stefano’s suggestions and after fiddling with their datasheets I¬†ended with the following component list:

It will be based on OpenPilot Revolution board given it has plenty of I/O and RF module onboard, useful for tuning and telemetry.

I’ve also left some mounting holes that may host a NanoPI neo. One day it will be used for optical recognition for, i.e. better line speed planning.

This is the frame I made for this robot

 

img_20160925_195509_hdr

It is made of two parts, the main frame structure and sensor housing. It is available for download at Thingiverse (http://www.thingiverse.com/thing:1792422)

I used PETG for the main part and PLA (that is hard and have very low friction).

 

img_20160925_195654_hdr  img_20160925_194736_hdr

And here is a short video of the thing moving for the first time, using a standard RC transmitter (and related receiver) for control. It is already using gyro for yaw/trajectory stabilization

There is still a big to do list ahead, including (but not limited to) reversable motors handling and sensor reading.

LibrePilot had already almost everything needed. I added a specific target ( i called that roborevolution  based on the revolution target, employing several changes needed to manage brushed motors and all the sensors needed). To have this first test working i only had to tweak the Servo motor drivers to handle higher frequencies and to increase the available resolution.

 

edit: here is the, still very hacky. source code i’m working on ¬†https://github.com/AlessioMorale/LibrePilot/tree/amorale/linefollower

edit2: and it works ūüôā until i find some time for a new update post, here are two videos of its first tests

…after a bit of tuning ūüôā

 

Introducing LibrePilot

 

 

If you know a little bit of OpenPilot history you understand it was more about when, not “if”. ¬†After a little less than¬†4 years of contributions to the OpenPilot project it was time to part.

Just to give a bit of context, I started with¬†OP¬†at the beginning of 2012, working at the early stage of the revolution firmware and hardware development. I mostly took¬†care of the bare metal firmware side, sensors and peripherals interfaces, porting the code to various targets (i.e. STM32 F0 for GPS V9, STM32F411 for nano Nano). I‚Äėve also participated in hardware development/validation and testing since the initial¬†Revolution prototypes (not the small officially sold, but the previous bigger brother http://wp.me/p1tDhc-2H ) . I‚Äôve worked at flight performances improvement with mini quads for CC3D/Revo (the thing that, together with the acro+ develiped by Eric/CorvusCorax, ¬†made CC3D so popular in the 250 class racers) , implemented OneShot, notification smart leds support, a new sensor framework implementation and several other things.

Later I’ll have to write some detailed chronological history of the awful situations, ¬†the falsification¬†and everything else happened in the last 1 and 1/2 months that brought me, most of the development team and several key members to build a new project (LibrePilot) from the roots of OpenPilot.

One¬†question that i have been asked several time is: wouldn’t be¬†better to join to an existing project, like TauLabs?

This was actually one of the possibilities, the fact is that we are already a solid, very well proven team and this may have caused¬†“integration” issues.

But the intentions are to collaborate with other projects, especially TauLabs. Probably one of the best (long term) bets for both projects is to converge to a single codebase that takes the best of both worlds. Unfortunately it is a quite demanding task as in the last couple of years they have diverged a lot, but surely it will worth the effort, both in term of features/quality than in term of critical mass of users and development team.

statement_departure

FirePick now 3D printing

It is now since several weeks that my Firepick has already started working as a 3D printer.

There are some (expected) issues with calibration that i had not yet time to solve, this make a bit difficult to print large objects as the head does not move on a perfect flat plane but goes down when moving away from bed center point.

Right now it is working with an Arduino mega/ramp and the modified Marlin firmware from https://github.com/firepick-delta/Marlin

DSC_0643
Ramps1.4 with printed support/fan brackets
DSC_0636
In the process of printing the updated end effector mount for 3d printing hot end
DSC_0644
Updated end effector and 3D printing hot end mount

Foldable quad for ROS integration experiments

I’m shortly going to work integrating the OpenPilot telemetry with ROS.

Main (long term) focus is indoor positioning and navigation.

This is a quick mockup of the craft that will be used. Plates are going to be rebuilt to better host everything

 

The reference platform  is made by

  • OpenPilot Revolution flight controller;
  • OpenPilot GPSV9 with integrated magnetometer;
  • Control link using Revolution on board OPLink;
  • ODroid U3 sbc hosting Ubuntu server 14.04¬†with¬†ROS Indigo;
  • WIFI card¬†TL-WN722N (that uses¬†an external¬†antenna connected with a RPSMA);
  • USB¬†Web Cam, initially used for optical flow.
  • Telemetry link using WIFI connection;
  • Connection between Revolution and Odroid using USB.
  • Sonar sensor for precise agl¬†measurement

DSC_0554 DSC_0555 DSC_0557 DSC_0559 P1020406 P1020407 P1020408

FIrepick, update 3

(thanks to Juha, from the FirePick Google group ) I got the printed plastic parts.

after a minor cleanup of the captitive nuts seats. here is part of the delta mechanism assembled:

DSC_0539DSC_0542

 

Then it is the turn of the three arms secured to the bearing using nuts and washers. I used nilock nuts to prevent them from untightening

DSC_0544

A¬†simple solution for feets: they are 19mm round soft plastic feets, sold in group of 8 for around 2‚ā¨, and are used to be fitted in chair legs to dampen noise caused by moving them. With a bit of work an M5 bolt does fit nicely. I added a large washer to spread the weight evenly on the feet and prevent it to be ruined by the alu profile’s sharp edges.

DSC_0537 (1)

Now it is time to wait for some other pieces to arrive, the most important being steppers and angle brackets.

 

Firepick, let’s start!

And here we are ūüôā

let’s start building my FPD-032 beginning with Plates: bottom, ¬†Delta Motor and Top plates.

They are milled from 5mm Polycarbonate (lexan) sheet.

FirePick pc plate set

I’m working toward having it working as 3D printer as soon as possible so that i can start to develop the rest of functionalities.

I’m going to use RC ball joints and 5mm carbon fiber tubes with a¬†m3 threaded rod¬†epoxy’ed¬†inside.