Config

From Mobility Base SDK - Wiki
Jump to: navigation, search

Unpacking Your New Base -> Mobility Base Setup -> Battery Replacement -> Wireless Joystick -> SDK Setup -> Config -> Launch -> Mounting Baxter and Backpack -> Motion Demo -> Connecting to Baxter and/or Remote Computer

The Mobility Base accessories require environment variables to make the SDK aware of the configuation. If your Mobility Base does not include any accessories (front/rear/birdcage lidars), this step can be skipped.

Floor Camera

  • Set MB_FLOOR_CAMERA to 1 if the camera is desired, otherwise 0
  • Optionally set MB_FLOOR_CAMERA_FRAME_RATE in Hz. The range is 1 to 60. The default is 15.
  • Optionally set MB_FLOOR_CAMERA_EXPOSURE in µs. The range is anywhere between 5 to 500. Default is 14.
  • Set MB_FLOOR_CAMERA_RECTIFY to 'true' if image rectification required, otherwise set to 'false'.

Hokuyo USB Device Path

The Hokuyo USB laser scanners are avaiable both as /dev/ttyACM<x> and /dev/sensors/hokuyo_<serial>. The ttyACM<x> device address is affected by the order serial devices are plugged in. For this reason, it is recommended to use the serial number based device path. Hokuyo USB devices can be listed with the following command: ls /dev/sensors/

Front Laser (Hokuyo)

  • Set MB_LASER_FRONT_HOKUYO to 1 if present, otherwise 0
  • Select the type by setting one of MB_LASER_FRONT_HOKUYO_URG_04LX, MB_LASER_FRONT_HOKUYO_URG_04LX, or MB_LASER_FRONT_HOKUYO_URG_04LX to 1
  • Set the value of MB_LASER_FRONT_HOKUYO_IP or MB_LASER_FRONT_HOKUYO_DEV

Rear Laser (Hokuyo)

  • Set MB_LASER_REAR_HOKUYO to 1 if present, otherwise 0
  • Select the type by setting one of MB_LASER_REAR_HOKUYO_URG_04LX, MB_LASER_REAR_HOKUYO_URG_04LX, or MB_LASER_REAR_HOKUYO_URG_04LX to 1
  • Set the value of MB_LASER_REAR_HOKUYO_IP or MB_LASER_REAR_HOKUYO_DEV

Birdcage Laser R2000

  • Set MB_LASER_BIRDCAGE_R2000 to 1 if present, otherwise 0
  • Set MB_LASER_BIRDCAGE_R2000_IP to the laser ip address
  • Set the values of MB_LASER_BIRDCAGE_R2000_FREQ and MB_LASER_BIRDCAGE_R2000_SAMPLES

Birdcage Laser VLP16

  • Set MB_LASER_BIRDCAGE_VLP16 to 1 if present, otherwise 0
  • Set MB_LASER_BIRDCAGE_VLP16_IP to the laser ip address (only necessary if there are other Velodyne lidars on the network)
  • Set MB_LASER_BIRDCAGE_VLP16_FLIP to 1 if mounted upside down, otherwise 0

Example config script

It is recommended to create a bash script and source the script in your ~/.bashrc file so the environment variables are present in every terminal.

# Place in your ~/.bashrc file
source ~/mobility_base_config.bash
#!/bin/bash
# Export environment configuration for the Mobility Base

# Floor camera
export MB_FLOOR_CAMERA=1
export MB_FLOOR_CAMERA_FRAME_RATE=
export MB_FLOOR_CAMERA_EXPOSURE=
export MB_FLOOR_CAMERA_RECTIFY=true

# Front laser (Hokuyo)
export MB_LASER_FRONT_HOKUYO=1
export MB_LASER_FRONT_HOKUYO_URG_04LX=0
export MB_LASER_FRONT_HOKUYO_UST_10LX=0
export MB_LASER_FRONT_HOKUYO_UST_20LX=1
export MB_LASER_FRONT_HOKUYO_IP=192.168.0.10
export MB_LASER_FRONT_HOKUYO_DEV=

# Rear laser (Hokuyo)
export MB_LASER_REAR_HOKUYO=1
export MB_LASER_REAR_HOKUYO_URG_04LX=1
export MB_LASER_REAR_HOKUYO_UST_10LX=0
export MB_LASER_REAR_HOKUYO_UST_20LX=0
export MB_LASER_REAR_HOKUYO_IP=
export MB_LASER_REAR_HOKUYO_DEV=/dev/sensors/hokuyo_H1312846

# Birdcage laser (R2000)
export MB_LASER_BIRDCAGE_R2000=0
export MB_LASER_BIRDCAGE_R2000_IP=192.168.0.11
export MB_LASER_BIRDCAGE_R2000_FREQ=35
export MB_LASER_BIRDCAGE_R2000_SAMPLES=3600

# Birdcage laser (VLP16)
export MB_LASER_BIRDCAGE_VLP16=0
export MB_LASER_BIRDCAGE_VLP16_IP=
export MB_LASER_BIRDCAGE_VLP16_FLIP=0

Next Steps

Launch