Setting up a software stack for autonomous mono robot exploration and mapping using ROS

Prerequisites

This setup is performed and documented on an Ubuntu system with the following software stack:

  • Ubuntu 16.04 LTS (may work on other distribution though)
  • ROS kinetic: if you don't have ROS pre-installed, please refer to this tutorial http://wiki.ros.org/kinetic/Installation/Ubuntu. I suggest to use the full desktop installation configuration, this will take a while (> 2 GB)
  • Gazebo for simulation (it is installed by default if you choose the full desktop installation when installing ROS)
  • GIT (sudo apt-get install git)
  • Catkin for package building (installed by default when installing ROS)

To follow this post, some basic knowledge on ROS is needed:

AntOS v 0.2.3-alpha release: AntOSDK - a development kit for AntOS application

A new release of AntOS, it is now in the beta state, but i'll keep the alpha branch on the release for a few further releases.

Change logs

  • Fix bugs and improve stability
  • DotEditor app is renamed to GraphEditor and use mermaid to generate graphs instead of dot
  • AntOS in now under GPLv3 licence, if you want to use it for comercial purpose, please contact me
  • Blogger is no longer default application, it is moved to MarketPlace
  • Add svg support to Preview
  • MarketPlace now can detect if an application update is available
  • Add AntoSDK, a development kit that allows to develop, build, and package your own application right in the browser, it is available on MarketPlace
  • New UI elements: afx-slider, tooltip

AntOS 0.2.0a "Localization" release

AntOS 0.2.0-alpha is out now. The big change in this release is the support of localization. The UI now support multi-languages rendering based on the current system locale setting.

Github: https://github.com/lxsang/antos
Demo: https://os.lxsang.me

Change logs

  • The API now automatically translate text base on the current system locale setting
  • Current locales supported:
    • English: en_GB
    • French: fr_FR
    • Vietnamese: vi_VN
    • More to come...
  • Update all packages to support the new localization mechanism
  • Some minor changes:
    • Font-awesome is used as default icon font for the entire system
    • Add Setting package for system configuration
    • Wallpaper, language, VFS and startup applications/services now can be configured via Setting
    • Bug fix on some packages: File, Market Place
    • Stability improvement

AntOS web desktop 0.1.11-alpha release

I've started the development of the AntOS web desktop long time ago, but this post is the first official pre-release of the project. The idea on a web-based desktop came when i worked on embed Linux and remote server. These system are often headless, so accessing the resource on these systems is not always obvious. The aim of this project is to develop a client core API that provides a desktop like experience to remotely access resource on the server using web technologies. AntOS is based on jQuery (for the API development) and Riot JS (for the UI), it is first designed to be used along with my antd HTTP(S) server and Lua based server side app, but can be adapted to be used with any server side languages (PHP, etc) and server, by implementing all the system calls API . Basically, application design for the web desktop relies on these system calls to communicating with the server. The API defines the core UI, system calls (to server), Virtual File system, virtual database and the necessary libraries for easing the development of applications. Applications can be developped with coffee/javascript/css without the need of a server side script.


(click image for the full size version)

Interfacing Raspberry Pi and LPC1114FN28 via SPI

In one of my previous posts, i mentioned about building a toy car project using Raspberry Pi as the brain and the LPC1114FN28 for low level control. This post describes in detail of this hobby project.

Basically, in this project, the Raspberry Pi (running a minimal version of Debian, not Rasbian) acts as a master that :

  1. performs some high level calculation (software algorithm) base on the data it collects from the LPC chip (slave)
  2. Issues a control command to the slave chip (LPC) for low level control
  3. Reading image from Raspberry Camera for some vision stuffs
  4. Takes care of network communication for remote control
  5. Implements easily a lot of funny stuffs...

One question: why do not use the Pi to communicate directly with sensor or actuator ?. Although the Pi is a pretty performance system, it lacks some low level feature that we will need in this project, such as ADC for reading analog sensors, precise PWM hardware controller for motor control, etc. Therefore, i decided to used it along with the LPC chip that is more suitable for these low level stuffs.

Programming LPC1114FN28 with standard C using Newlib

Some of my old posts show how to program the ARM Cortex M0 LPC chip in a bare metal manner, although this approach provides a simple setup that requires no additional libraries, it is only for the studying purpose. It is not a good options for production since your code will be highly platform dependent and you need to handle so many low level stuffs (e.g. registers configuration). The Newlib offers a more productive way by providing a standard C interface to abstract the development on such embedded system. In using Newlib, the code is a lot simpler and more portable.

25/02/2018 LPC1114FN28, ARM, GPIO, interrupt

Arm-cortex m0 programming with LPC1114FN28 , a guild to GPIOs

This is a migrated version of my Wordpress post, written on : 14 Mars 2015

Input/Output

The LPC1114FN28 has two pin ports (0 and 1) that make totally 22 pins (12 for port 0 and 10 for port 1, as shown in the image below). All of these pins could be used as GPIOs. By default, they are all input and pull up-enable (that is each pin is connected to an internal pull-up resistor) except for PIO0_5 (dp5) and PIO04 (dp27) which are "open-drain" (a transistor connects to low and nothing else). Their functionalities can be configured easily by software.

The figure below shows the pin out of the chip, note that each PIOn_m refers to the pin m on the port n.

Powering the Raspberry PI A+ with 4xAA batteries

This is a migrated version of my Wordpress post, written on : 8 Mars 2015

I used the Pi as a brain of an autonomous car toy project, for such project, autonomy is alway a key factor that must be considered. So i did some researches to find an efficient way to power the Pi with battery. In my project, i used 4xAA batteries as power source ('cause those ones are very popular and easy to find).

Power saving

To save the power, my suggest is to use the PI A+, this version of Pi is the less energy consuming in its family. In headless mode (without HDMI,camera, Idling in the command line), it requires around 100mA - 120mA (with or without an USB wireless attached for network communication).

The first thing you need to do is turn off the HDMI output, this can help you save about 20mA. Notes, without the HDMI, you can only access to the Pi via network using ssh (that is, you need to configure the network to work with ssh before turning the HDMI off).

tvservice -off

Programming the LPC1114FN28 using Raspberry Pi

This is a migrated version of my Wordpress post, written on : 27 February 2015

I had some Raspberries Pi A+ available on the toolbox, and i've just got idea to use one of them in my programmable car toy project. The point is that the Pi will be connected to a circuit based on the LPC1114FN28, in which, the ARM cortex M0 chip is used to collect sensor datas (IR sensor, sonar sensor, etc.) and control the motors on the car. The Pi talks to the LPC1114FN28 via a serial connection (UART or SPI), and takes care of some high level calculations based on the datas provided by the LPC chip, it then can analyse the environment's context and send commands to the slave chip to control the car. With the Pi, i can build an API to program the car's behaviour from distance via the network (using TCP protocol or HTTP protocol, via web). It's quite an interesting sujet for me.

So the first thing comes to my mind is that during the experiments, i will need to frequently update the firmware on the LPC1114FN28, so why not use the PI as a programmer for the LPC chip. The firmware is written and compiled on your PC and then is updated on the slave chip by sending it to the PI, no need to used the USB-serial adapter anymore. In this post, i'll show you how to do it, this is a part of my actual project.

ARM-Cortex M0 programming with lpc1114FN28 - an overview

This is a migrated version of my Wordpress post, written on : 27 February 2015

What is it?

The lpc1114FN28 is a low cost, low power 32 bit MCU designed in a 28dip package, it is breadboard friendly and very easy to set up for those who are new to ARM programming (like me). Some features :

  • An ARM cortex M0 processor, can run at the frequency up to 50 Hhz.
  • Built-in Nested Vectored Interrupt Controller (NVIC)
  • 32 kb on chip flash programming memory and 4kb of RAM
  • In-System Programming (ISP) and In-Application Programming (IAP)
  • UART, I2C, SPI, 10 bits ADC
  • Up to 22pins GPIO
  • And more..

It is designed mainly for micro-controller stuffs (applications), and can be easily programmed with a few more components. In fact, i'm just ancomputer scientist guy who is new to the MCU (ARM) world and that simplicity is a good point for me. I've bought some of them from Ebayand started to learn how to program it.

Powered by antd server, (c) 2017 - 2018 Xuan Sang LE