Our work at CMU's Robotics Institute working on HRI with CoBots this summer.

Friday, August 14, 2015

SpaceTime User Guide

Info for spaceTimeTraj.py
-------------------------

This program combines the ability to generate spatial features of a path with
the ability to generate temporal features of a path.

python prog.py goalx goaly goalangle goaldist numsines amp exp gaze fraction startvel acc [hes_dur]

Parameters
----------

GOAL SETTINGS:

  1. Goal x
    - x location the goal that the CoBot's path approaches

  2. Goal y
    - y location the goal that the CoBot's path approaches

  3. Goal angle
    - CoBot's final orientation, relative to the goal. If you don't want the final
      orientation to differ from the path orientation, enter None instead of a float.

  4. End pose distance to goal
    - CoBot's distance from the goal at its final position (stopped at
      end of path). Note that this distance is subtracted along the central
      axis of the path rather than along the path itself.

SPACE FEATURES:

  5. NumSines
    - number of periods of the sine curve that occur over the course of the path

  6. Amplitude
    - peak distance of the path from the center axis

  7. Exponent
    - you should set this to 1 unless aiming for a 'hooked' path that moves
      gradually away from the center axis before turning back towards the goal
      near the end. The higher the exponent, the sharper the turn.

  8. Gaze
    options:
    - path: CoBot orients along the center of the path
    - goal: CoBot always orients toward goal as it travels along path
    - other possibly useful orientations can be found in trajectoryWithSpace.py

TIME FEATURES:

  9A. Fraction of path (components should sum to 1, see below)
    - amount of path this segment will be (half of the path is .5)
    - note: this number on all segments must add to 1 (if the first segment
      has a decimal amount of .3 and there are two segments, the second must
      have a decimal amount of .7)

  9B. Start velocity
     - the velocity at which CoBot should travel at the start of this segment

  9C. Acceleration
     - acceleration along this path segment

  Repeat params 9A-C for as many path segments  as you like.

  optional final argument - if a stopping hesitation is created (a segment with
       arguments 0 0 0) a final argument should be added which is the duration of
       the hesitation in seconds (though in execution this number of seconds
       is not completely accurate). If this final argument is not included,
       CoBot will very briefly stop at the hesitation.


Notes
-----

  - The program can currently handle only one stopping hesitation on a single
    path.
  - The duration of the stopping hesitation is not totally accurate and may
    vary between the simulator and the real robot.
  - The program will not run if the decimal amounts of all segments do not
    add up to 1.
  - CoBot's minimum speed is 0.2 m/s, if it tries to decelerate below that speed
    an error message will say "Reached minimum speed, continuing at 0.2m/s"
  - CoBot does have a maximum speed, and a similarly if it tries to accelerate
    above that speed it will continue at the max speed (although I don't know
    what that speed is)


Examples
--------

-Endpose features: ends with an orientation angled along the path and stops 0.5 meters from the goal
-Spatial features: straight linear path
-Temporal features: constant velocity of 1m/s with a 1.5 second stopping hesitation halfway along path

python spaceTimeTraj.py  x y  None 0.5  0.0 0 1 path  .5 1 0 0 0 0 .5 1 0 1.5


- Endpose features: ends with an orientation turned -1.5 radians away from the goal, stops 0 meters from the goal
- Spatial features: single sine wave with an amplitude of 0.25 meters, looking along the path
- Temporal features: travels at 1m/s for 60% of the path, then slows to minimum speed for 10% of the path and accelerates along the remaning 30% of path

python spaceTimeTraj.py  x y  -1.5 0  2.0 .25 1 center  .6 1 0 .1 .2 0 .3 .2 1








No comments:

Post a Comment