soccer_pycontrol.path.Path

class soccer_pycontrol.path.Path(start_transform: Transformation, end_transform: Transformation)[source]

Bases: object

Path of the robot, imagine a line underneath the torso on the ground between the two feet Consists of a list of bezier or short path sections

__init__(start_transform: Transformation, end_transform: Transformation)[source]

Initialization function for Path, creates a single path section, other path sections are only added when the route needs to change

Parameters:
  • start_transform – Starting Robot Position

  • end_transform – Ending Robot Position

Methods

__init__(start_transform, end_transform)

Initialization function for Path, creates a single path section, other path sections are only added when the route needs to change

angularStepCount()

How many footsteps used for turning the robot takes to run this path

createPathSection(start_transform, end_transform)

Create a path section between the two transforms

duration()

Get the duration in seconds for a given path

dynamicallyUpdateGoalPosition(t, end_transform)

Updates the goal position dynamically (not working)

estimatedPositionAtTime(t)

Get an estimated position of the robot given a certain time.

getSubPathSectionAndRatio(r)

Returns the PathSection and ratio of the pathsection given a ratio of the entire Path

getTimePathOfNextStep(t)

Get a series of information about the path at a certain time

getTorsoStepPose(step_num)

Get the torso position given a certain torso step

isFinished(t)

Whether the path is complete

isShortPath(start_transform, end_transform)

Determine whether the movement can be done with a short path of another type of path (bezier).

linearStepCount()

How many footsteps used for moving forward and backwards the robot takes to run this path

poseAtRatio(r)

Get the position given the ratio of the entire path

show()

Show some plots about the path

terminateWalk(t)

Get estimated path ratio from the current time plus one more step, and then find the distance of that ratio and set the distance.

torsoStepCount()

Number of torso steps, a torso step is the amount of steps the body moves (similar to foot steps, but doesn't include turning in place.

torsoStepTime()

The average time it takes for the robot's torso to make a single step

Attributes

start_transformed_inv

step_precision

How precise the curves are calculated.

path_sections

A list of Path Sections used to define the path

angularStepCount()[source]

How many footsteps used for turning the robot takes to run this path

Returns:

The number of steps

createPathSection(start_transform: Transformation, end_transform: Transformation) PathSection[source]

Create a path section between the two transforms

Parameters:
  • start_transform – Starting robot position

  • end_transform – Ending robot position

Returns:

Depending on whether its a short path, a bezier path or a short path

duration() float[source]

Get the duration in seconds for a given path

Returns:

Duration of the paths in seconds

dynamicallyUpdateGoalPosition(t, end_transform)[source]

Updates the goal position dynamically (not working)

Parameters:
  • t – Current time

  • end_transform – New goal position

estimatedPositionAtTime(t) Transformation[source]

Get an estimated position of the robot given a certain time. Used by strategy simulation. Do not use in the walking engine

Parameters:

t – The relative time of the path

Returns:

Position of the torso at the given time

getSubPathSectionAndRatio(r: float) -> (<class 'soccer_pycontrol.path_section.PathSection'>, <class 'float'>)[source]

Returns the PathSection and ratio of the pathsection given a ratio of the entire Path

Parameters:

r – ratio of the entire Path

Returns:

Path section and the ratio of the Path Section

getTimePathOfNextStep(t) -> (<class 'float'>, <class 'float'>, <class 'float'>, <class 'soccer_pycontrol.path_section.PathSection'>, <class 'float'>)[source]

Get a series of information about the path at a certain time

Parameters:

t – The time relative to the entire path’s time

Returns:

a list of relavant information

getTorsoStepPose(step_num) Transformation[source]

Get the torso position given a certain torso step

Parameters:

step_num – The body step of the path

Returns:

A position of the robot’s torso at the spot

isFinished(t)[source]

Whether the path is complete

:param t The relative time of the path :return: True if the path has been completed walking

isShortPath(start_transform: Transformation, end_transform: Transformation)[source]

Determine whether the movement can be done with a short path of another type of path (bezier). Bezier is used only on simple forward paths, the rest use ShortPath

Parameters:
  • start_transform – The start transform

  • end_transform – The end transform

Returns:

linearStepCount() float[source]

How many footsteps used for moving forward and backwards the robot takes to run this path

Returns:

The number of steps

path_sections

A list of Path Sections used to define the path

poseAtRatio(r: float) Transformation[source]

Get the position given the ratio of the entire path

Parameters:

r – ratio of the entire Path

Returns:

Position of the torso at that time

show()[source]

Show some plots about the path

step_precision

How precise the curves are calculated. The amount of movement per given step_precision is calculated (s)

terminateWalk(t)[source]

Get estimated path ratio from the current time plus one more step, and then find the distance of that ratio and set the distance. Stops the walking at a given time, ends the current PathSection’s trajectory

Parameters:

t – Time relative to the Path

torsoStepCount() int[source]

Number of torso steps, a torso step is the amount of steps the body moves (similar to foot steps, but doesn’t include turning in place.

Returns:

torsoStepTime()[source]

The average time it takes for the robot’s torso to make a single step

Returns:

time in seconds