Velocity Control

Velocity control enables the walk to be controlled reactively, allowing behaviors such as target tracking. It can be called as often as you like, as the most recent command overrides all previous commands.

The walk uses a preview controller to guarantee stability. This uses a preview of time of 0.8s, so the walk will take this time to react to new commands. At maximum frequency this equates to about two steps.

Parameters

  • x [-1.0 to 1.0]: specifies the length of a step along the x axis (forwards and backwards) as a fraction of maxStepX.
  • y [-1.0 to 1.0]: specifies the length of a step along the y axis (lateral) as a fraction of maxStepY.
  • theta [-1.0 to 1.0]: specifies the angle between the feet as a fraction of maxStepTheta. A positive value result in a left turn(anti-clockwise) and a negative value results in a right turn(clockwise).
  • frequency [0.0 to 1.0]: specifies the step frequency as a fraction of linear interpolation between minimumStepFrequency and maximumStepFrequency. One cycle is considered to be a phase of double leg support followed by a phase of single leg support.

Walk Forwards

# Full speed forwards x = 1.0 y = 0.0 theta = 0.0 frequency = 1.0 proxy.setWalkTargetVelocity(x, y, theta, frequency)

Walk forward

Walk Backwards

# Full speed backwards x = -1.0 y = 0.0 theta = 0.0 frequency = 1.0 proxy.setWalkTargetVelocity(x, y, theta, frequency)

Walk backward

Side Step left

# Full speed left x = 0.0 y = 1.0 theta = 0.0 frequency = 1.0 proxy.setWalkTargetVelocity(x, y, theta, frequency)

Walk left side

Side Step right

# Full speed right x = 0.0 y = -1.0 theta = 0.0 frequency = 1.0 proxy.setWalkTargetVelocity(x, y, theta, frequency)

Walk right side

Turn clockwise

# Full speed clockwise x = 0.0 y = 0.0 theta = -1.0 frequency = 1.0 proxy.setWalkTargetVelocity(x, y, theta, frequency)

Walk turn clockwise

Turn anti-clockwise

# Full speed anti-clockwise x = 0.0 y = 0.0 theta = 1.0 frequency = 1.0 proxy.setWalkTargetVelocity(x, y, theta, frequency)

Walk turn anti-clockwise

Stop walking

# The frequency will be ignored if the velocity is zero proxy.setWalkTargetVelocity(0.0, 0.0, 0.0, frequency)

Example

# Example showing the use of setWalkTargetVelocity # The parameters are fractions of the maximum Step parameters # Here we are asking for full speed forwards # with maximum step frequency x = 1.0 y = 0.0 theta = 0.0 frequency = 1.0 proxy.setWalkTargetVelocity(x, y, theta, frequency) # If we don't send another command, he will walk forever # Lets make him slow down (step length) and turn after 10 seconds time.sleep(10) x = 0.5 theta = 0.6 proxy.setWalkTargetVelocity(x, y, theta, frequency) # Lets make him slow down(frequency) after 5 seconds time.sleep(5) frequency = 0.5 proxy.setWalkTargetVelocity(x, y, theta, frequency) # After another 10 seconds, we'll make him stop time.sleep(10) proxy.setWalkTargetVelocity(0.0, 0.0, 0.0, frequency) # Note that at any time, you can use a walkTo command # to walk a precise distance. The last command received, # of velocity or position always wins





Copyright © 2010 Aldebaran-Robotics - All rights reserved