RoDI support for the Gazebo simulator

In a previous post I talked about the RoDI educational robot and the rodi_robot package I wrote to control it within the Robot Operating System (ROS).

The problem was that having access to a RoDI was the only way to thinker with it. And although it has a very low cost (and is one of the cheapest with ROS support), it would be nice to learn how to control RoDI even without having access to one.

So since I’m using the Gazebo simulator while learning about ROS, I thought that adding support for RoDI in Gazebo would be an excellent opportunity to learn more about its internals.

The rodi_gazebo project implements both a Gazebo model for RoDI and a plugin that mimics the robot’s default firmware rodi-web HTTP API. This means that there’s no difference from a client point of view to communicate with either a real RoDI or a simulated one in Gazebo.

I want to thank Gary who helped me integrating the RoDI STL into the model and answered tons of questions about Gazebo  🙂

The README file explains how to build the plugin and use the RoDI model, I hope this could be useful for the RoDI community.

Happy hacking!

default_gzclient_camera1-2017-01-07t01_15_04-501691

ROS support for the RoDI educational robot

RoDI is an open hardware and software, wireless, low cost and easy to use educational robot designed and built by Gary Servin. The name RoDI is an acronym of “Robot Didáctico Inalámbrico”, which in Spanish means wireless didactic robot.

The robot has a custom PCB based on the ATMEGA328p microcontroller that has a bunch of sensors (ultrasonic, infrared, light), actuators (motors, led, RGB led), a rechargeable battery over micro USB and a ESP8266 WiFi module to interact with the ATMEGA over a wireless connection.

rodi.jpeg

The Arduino UNO board has the same ATMEGA328p microcontroller so the Arduino IDE and libraries can be used to program the robot’s firmware.

But since the goal is to be use RoDI as an educational tool for kids, its default’s firmware (rodi-web developed by Martin Abente) is a small daemon that accepts HTTP requests, to control the robot using a very simple API.

Because the robot can be controlled over HTTP, it’s very easy to develop clients for RoDI. For example there is a Python client library (rodi-py),  Android (rodroid) and IOS (RoDios) client apps and even a plugin for the Turtleblocks visual programming tool (rodi-plugin-turtlebots) so the robot can be controlled using visual building blocks. The robot can even be controlled using commands like curl and wget so the entry level is really low!

I’m learning about the Robot Operating System (ROS) in my free time, so I thought that an easy first project would be to add ROS support for RoDI. One way to do this is to use the rosserial_arduino package, and in fact Gary already has a custom RoDI firmware that does exactly this. The firmware subscribes to a cmd_vel topic and receives Twist messages to move the robot, and publish the sonar data as Range messages into a ultrasound topic.

But a disadvantage of this approach is that the default rodi-web firmware has to be replaced in order to control the robot from ROS. So I wrote the rodi_robot package that also subscribes to the cmd_vel topic and publishes the sonar data to a ultrasound topic, but does a translation between ROS messages and HTTP requests to use the rodi-web API directly. That way, RoDI is supported by ROS without the need to replace its default firmware.

I hope this package can be useful for people wanting to learn ROS using a (not simulated) robot, since its low cost makes RoDI very affordable.

Happy hacking!

Collabora contributions to Linux kernel 4.1

Linux 4.1 was released last week and like previous kernel releases, this version again contains contributions made by Collabora engineers as a part of our current projects.

On this release, not only Collabora contributed several patches for different subsystems but also for the first time made it to LWN list of most active employers for a Linux kernel release and Tomeu Vizoso was listed as one of the most active developers by changed lines.

In total 68 patches were contributed to the 4.1 release. These were for:

  • Fixes and improvements to the DRM core atomic support.
  • Fix for Exynos DRM FIMD buffer size calculation.
  • More cleanup and fixes for Exynos DRM in preparation to finish porting the driver to support Atomic Mode Settings for v4.2
  • Add MMC/SDIO power sequencing to make the WiFi chip work on Snow and Peach Pit/Pi Chromebooks.
  • Various fixes and improvement for the ChromeOS Embeded Controller drivers.
  • Add default console serial port configuration for Exynos Chromebooks to avoid having to define a tty in the kernel command line.
  • Enable needed drivers in the Exynos default configuration file.
  • Fix error code propagation in the MMC power sequencing core.
  • Restore clocks needed during suspend for Exynos5 machines to prevent failing to resume.
  • Make the Mwifiex chip on Exynos Chromebooks to keep power during suspend to prevent the driver not allow the system to enter into a suspend state.
  • Fix output disable race on the Samsung PWM driver.
  • Split out touchpad initialisation logic on the Atmel MaxTouch driver.
  • Various enhancements for the Tegra ASoC driver.
  • Add a Device Tree to support the Nyan Blaze Chromebook and factor out common snippets with the Nyan Big Chromebook Device Tree.
  • Add trackpad, WiFi and GPIO restart support for the Nyan Chromebooks.
  • Add support for the Tegra124 Activity Monitor (ACTMON).
  • Fill EMC timings for Tegra Nyan Chromebooks.
  • Many fixes and improvements for the Tegra device frequency scaling driver.
  • Fix the Tegra DRM driver by resetting the SOR to a known state.
  • Enable many drivers in multi_v7 default configuration, that are needed by Tegra Chromebooks.
  • Fix the cros_ec keyboard driver to avoid loosing the key pressed during suspend to resume the system.
  • Fix USB not working on Tegra124 based boards.

Following is the complete list of patches merged in this kernel release:

Collabora contributions to Linux kernel 4.0

Linux 4.0 was released a couple of weeks ago and like previous kernel releases, this version again contains contributions made by Collabora engineers as a part of our current projects.

In total 59 patches were contributed to the 4.0 release. These were for:

  • Fix graphics DP and HDMI display for Exynos DRM.
  • More preparation work to add Atomic Mode Settings support to the Exynos DRM driver.
  • Add support for Power, Lid keys and built-in USB camera to Peach Pi/Pit and Snow Chromebooks.
  • Configure regulators operating modes on suspend for Peach Pi/Pit Chromebooks to reduce power consumption.
  • Add DISP1 power domain and related clocks to have proper display support on Exynos5420 machines.
  • Extend the MMC simple power sequencing provider to support a reference clock and more than one reset GPIO.
  • Fix various regressions in the common clock framework exposed by the per-user clock changes.
  • Fix S3C Real-Time-Clock that was not working on many Exynos SoCs.
  • Fix a bug in the regulator framework that tried to enable regulators that were already enabled.
  • Fix a reboot and poweroff hang on Exynos machines cause by a hang in the samsung serial driver.
  • Various fixes to the Samsung MFC driver.
  • Add support for the Exynos5422 Odroid XU3 board.
  • Enable needed Kconfig symbols on the exynos, omap2plus and multi_v7 defconfigs.
  • Add a devfreq driver for the Tegra Activity Monitor

Following is the complete list of patches merged in this kernel release:

Collabora contributions to Linux kernel 3.19

Linux 3.19 was released last week and this version again contains contributions made by Collabora engineers as a part of our current projects.

In total 60 patches were contributed to the 3.19 release. These were for:

  • Work in the Intel i915 DRM driver to support atomic plane updates.
  • Fixes and removal of unnecessary layers in the Exynos DRM driver as a preparation to add atomic mode settings support.
  • Add support to the regulator framework to define regulators initial and suspend operating modes.
  • Changes to the max77802 regulator driver to support regulator operating modes changes.
  • Fix the Real-Time-Clock in the Snow, Peach Pit and Pi Chromebooks.
  • Enable kernel config options to have display panel working on Exynos boards.
  • Allow the regulator drivers to be enabled and disabled when Exynos system enters and leave suspend states.
  • Many cleanup and fixes to the common clock framework and clock drivers as a preparation for the per-user clock API change.

Following is the complete list of patches merged in this kernel release:

Collabora contributions to the Linux kernel 3.18

Linux 3.18 was released this week and like in previous kernel releases, it contains contributions made by Collabora engineers as a part of the projects involving the Linux kernel.

In total 45 patches were contributed to the 3.18 release. These were for:

  • Cleanups for the Intel i915 DRM driver
  • Various cleanups for the max77686 clock, rtc and regulator drivers.
  • Adding max77802 clock, rtc and regulator drivers.
  • Fixing regmap DT endianess parsing logic.
  • Improving the power model in the Exynos5 Peach Pit and Pi Chromebooks DT.
  • Using the regulator_get_voltage() function to get the mmc OCR mask.
  • Adding max77802 PMIC, ISL29018 sensor and atmel touchpad for Peach boards DT.
  • Setting the correct clock rate for i2c7 in Exynos5 Peach Pit and Pi DT.
  • Enable atmel touchpad, cgroups, sbs battery and atmel touchpad in exynos defconfig.
  • Fixing variable initialization for different regulator drivers.
  • Fixing MFC v5 support in the s5p-mfc driver.
  • Making module autoloading to work for i2c cros-ec-tunnel and cros_ec_keyb drivers.
  • Explicitly configure USB dual role mode as host for Exynos boards.
  • Adding a PM_QOS_MEMORY_BANDWIDTH pm_qos class.
  • Enabling gcov-based kernel profiling for ARM

Following is the complete list of patches merged in this kernel release:

An update on Device Tree support for IGEP boards

Linux v3.13 has been released a couple of days ago and this is the first kernel version that has complete Device Tree support for IGEP boards.

Since the initial DT support that I talked before, the following peripherals were added:

Ethernet
NAND flash
– USB HOST and OTG
Wifi/BT combo (support added by Enric Balletbo)

The only remaining bit in DT is video since the DT bindings for the OMAP Display Sub-System (DSS) have not landed in mainline yet so display support is still provided using the OMAP platform data quirk infrastructure.

So, this make the IGEP the first OMAP3 device to complete the transition to Device Tree based booting and the board file could finally be removed.

The migration from board files to Device Tree booting was not trivial as I initially thought since OMAP GPMC and GPIO DT support was not mature enough so I had to add support for GPMC DT ethernet and fix some annoying bugs.