Difference between revisions of "Others Extensions"

From GCtronic wiki
Jump to: navigation, search
(Assembly for e-puck2)
(Assembly for e-puck2)
Line 38: Line 38:
 
==Assembly for e-puck2==
 
==Assembly for e-puck2==
 
<span class="plainlinks"><table><tr><td align="center">[1]</td><td align="center">[2]</td><td align="center">[3.1]</td><td align="center">[3.2]</td><td align="center">[3.3]</td><td align="center">[4]</td></tr><tr><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-1.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-1_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-2.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-2_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-3.1.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-3.1_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-3.2.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-3.2.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-3.3.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-3.3.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-4.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-4_small.png">]</td></tr><tr><td align="center">[5.1]</td><td align="center">[5.2]</td><td align="center">[5.3]</td><td align="center">[5.4]</td><td align="center">[6]</td></tr><tr><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.1.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.1_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.2.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.2_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.3.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.3_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.4.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.4_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-6.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-6_small.png">]</td></tr></table></span>
 
<span class="plainlinks"><table><tr><td align="center">[1]</td><td align="center">[2]</td><td align="center">[3.1]</td><td align="center">[3.2]</td><td align="center">[3.3]</td><td align="center">[4]</td></tr><tr><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-1.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-1_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-2.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-2_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-3.1.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-3.1_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-3.2.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-3.2.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-3.3.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-3.3.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-4.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-4_small.png">]</td></tr><tr><td align="center">[5.1]</td><td align="center">[5.2]</td><td align="center">[5.3]</td><td align="center">[5.4]</td><td align="center">[6]</td></tr><tr><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.1.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.1_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.2.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.2_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.3.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.3_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.4.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-5.4_small.png">]</td><td>[http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-6.png <img height=200 src="http://projects.gctronic.com/epuck2/wiki_images/ground-assembly-6_small.png">]</td></tr></table></span>
# Unscrew the 3 spacers
+
# Unscrew the 3 spacers and remove the battery
 
# Remove the top side from the case body gently
 
# Remove the top side from the case body gently
 
# Detach the plastic camera adapter from the camera with the help of pliers; be careful to not stress the camera flex cable. Take the new adapter (the one flat on the back) and insert it as before.
 
# Detach the plastic camera adapter from the camera with the help of pliers; be careful to not stress the camera flex cable. Take the new adapter (the one flat on the back) and insert it as before.
 
# Plug the ground module into its connector on the e-puck2; make the cable pass through the battery contact
 
# Plug the ground module into its connector on the e-puck2; make the cable pass through the battery contact
 
# First push the ground module within its slot in the body case, then slide in also the top side of the robot paying attention to the motors wires position: the back battery contact must remain between the body and motors wires and make sure the wires aren't stuck in the springs. Both the ground cable and camera flex cable must bend forming an "S" shape.
 
# First push the ground module within its slot in the body case, then slide in also the top side of the robot paying attention to the motors wires position: the back battery contact must remain between the body and motors wires and make sure the wires aren't stuck in the springs. Both the ground cable and camera flex cable must bend forming an "S" shape.
# Push the top all way down and then remount the spacers. You're done.
+
# Push the top all way down, then remount the spacers and plug in the battery. You're done.
  
 
=Cliff sensor=
 
=Cliff sensor=

Revision as of 09:33, 23 February 2021

1 Range and bearing


The board allows situated agents to communicate locally, obtaining at the same time both the range and the bearing of the emitter without the need of any centralized control or any external reference. Therefore, the board allows the robots to have an embodied, decentralized and scalable communication system. The system relies on infrared communications with frequency modulation and is composed of two interconnected modules for data and power measurement.

The documentation and hardware files are available in the following links:

You can find more information about this board in the following links: http://www.e-puck.org/index.php?option=com_content&view=article&id=35&Itemid=23, http://rbz.es/en/products/e-puck.html.

1.1 e-puck 1

A simple MPLAB project was created to let start using these modules. With the selector it's possible to choose whether the robot is an emitter (selector in position 0) or a receiver (selector in position 1). The receiver will send the information (data, bearing, distance, sensor) through Bluetooth.

1.2 e-puck 2

The e-puck2 standard firmware contains a demo example to use the range and bearing extension. When the selector is in position 4 then the robot is the receiver, when in position 5 then the robot is the transmitter. The receiver will print (you need to connect the USB cable and open the USB serial port) the data received, the bearing, the distance and the sensor id; while the transmitter will send continously 0xAAFF.
You can download the pre-built firmware from e-puck2_main-processor_randb.elf; the source code is available form the repo https://github.com/e-puck2/e-puck2_main-processor.

2 Ground sensors

The factory firmware of both the e-puck1 and e-puck2 supports the ground sensors extension: for e-puck1 refer to the section Standard firmware, for e-puck2 refer to section Factory firmware.

Once the robot is programmed with its factory firmware, you can get the values from the ground sensors through Bluetooth by putting the selector in position 3 and issueing the command m that will return 5 values, the first 3 values are related to the ground sensors (left, center, right), the last 2 values are related to the cliff extension (if available).
For more information about the Bluetooth connection refer to section Getting started (e-puck1) or Connecting to the Bluetooth (e-puck2).
For more information about the Bluetooth protocol refer to section Advanced sercom protocol.

If you couple the e-puck extension for Gumstix Overo with the ground sensor refer to the section http://www.gctronic.com/doc/index.php/Overo_Extension#Ground_sensor to have an example on how to read the sensor values.

You can find more information about the ground sensors extension module in the following link http://www.e-puck.org/index.php?option=com_content&view=article&id=17&Itemid=18.

2.1 Assembly for e-puck2

[1][2][3.1][3.2][3.3][4]
[5.1][5.2][5.3][5.4][6]
  1. Unscrew the 3 spacers and remove the battery
  2. Remove the top side from the case body gently
  3. Detach the plastic camera adapter from the camera with the help of pliers; be careful to not stress the camera flex cable. Take the new adapter (the one flat on the back) and insert it as before.
  4. Plug the ground module into its connector on the e-puck2; make the cable pass through the battery contact
  5. First push the ground module within its slot in the body case, then slide in also the top side of the robot paying attention to the motors wires position: the back battery contact must remain between the body and motors wires and make sure the wires aren't stuck in the springs. Both the ground cable and camera flex cable must bend forming an "S" shape.
  6. Push the top all way down, then remount the spacers and plug in the battery. You're done.

3 Cliff sensor

The cliff module extends the capability of the groundsensor with two additional sensors placed in front of the wheels. One possible application is that the e-puck can now detect the end of a table and react accordingly. Moreover this module can be coupled with the automatic charger for the e-puck, that could let the robot autonomously charge itself when needed. The two spring contacts adapt only to the cliff module.

3.1 Assembly

[1][2][3][4.1][4.2]
[5.1][5.2][6][7][8]
  1. Unscrew the 3 screws, unmount the e-jumper (top piece where there is the speaker) and unscrew the 3 spacers
  2. Remove the pcb from the case body gently
  3. Detach the two parts, cliff and ground pcb
  4. Plug the ground module into its connector on the e-puck
  5. Attach the cliff module to the ground module being careful to leave the battery contact in the middle
  6. Push the ground module within its slot in the body case, the cliff module will remain external
  7. Once both the modules are aligned, push them down
  8. The modules will remain really close to the case bottom; once the modules are fitted remount the spacers, the e-jumper and the screws

3.2 Electrical schema

The circuit diagram of the e-puck cliff extension is available to the community on the following link electrical schema.

3.3 Software

3.3.1 e-puck firmware

Refers to the section E-Puck Standard firmware for the firmware that need to be uploaded to the robot. Essentially the standard asercom demo (selector 3) released with the e-puck robot is extended in order to request and visualize 5 sensors values instead of 3 when issueing the m command; the sequence is: ground left, ground center, ground right, cliff right, cliff left. In order to enable the cliff sensors you need to define CLIFF_SENSORS in the asercom.c file in order to build the code parts related to this module.

3.3.2 e-puck demos

To demonstrate the capabilities of the cliff sensors module here is an MPLAB project Demo-cliff-autocharge.zip that contains two demos:

  • selector 0: in this demo the robot is eventually piloted to the charger station autonomously after moving around for some time aovoiding obstacles; the demo is shown in the video section.
  • selector 1: this is a cliff avoidance demo in which the robot is moved forward until it detects the end of the table and tries to avoid it moving back and rotating; the demo is shown in the video section.

3.3.3 Extension firmware

The ground sensor fimrware developed at EPFL (can be downloaded at the http://www.e-puck.org site from this page) was extended to interact with the additional two sensors. The source code can be downloaded from cliff-firmware; it is an MPLAB project and the MPLAB C Compiler for PIC18 MCUs is needed to build the project.
The communication between the e-puck and the module is handled through I2C (address 0xC0) and the following registers are defined:

  • 0x00: reflected light, left IR sensor - high byte
  • 0x01: reflected light, left IR sensor - low byte
  • 0x02: reflected light, center IR sensor - high byte
  • 0x03: reflected light, center IR sensor - low byte
  • 0x04: reflected light, right IR sensor - high byte
  • 0x05: reflected light, right IR sensor - low byte
  • 0x06: ambient light, left IR sensor - high byte
  • 0x07: ambient light, left IR sensor - low byte
  • 0x08: ambient light, center IR sensor - high byte
  • 0x09: ambient light, center IR sensor - low byte
  • 0x0A: ambient light, right IR sensor - high byte
  • 0x0B: ambient light, right IR sensor - low byte
  • 0x0C: software revision number
  • 0x0D: reflected light, right cliff sensor - high byte
  • 0x0E: reflected light, right cliff sensor - low byte
  • 0x0F: reflected light, left cliff sensor - high byte
  • 0x10: reflected light, left cliff sensor - low byte
  • 0x11: ambient light, right cliff sensor - high byte
  • 0x12: ambient light, right cliff sensor - low byte
  • 0x13: ambient light, left cliff sensor - high byte
  • 0x14: ambient light, left cliff sensor - low byte

3.3.4 e-puck2 demos

The same demo developed for the e-puck1 that let the robot autonomously reach the charging station and charge itself is available also for the e-puck2. You can find the source code in the following repository https://github.com/e-puck2/e-puck2_cliff_autocharge.

3.4 Images

Robot equipped with the cliff sensor:

The robot can be easily moved to the charging station as shown in the following figure:

The following figure shows the two additional sensors (near the wheels) mounted on the cliff module and the three frontal sensors of the ground module:

3.5 Videos