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.
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:
Doing a research work in robotic domain using Pharo as a prototype and implementation tool (via phaROS) is a whole new experience. It is quite impressive to see how quick an implementation idea becomes a working prototype/solution in Pharo thanks to its productive development environment. Most of my robotic applications are critical tasks which require real-time performance, some of them are heavily resource-demanding (CPU). Due to the single process nature of Pharo, running these tasks on the same VM results in a performance bottleneck, thus sometime, violate the real-time requirement of the application. Common solution to this problem is to dispatch these tasks to several native system processes to boost the performance. Unfortunately, this feature is not supported in current Pharo. My goal in this case is to have something that allow to:
And that is when SystemProcess plays its role.
I use Unix terminal a lot in work, when i work with Pharo and ROS (PhaROS), switching regularly between Pharo and native terminal application (for ROS command line) is kind of inconvenient. I've been thinking of using a terminal emulator application for Pharo. Googling around, i found out that there is no such thing that is ready for production work on modern Pharo, except a prototype work of Pavel Krivanek available at: https://github.com/pavel-krivanek/terminal. However, that code is messy, buggy, and not ready for production work . So i decided to take my time to work on it.
This post is deprecated, WVNC now is a part of AntOS eco-system. The easiest way to setup a Web base VNC client is to used the AntOS docker image that is presented in this post.
As with AntOS and its applications, one can remotely access and edit server resources from browser in a desktop-like manner. However, sometime these web based applications are not enough for some specific tasks. For a long time, I've thinking of a web based API for controlling remote desktop right from the browser ( or AntOS application). The VNC protocol is a good starting point. After playing around with libvncserver/libvncclient, i came up with wvnc a web based protocol and API for accessing VNC servers using websocket.
This is a demonstration of my current work on controlling robot using ROS and PhaROS. For that task, I've developed a dedicated PhaROS package that defines:
When evaluating the performance of a SLAM algorithm, quantifying the produced map quality is one of the most important criteria. Often, the produced map is compared with (1) a ground-truth map (which can be easily obtained in simulation) or (2) with another existing map that is considered accurate (in case of real world experiment where the ground-truth is not always available ).
Basically, grid maps are images, so image similarity measurement metrics can be used in this case. In this post, we consider three different metrics: Mean Square Error (MSE), K-nearest based normalized error (NE) and Structure Similarity Index (SSIM)
AntOS provides an abstract API for application development. The core API contains three main elements: the UI API, the VFS API and the VDB API, as shown in the following graph:
The UI API defines the basic UI elements such as Window, List, Tree, Dialogs, etc, and provides a generic interface for application and dialog UI development. UI design consists two steps: (1) the first step is to layout UI elements using antOS' scheme syntax (in XML format); (2) the second step is to handle user interaction using the coffeescript/ Javascript API.
I have too many work in the last few months and don't have time to deal with some known bugs of AntOS until now. This v0.2.4-a release focuses on improvement and bugs fix
Project page: https://github.com/lxsang/antos
Demo: https://os.lxsang.me/
AntOSDK tutorial: https://blog.lxsang.me/r:id:20
Applications developed using AntOSDK can be found on this repository: https://github.com/lxsang/antosdk-apps. They can be used as example projects for AntOSDK
Change logs
WARNING: Due to some recent attacks on my server, the web terminal access is disabled for the user: demo. Someone tried to run a TOR relay on my server using that user, so i decided to disable the terminal access on the demo user. You can still login, but you can't use the shell
This post contains some tips and tricks that helps resolve problems that i've encountered when working with Linux, mostly Ubuntu.
Some of my applications are 32 bits only which sometime depend on several 32 bits libraries. By default, ubuntu installed only the 64 bits version of these libraries. To installed the 32 bit ones, we need enable the i386 architecture using dpkg
, these following commands should be executed as root:
When i developed this blog (using my own client-server platform such as web server, back-end, front-end, etc., built from ash/scratch :) ), i simply designed it as a simple "note book" where i put my ideas or some stuffs that i have done. So, initially, there are no category no advance feature like post suggestion based on current post, etc. It is just a bunch of posts sorting by date. The thing is, i usually work on many different domains (robotic, IoT, backend, frontend platform design, etc.), so my posts are mixed up between different categories. It is fine for me, but is a real inconvenience for readers who want to follow up their interesting category on the blog. Of course, i could redesign the blog and add the missing features by messing around with the relational database design (i'm using SQLite btw), manually classifying the posts in the back-end, etc. But, i'm a kind of lazy people, so i've been thinking of a more automatic solution. How about an automatic document clustering feature based on a data mining approach ? Here we go!
I've had funny time playing around with the Gazebo simulator for autonomous robot exploration. One thing I've encountered is that the odometry data provided by Gazebo is so perfect that, sometime, makes the simulation less realistic. I used a Turtlebot model as robot model in my simulations. Googling around, i didn't find any solution of adding noise to the odometry data of this robot (using the URDF file). I then decided to develop a dedicated ROS node allowing me to add some random noise to the Gazebo's odometry data.
First thing fist, we need to understand the robot motion model. There are many motion models, but in the scope of this article, we focus only on the odometry motion model. Often, odometry is obtained by integrating sensor reading from wheel encoders, it measures the relative motion of the robot between time \(t\) and \(t-1\) or \((t-1,t]\). In 2D environment, a robot pose is represented by a point \((x,y)\) and an orientation (rotation angle) \(\theta\), so the robot pose at the time \(t-1\) and \(t\) are denoted by:
$$p_{t-1}=(x_{t-1},y_{t-1},\theta_{t-1})$$
$$p_{t}=(x_t,y_t,\theta_t)$$
This setup is performed and documented on an Ubuntu system with the following software stack:
sudo apt-get install git
)To follow this post, some basic knowledge on ROS is needed:
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
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
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.
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 :
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.
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.
This is a migrated version of my Wordpress post, written on : 14 Mars 2015
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.
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).
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