Fejemis bridge

From Rsewiki
Revision as of 11:04, 17 October 2023 by Jca (Talk | contribs)

Jump to: navigation, search

Back to fejemis.


Bridge overview

Bridge-overview.png

The bridge combines different inputs from hardware sources to a single message database from which the messages can be seubscriber. This makes the bridge a combination of a bridge (slightly reformatting the messsages) and a message broker, from which clients can subscribe to messages. Messahes can also be send from any of these broker-clients.

Selected interface points are made available as ROS messages and key commands can be received from ROS.

The main input and output connections are to the Drive and Front Teensy boards, these connections are protected by a simple checksum, the ';99' part, to avoid false or half messages when powering up.

  • All data items are single lines of text. These data items start with a key and optionally additional parameters. The data item has further a data source associated.
  • Data items can be directed to a destination (data forward).
  • A data item can be requested or updates to a data item can be subscribed.

The ini-file can be a set of directed commands, e.g. calibration data or subscription of data from the data sources.

All data items can be logged individually with a timestamp.

The client GUI is to help configure/calibrate the sensors and low-level control loops.

Bridge initialization file

The initialization file (called bridge.ini) holds a list of commands that will be handled by the bridge.

Most commands start with a destination keyword. If that interface is opened after the initial read of the initialization file, then the file is read again for the commands destinated for this interface.

An example of an initialization file could be:

; inifile to fejemis bridge
; start both Teensy connections
bridge teensy 0 1
bridge teensy 1 1
; front teensy help
# Text from ini-loader
drive posei
drive veli
drive gyroi
drive confi
; subscribe to regular stream of data
drive sub pose 10
drive sub gyro 11
drive sub enc 9
drive sub bat 400
drive sub conf 801
drive sub hbt 601
drive sub mot 23
drive sub id 2000
drive sub ver 2001
; 
front led 1 200 0 0
front led 2 200 0 0
front led 3 200 0 0
front led 4 200 0 0
front led 5 200 0 0
front led 6 200 0 0
front sub id 2000
front sub ver 2001
front sub hbt 601
; debug with regbot
regbot sub pose 40
regbot sub ver  2000
regbot sub hbt 620 
max values for RC control
velocity (m/sec), turnrate deg/sec and slow factor (0.2'ish)

joy rcmax 2.0 45 0.2

drive
pose logopen
drive
gyro logopen
allow robot to drive
drive arm
send RC to both front and drive

gamepad:rc subscribe -1 front gamepad:rc subscribe -1 drive gamepad:rc subscribe -1 regbot

send steer angle to drive

front:fwl subscribe -1 drive

command-line options
if bridge is run from the command line

regbot:# subscribe -1 console front:# subscribe -1 console drive:# subscribe -1 console

publish pose to ROS
if source is a regbot
regbot
pose subscribe -1 ros
if source is fejemis
drive
pose subscribe -1 ros


Management commands

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox