Skip to content

User and developer guide

Xuepeng Xu edited this page Jun 9, 2015 · 7 revisions

#User and Developer Guide

The VSmart provides a few commands which allow users to interact with the system.

  • help: show help information.
  • quit: quit the VSmart unit.
  • control: allow user to control the VSmart unit to perform some actions, such as move forward and backward, turn left and right.
  • position: show current position of the unit.
  • safe mode: switch the robot to safe mode.
  • full mode: switch the robot to full mode.
  • reconnect: reconnect the computer with robot.
  • setpos: set a new position.
  • set plugin: choose a plugin.
  • unit mode: choose a unit mode. The mode includes, free, follow, lead, customized. A follow mode means the unit will follow the actions of another unit. Customized mode means the unit will use a plugin.
  • set target: If the unit mode is follow mode, the command can be used to set the target.
  • enable executor: enable the executor of a plugin.
  • enable receiver: enable the receiver of a plugin.
  • disable executor: disable the executor of a plugin.
  • disable receiver: disable the receiver of a plugin.
  • info: show the unit information.
  • setPower: set tranceiver power.
  • setRate: set tranceiver rate.

Safe mode and full mode:

In the system, we use iRobot Create as our executor. The robot has two modes, safe mode and full mode. The detail can be found in the documentation.

Unit mode:

The unit has four mode: free, lead, follow and customized. Free mode allows the user to control the vehicle. Lead mode is similar to free mode, the only difference is that it sends the vehicle leading information to the following vehicle. Follow mode allow the vehicle to follow the action of the leading vehicle. Use the "set target" to set the leading vehicle. The customized mode allows the unit perform the actions defined by plugin. The customized mode usually is used with plugin.

Plugin:

In VSmart, user can customize the system with some new features. These features can be added as plugin.

A plugin has three components, customized event, customized executor and customized receiver. The components can be developed in Python.

Unit Config:

The system allow user to setup the configuration. The configuration file, unit_config.ini, is in the Controller_Module directory. It includes the following sections and attributes:

[CarInfo]
CarID = Car2

[UnitSetting]
# in second
MiniInterval = 0.1

[Plugin]
CustomizedEvent = No
CustomizedExecutor = No
CustomizedReceiver = Yes

[Message]
SendCarCar = Yes
SendCustomized = No

[Mode]
#Lead:1, Follow:2, Free:3, Customized:4
InitialMode = 3

[Socket]
PortNumber = 10124

[iRobot]
Port = /dev/ttyUSB0

CarID is unique for a vehicle. Each VSmart unit has a different ID.

MiniInterval is the interval for background thread, which includes the actions such as sending basic vehicle message, executing customized executor.

Plugin section declares whether to use these three components.

Message section is disabled.

Mode section indicates the initial mode

Socket section defines the port to use between transceiver and unit system.

iRobot defines the port used by iRobot Create.

The VSmart unit can be used with VSmart Console