Webots Reference Manual

previous page go up next page

Thanks

1. Introduction

2. Node Chart

3. Nodes and API Functions

4. Motion Functions

5. Prototypes

6. Physics Plugin

7. Fast2D Plugin

8. MTN Functions

9. Webots World Files

     

3.6 Charger

Derived from Solid.

Charger {
  MFFloat   battery        []
  SFColor   emissiveColor  0 1 0   # [0,1]
  SFBool    gradual        TRUE
  SFFloat   radius         0.04   # (0,inf)
}

3.6.1 Description

The Charger node is used to model a special kind of battery charger for the robots. A robot has to get close to a charger in order to recharge itself. A charger is not like a standard battery charger connected to a constant power supply. Instead, it is a battery itself: it accumulates energy with time. It could be compared to a solar power panel charging a battery. When the robot comes to get energy, it can't get more than the charger has presently accumulated.

3.6.2 Field Summary

The fields specific to the Charger node are:

  • battery: this field should contain three values: the present energy of the charger (J), its maximum energy (J) and its charging speed (W=J/s).

  • emissiveColor: color of the indicator node (see below) when the charger is full.

  • gradual: defines the behavior of the indicator. If set to TRUE, the indicator displays a progressive transition between its original color and the emissiveColor specified in the Charger node, corresponding to the present level of charge. If set to FALSE, the indicator remains its original color until the charger is fully charged (i.e., the present energy level equals the maximum energy level). Then, it switches to the specified emissiveColor.

  • radius: radius of the charging area in meters. The charging area is a disk centered on the origin of the charger coordinate system. The robot can recharge itself if its origin is in the charging area (see figure 3.2).

    charger

    Figure 3.2: The sensitive area of a charger

A Charger node may contain a Solid node as one of its children. If the name field of this Solid node is "indicator", then its emissiveColor (located in its Material node) is used to display the current status of the charger. The emissiveColor value of the Charger node is used when the charger is full of energy; the emissiveColor of the indicator is used when the charger is empty. If the gradual field is set to TRUE, the apparent color of the indicator has a value between its original value and the value specified in the Charger node, proportional to the present energy level of the charger. Otherwise, the color is either the original one (charger not fully charged, i.e., with present energy less than maximum energy) or the one specified in the Charger node (charger fully charged, i.e., with present energy equaling maximum energy).

A Charger node may also contain a PointLight node as one of its children. The intensity field of this point light follows a rule similar to the color of the indicator described earlier, taking into account the gradual field of the Charger node. The intensity of the point light is zero when the charger is empty. It equals its original value (1 by default) when the charger is full. If the charger is set to gradual, intensity values are proportional to the present level of energy in the charger. Otherwise, the point light is on only when the charger is fully charged.

previous page go up next page
^ page top ^

  E-mail to webmaster Last updated: Copyright © 2008 Cyberbotics Ltd.