Skip to content
Rezeck edited this page Dec 21, 2018 · 5 revisions

ROS Driver for E-Puck Robot based on ESP8266

A ros driver to control e-puck via wifi using esp-01 to bridge a serial communication.

This driver performs a distributed processing using ESP8266 @80Mhz to run the ros node using the rosserial protocol. Instead of using epuck BT, now it uses wifi which can perform a fast and robust communication (~90 hz of topic communication on ROS).

Overview

This image shows the pipeline of our approach.

Epuck Overview

Authors

This driver is maintained by:

VeRLab

VeRLab: Vison and Robotic Laboratory
http://www.verlab.dcc.ufmg.br

Hardware Modifications

In order to provide an epuck-esp8266 serial communication, we use a max23 chip to convert from RS232 (epuck) to TTL (esp8266) serial signal. Figure 1 shows the sketch.

PS1: Micromatch connector (RS) on e-puck (and e-jumper shield) provides 5v (VCCB Signal, Pin 1), but we have to mount a 0 ohm (R5). As shown in schematic page 4 (2008.04.28).

PS2: Samtec connector (JE2) provides also this 5V (VCCB Signal, Pin 5-6) and JE1 provides serial RX/TX (RS_TX Pin 12, RS_RX Pin 2).

Epuck on RVIZ

Epuck firmware modifications

Instead of using native epuck Asercom, we decide to attach some minor modifications to provide a better interface with esp8266.

This new firmware is available in this repository and the user needs to burn it on epuck after start uses the ros node. Naturally, it can be recorded with epuckuploadbt via Bluetooth, or via cable using MPLAB and a PIC recorder.

Epuck on RVIZ

ESP8266 Firmware

In order to burn this firmware in esp8266, we use Arduino IDE 1.8.4 with esp8266 plugin.

Dependecies

Install all ros dependecies

  • ROS Kinect or Lunar distro
  • Rosserial

In order to fix all ros dependencies, ppen the Linux terminal and type:

$ cd ~/catkin_ws/src/
$ git clone https://github.com/verlab/espuck_driver.git
$ cd ~/catkin_ws
$ rosdep install --from-paths src -i -y
$ catkin_make

How to use this ros driver

  • First turn the robot on and wait till the connection be established (~3 seconds).
  • Than launch the ros node in Linux terminal:
$ roslaunch espuck_driver espuck_driver.launch
  • This script is pre-configured to launch the rosserial and rviz with e-puck robot description. The second allows the visualization of the current state of the robot. You can disable it if you do not want to use it.

Epuck btloaded

ROS Topics

  • We implemented a communication with almost all sensors.
$ rostopic list
/epuck_1571/ambient_light  # ambient light sensor
/epuck_1571/battery        # battery state
/epuck_1571/cmd_vel        # command velocities
/epuck_1571/imu            # accelerometer and gyro
/epuck_1571/joint_states   # wheel position
/epuck_1571/laser          # Laser interpolated from 8 proximity sensor (24 samples)
/epuck_1571/led            # Led control
/epuck_1571/microphone     # Microphone sensors
/epuck_1571/odom           # Wheel Odometry
/epuck_1571/proximity      # Raw proximity sensors
/epuck_1571/sound          # Sound Play with defaul 5 sounds
/epuck_1571/temperature    # Temperature sensor
/tf                        # Transformations odom->base_link and base_link->laser
  • Also, some ros services are available.
$ rosservice list
/epuck_1571/odom_reset              # reset the odometry 
/epuck_1571/proximity_calibration   # recalibrate the proximity sensors
/epuck_1571/reset                   # reset epuck
/epuck_1571/stop                    # stop epuck (turn the leds and motors off)

About the camera topic

We perform some test with the camera, but we could not reach good results. Also, it consuming too much resource, e.g. serial bus and the esp8266 processor. Afterall we could send 40x40 RGB @ 3fps, but this limited the frequency of the others topics. A camera development branch is open on this repository and the current state of the video capture is show in the image below.

Epuck camera