ReadMe

Jijun Wang (jiw1@pitt.edu)

 

Requirements:

 

  1. Windows OS
  2. UT2003
  3. UT2003 2225 patch. You can find it at http://usl.sis.pitt.edu/wjj/USAR/Simulator/ut2003-winpatch2225.exe
  4. You may need to install joystick.

 

How to install:

 

1.    Copy all the files in http://usl.sis.pitt.edu/wjj/USAR/Simulator/UT2003/ to your ut2003 directory. Or you can download the package http://usl.sis.pitt.edu/wjj/USAR/Simulator/UT2003.tar.gz and then restore it to your ut2003 directory.

2.    Copy the control interface http://usl.sis.pitt.edu/wjj/USAR/Simulator/USAR_UI.tar.gz to your machine. With this interface you can test the USAR Simulator.

 

How to run:

 

1. Start the UT server. Execute the "ut2003/system/usar_s.bat"

 

2. Run the UT client. Execute the "ut2003/system/usar_c.bat". To change viewpoint, use mouse button. Left button changes to robot’s viewpoint. Right button changes back to the third person viewpoint.

 

3. Run the USAR Control Interface. Execute "Usar_UI/Debug/Usar.exe"

    3.1 click "Connect" to connect to the server

 

    3.2 type "INIT {ClassName USARBot.USARCar} {Location 312,-600,-305}" in the command listbox, then click "send" to send out this command.

 

    3.3, Click the button, "Command", in the "Mode" group to switch to "control mode". In control mode you can control the Robot by your joystick or keyboard+mouse. To come back to the “Command Mode”, you can click the right button of your mouse.

 

3.3.1 Control the robot by joystick:

         Push joystick forward/backward to control the robot move forward/backward.

         Push joystick to left/right side to turn the robot to left/right.

         Push POV button up/down to pitch the camera.

   Push POV button left/right to yaw the camera.

     

3.3.2 Control the robot by keyboard+mouse

         Up/Down Arrow key moves the robot forward/backward.

   Left/right Arrow key turns the robot to left/right.

   Move mouse up/down to pitch the camera.

   Move mouse left/right to yaw the camera.

 

    3.4 You also can try any commands you want by the "command" listbox.

 

Tips:

 

1.    Switch among windows: Use Alt+Tab you can switch among windows.

2.    Get control from ut2003: Press Esc can let you get window’s control again.

 

Commands for USAR:

 

Add a robot to UT world:

INIT {ClassName USARBot.USARCar} {Location x,y,z}

Ex. Add a four wheels robot:INIT {ClassName USARBot.USARCar} {Location 312,-600,-305}

    Add a two wheels robot:INIT {ClassName USARBot.USARBc} {Location 312,-600,-305}

 

Control the Robot:

DRIVE {Left float} {Right float} {Light bool} {Flip bool}

    Left: The throttle value of left engine. Value: -1.00~1.00

    Right: The throttle value of right engine. Value: -1.00~1.00

    Light: Turn on/off flashlight. Value: true/false

    Flip: Flip the robot when it fall down. Value: true

Ex. Run Forward: DRIVE {Left 1.0} {Right 1.0}

    Run Backward: DRIVE {Left -1.0} {Right -1.0}

    Turn Left: DRIVE {Left -1.0} {Right 1.0}

    Turn Right: DRIVE {Left 1.0} {Right -1.0}

    Turn On Flash Light: DRIVE {Light true}

    Flip the robot: DRIVE {Flip true}

 

Turn the robot and move it forward:

TURN {Rotation pitch,yaw,roll} {Distance float}

    Rotation: The angle the robot will turn.

Pitch: Must be 1.

Roll: Must be 1

Yaw: The turn angle. Value: -32768~32768, corresponds to –pi~pi.

    Distance: The distance the robot will move. Value: >0

Ex. Turn 90 degree and then move forward 100: TURN {Rotation 1,16384,1} {Distance 100}

 

Control the camera:

CAMERA {Rotation pitch,yaw,roll} {Zoom int}

    Rotation: The rotating rate of the camera.

              Pitch: the pitch rate.

              Yaw: the yaw rate

              Roll: the roll rate

    Zoom: Zoom in/out the camera. The int value is the value the camera will move forward. For example, {Zoom 100} will move the camear forward 100 UT units. So we get the Zoom in effect. {Zoom -100} will move the camera back, so we get zoom out effect.

Ex. Pitch Camera: CAMERA {Rotation 1000,0,0}

    Yaw Camera with speed 100: CAMERA {Rotation 1000,100,0}

    Stop Yaw Camera: CAMERA {Rotation 1000,0,0}

    Roll Camera with speed 50: CAMERA {Rotation 1000,0,50}

    Stop Roll Camera: CAMERA {Rotation 1000,0,0}

    Zoom in Camera: CAMERA {Zoom 100}

 

Control the sensor:

SENSOR {Scan true}

    Scan: open the range scanner. If you set “Scan” to true, all the range scanners mounted on the robot will scan their FOV and then stop.

Ex. If you drive the robot to some place and want to scan the range. You can send out: SENSOR {Scan true}

 

The messages from UT:

 

State Message:

STA {Time float} {State int}{Camera pitch,yaw,roll} {Attitude pitch,yaw,roll} {Location x,y,z} {LeftWheel x,y,z} {RightWheel x,y,z} {Velocity x,y,z} {LightToggle bool} {LightIntensity int}

    Time: The UT time. Starts from you start the UT server.

    State: Right now, it’s used for TURN command.

           0: I have done or these no TURN command.

           1: I’m turning.

           2: I’m moving forward.

    Camera: The attitude of the camera

    Attitude: The attitude of the robot

    Location: Position of the robot

    LeftWheel: The velocity of the left wheel. It’s a vector.

    RightWheel: The velocity of the right wheel. It’s a vector.

    Velocity: The velocity of the robot.

    LightToggle: Whether the headlight has been turned on.

                 True: turn on

                 False: turn off

    LightIntensity: Light intensity of the headlight. Right now, it always is 100.

 

Ex: STA {Time 8.29} {Camera 63541,32768,0} {Attitude 65533,0,0} {LeftWheel -1.17,0.00,1.19} {RightWheel -1.17,-0.00,1.19} {Velocity -1.59,0.00,-1.95} {LightToggle False} {LightIntensity 100}

 

Sensor Message:

SEN {Type xxx} {Name xxx ??? xxx} {Name xxx ??? xxx} ……

    Type xxx: ‘xxx’ is the sensor type.

    Name xxx: ‘xxx’ is the sensor name.

    ??? xxx: is the sensor data. For different sensor type, it will have different name (???) and value (xxx).

Ex: SEN {Type Range} {Name Right Range 144.69} {Name Left Range 240.19}

SEN {Type RangeScanner} {Name Scanner1} {Location 426.28,-599.95,-474.12 Rotation 15136,16384,16} {Data 266.55,359.43,364.46,377.57,400.25,1000.00,1000.00,1000.00,916.72,852.27,811.95,790.88,786.71,799.01,829.10,880.44,739.17,618.73,541.64,490.64,457.05,436.19}

SEN {Type HumanMotion} {Name Motion} {MovingSpeed 7.25}

SEN {Type Sound} {Name Sound} {Loudness 17.22} {Duration 6.63}

 

Configure USAR.ini:

 

[USARBot.USARCar] & [USARBot.USARBc] sections:

bSpeedControl: True: Turn on speed control loop for robot.

               False: Turn off speed control loop.

bCameraControl: True: Turn on camera control loop for robot.

                False: Turn off camera control loop.

bDedbug: True: Turn on debug information.

         False: Turn off debug information.

MsgTimer: The time interval of sending out messages. This will decide how fast the UT sends messages to outside. Value: >0   Unit: second.

Sensors: The parameters of the range sensor.

        SensorClass: The sensor class. You can build your own sensor model and set your sensor class name as SensorClass.

        SenName: Name of the sensor.

        Position: The position of the range sensor.

                  X: The offset along the forward/backward axis. Positive value means offset in backward direction.

                  Y: The offset along the left/right axis. Positive value means offset in left side direction.

                  Z: The offset along the up/down axis. Positive value means offset in up direction.

        Direction: The direction of the range sensor.

 

[USARBot.ViewTestPlayerController] section:

myFOV: The Field-Of-View of the robot.

 

[USARBot.RangeSensor] section:

HiddenSensor: Default value is “true”. The sensor will not be displayed on the client. This can help us speed up the client. The value “false” will display the sensor. It is used for debugging purpose. With it, you can know if the sensor is mounted on the desired position.

MaxRange: The maximum testing range of the range sensor

OutputCurve: The curve is used to adjust the range data. With this curve, we can simulate the nonlinear input-output relationship.

 

[USARBot.RangeScanner] section:

HiddenSensor: The same as RangeSensor.

MaxRange: The maximum testing range of the range sensor

OutputCurve: The curve is used to adjust the range data. With this curve, we can simulate the nonlinear input-output relationship.

ScanInterval: The time interval between two scanning.

Resolution: Step angle of scanning.

ScanFov: The filed of view of the scanner.

bYaw: If it is set to true, yaw the scanner to scan range.

bPitch: If it is set to true, pitch the scanner to scan range.

 

[USARBot.SoundSensor] section:

HiddenSensor: The same as RangeSensor.

OutputCurve: The curve is used to adjust the range data. With this curve, we can simulate the nonlinear input-output relationship.

 

[USARBot.HumanMotionSensor] section:

HiddenSensor: The same as RangeSensor.

MaxRange: The maximum testing range of the sensor

FOV: The field of view of the sensor.

OutputCurve: The curve is used to adjust the range data. With this curve, we can simulate the nonlinear input-output relationship.

 

 

DON’T CHANGE OTHER PARAMETERS NOT MEANTIONED HERE.

 

Ex:

[USARBot.USARCar]

bSpeedControl=False

bCameraControl=False

bDebug=True

msgTimer=0.200000

Sensors=(SensorClass=class'USARBot.RangeSensor',SenName="Front",Position=(X=-80,Y=0,Z=50),Direction=(Pitch=0,Yaw=32768,Roll=0))

Sensors=(SensorClass=class'USARBot.RangeSensor',SenName="Back",Position=(X=80,Y=0,Z=50),Direction=(Pitch=0,Yaw=0,Roll=0))

Sensors=(SensorClass=class'USARBot.RangeSensor',SenName="Left",Position=(X=0,Y=40,Z=50),Direction=(Pitch=0,Yaw=16384,Roll=0))

Sensors=(SensorClass=class'USARBot.RangeSensor',SenName="Right",Position=(X=0,Y=-40,Z=50),Direction=(Pitch=0,Yaw=-16384,Roll=0))

Sensors=(SensorClass=class'USARBot.RangeScanner',SenName="Scanner1",Position=(X=110,Y=0,Z=0),Direction=(Pitch=16384,Yaw=16384,Roll=0))

 

[USARBot.USARBc]

bSpeedControl=True

bCameraControl=True

msgTimer=0.200000

Sensors=(SensorClass=class'USARBot.RangeSensor',SenName="Front",Position=(X=-60,Y=0,Z=50),Direction=(Pitch=0,Yaw=32768,Roll=0))

 

[USARBot.RangeSensor]

MaxRange=1000.000000

OutputCurve=(Points=((InVal=0.000000,OutVal=0.000000),(InVal=1000.000000,OutVal=1000.000000)))

 

[USARBot.RangeScanner]

MaxRange=1000.000000

ScanInterval=0.0

Resolution=1500

ScanFov=32768

bPitch=true

OutputCurve=(Points=((InVal=0.000000,OutVal=0.000000),(InVal=1000.000000,OutVal=1000.000000)))

 

[USARBot.SoundSensor]

HiddenSensor=True

OutputCurve=(Points=((InVal=0.000000,OutVal=0.000000),(InVal=1000.000000,OutVal=1000.000000)))

 

[USARBot.HumanMotionSensor]

HiddenSensor=True

MaxRange=1000

FOV=60

OutputCurve=(Points=((InVal=0.000000,OutVal=0.000000),(InVal=1000.000000,OutVal=1000.000000)))

 

[USARBot.ViewTestPlayerController]

myFOV=40

EnemyTurnSpeed=45000

InputClass=Class'Engine.PlayerInput'

 

Others:

Scale 49.75 cm = 19.5866 " = 240 UT units

      1 inch = 12.25 UT units

      1 cm = 4.82 UT units

      1 UT unit = 0.0816 inch = 0.207 cm