timor.task.Goals

Classes

At

A goal that is achieved when the robot is at a certain position for at least one time step t.

Follow

This goal is achieved if the robot follows a prescribed end-effector trajectory.

GoalBase

The base implementation for a task goal.

GoalWithDuration

Any goal that needs to test more than a single time-step to be achieved.

Pause

This goal is achieved if the robot does not move for a preconfigured duration.

Reach

A goal that is achieved when the robot is at a certain position for at least one time step at zero velocity

ReturnTo

This goal is achieved when the robot returns to the state it was in at a previous goal

Module Contents

class timor.task.Goals.At(ID, goalPose, constraints=None)
Inheritance diagram of timor.task.Goals.At

A goal that is achieved when the robot is at a certain position for at least one time step t.

The robot does not need to be still standing, though.

Pass a desired pose

Parameters:
__eq__(other)

At goals are same if they have the same constraints and desired pose

__getstate__()

Return objects which will be pickled and saved.

__hash__()

Hashes the goal by its id

__setstate__(state)

Take object from parameter and use it to retrieve class state.

__slots__ = ()
_achieved(solution, t_goal, idx_goal)

Returns true, if the solution satisfies this goal.

Parameters:
Returns:

True if the end effector placement at time t is within the defined tolerances for the desired pose

Return type:

bool

_assert_constraints_local()

Checks that the constraints of this goal have a “local meaning”.

Raises:

ValueError if one of the constraints would be better off as a global constraint.

_constraints_serialized()
Return type:

List[Dict[str, any]]

static _deduce_package_dir(filepath, content)

Logic for deducing the package directory if the JSONable object is loaded from a file.

Parameters:
  • filepath (pathlib.Path) – The path to the file.

  • content (Union[Dict, List]) – The content of the file parsed into a dictionary.

Note:

This method can be overridden by subclasses to provide custom package directory resolution; e.g. Task.py.

Return type:

pathlib.Path

_get_t_idx_goal(solution)

Finds the time t and the index within the time array idx at which the goal is achieved.

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

Tuple[float, int]

_id = ''
_valid(solution, t_goal, idx_goal)

Checks all goal-level constraints

Parameters:
Return type:

bool

achieved(solution)

Calls the custom _achieved method and checks that constraints are held

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

bool

constraints = None
classmethod from_json_data(d, *args, **kwargs)

Loads the At goal to a dictionary description.

Parameters:

d (Dict[str, any])

classmethod from_json_file(filepath, *args, **kwargs)

Factory method to load a class instance from a json file.

Parameters:
  • filepath (Union[pathlib.Path, str]) – The path to the json file.

  • args – Additional arguments to pass to the from_json_data factory method of the specific class.

  • kwargs – Additional arguments to pass to the from_json_data factory method of the specific class.

classmethod from_json_string(s, *args, **kwargs)

Create from a json string.

Parameters:

s (str)

static goal_from_json_data(description, frames)

Maps a json description to a goal instance

Parameters:
Return type:

GoalBase

goal_pose: timor.utilities.tolerated_pose.ToleratedPose
green_material
property id: str

The unique goal identifier

Return type:

str

property nominal_goal

The nominal goal pose

to_json_data()

Dumps the At goal to a dictionary description.

Return type:

Dict[str, any]

to_json_file(save_at, *args, **kwargs)

Writes the instance to a json file.

Parameters:

save_at (Union[pathlib.Path, str]) – File location or folder to write the class to.

to_json_string()

Return the json string representation.

Return type:

str

visualize(viz, scale=0.33, show_name=False)

Shows an error pointing towards the desired position

Parameters:
  • viz (pinocchio.visualize.MeshcatVisualizer)

  • scale (float)

  • show_name (bool)

Return type:

None

class timor.task.Goals.Follow(ID, trajectory, external_forces=None, external_torques=None, force_torque_reference_frame='world', constraints=None)
Inheritance diagram of timor.task.Goals.Follow

This goal is achieved if the robot follows a prescribed end-effector trajectory.

Follow a given trajectory.

Parameters:
  • ID (str) – The goal ID

  • trajectory (timor.utilities.trajectory.Trajectory) – The trajectory to follow (a sequence of desired poses)

  • external_forces (Optional[Collection[float]]) – An external force to be applied to the robot during execution of the goal

  • external_torques (Optional[Collection[float]]) – An external torque to be applied to the robot during execution of the goal

  • force_torque_reference_frame (str) – The reference frame in which forces/torques are expressed

  • constraints (Sequence[timor.task.Constraints.ConstraintBase]) – Goal-level constraints

__eq__(other)

Two follow goals are equal if they have the same duration, trajectory and constraints.

__getstate__()

Return objects which will be pickled and saved.

__hash__()

Hashes the goal by its id

__setstate__(state)

Take object from parameter and use it to retrieve class state.

__slots__ = ()
_achieved(solution, t_goal, idx_goal)

Implements check if goal achieved at claimed time

Note:

Side-effect if desired trajectory is not timed: Will set self.duration such that the trajectory is followed in the time-interval [t_goal-duration, t_goal]. This allows constraint checking in _valid to know all time-steps within this goal.

Parameters:
  • solution (timor.task.Solution.TrajectorySolution)

  • t_goal (float)

  • idx_goal (int)

Return type:

bool

_assert_constraints_local()

Checks that the constraints of this goal have a “local meaning”.

Raises:

ValueError if one of the constraints would be better off as a global constraint.

_constraints_serialized()
Return type:

List[Dict[str, any]]

static _deduce_package_dir(filepath, content)

Logic for deducing the package directory if the JSONable object is loaded from a file.

Parameters:
  • filepath (pathlib.Path) – The path to the file.

  • content (Union[Dict, List]) – The content of the file parsed into a dictionary.

Note:

This method can be overridden by subclasses to provide custom package directory resolution; e.g. Task.py.

Return type:

pathlib.Path

_duration
_external_forces: numpy.ndarray = None
_external_torques: numpy.ndarray = None
_get_t_idx_goal(solution)

Finds the time t and the index within the time array idx at which the goal is achieved.

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

Tuple[float, int]

_id = ''
_trajectory: timor.utilities.trajectory.Trajectory
_valid(solution, t_goal, idx_goal)

A goal with duration needs to ensure that its constraints hold at all time-steps within this duration.

Parameters:
Return type:

bool

achieved(solution)

Calls the custom _achieved method and checks that constraints are held

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

bool

constraints = None
epsilon: float = 1e-09
force_torque_reference_frame: str | None = 'world'
classmethod from_json_data(d, *args, **kwargs)

Loads the Follow goal from a dictionary description.

Parameters:

d (Dict[str, any])

classmethod from_json_file(filepath, *args, **kwargs)

Factory method to load a class instance from a json file.

Parameters:
  • filepath (Union[pathlib.Path, str]) – The path to the json file.

  • args – Additional arguments to pass to the from_json_data factory method of the specific class.

  • kwargs – Additional arguments to pass to the from_json_data factory method of the specific class.

classmethod from_json_string(s, *args, **kwargs)

Create from a json string.

Parameters:

s (str)

get_time_range_goal(solution)

Get all time-steps in solution that belong to this goal’s duration as list of times and indices.

Parameters:

solution (timor.task.Solution.SolutionBase) – Solution to evaluate this goal with duration on.

Returns:

  • A tuple of times that are included in the duration of the goal

  • A range of indices into the solution’s time array that fall into the duration of this goal

Return type:

Tuple[numpy.ndarray, range]

static goal_from_json_data(description, frames)

Maps a json description to a goal instance

Parameters:
Return type:

GoalBase

green_material
property id: str

The unique goal identifier

Return type:

str

to_json_data()

Dumps the Follow goal to a dictionary description.

Return type:

Dict[str, any]

to_json_file(save_at, *args, **kwargs)

Writes the instance to a json file.

Parameters:

save_at (Union[pathlib.Path, str]) – File location or folder to write the class to.

to_json_string()

Return the json string representation.

Return type:

str

property trajectory: timor.utilities.trajectory.Trajectory

The trajectory to follow along

Return type:

timor.utilities.trajectory.Trajectory

visualize(viz, *, scale=0.33, num_markers=2, show_name=False)

Shows the follow goal with num_markers triads to show desired orientation.

Parameters:
  • num_markers (Optional[int]) – How many triads to display along the desired trajectory (2 = show at start and end of trajectory)

  • viz (pinocchio.visualize.MeshcatVisualizer)

  • scale (float)

  • show_name (bool)

Return type:

None

property wrench: numpy.ndarray

The external wrench applied to the end effector

Return type:

numpy.ndarray

class timor.task.Goals.GoalBase(ID, constraints=None)
Inheritance diagram of timor.task.Goals.GoalBase

The base implementation for a task goal.

Initiate goals with the according parameters

Parameters:
  • ID (str) – The id of the goal. This is used to identify the goal in the solution.

  • constraints (Sequence[timor.task.Constraints.ConstraintBase]) – A list of constraints that need to be satisfied for the goal to be achieved - but only here. (Which separates them from task goals which must hold for a whole task)

abstractmethod __eq__(other)

Enforce the implementation

__getstate__()

Return objects which will be pickled and saved.

__hash__()

Hashes the goal by its id

__setstate__(state)

Take object from parameter and use it to retrieve class state.

__slots__ = ()
abstractmethod _achieved(solution, t_goal, idx_goal)

Needs to be implemented by children according to the goal

Parameters:
Return type:

bool

_assert_constraints_local()

Checks that the constraints of this goal have a “local meaning”.

Raises:

ValueError if one of the constraints would be better off as a global constraint.

_constraints_serialized()
Return type:

List[Dict[str, any]]

static _deduce_package_dir(filepath, content)

Logic for deducing the package directory if the JSONable object is loaded from a file.

Parameters:
  • filepath (pathlib.Path) – The path to the file.

  • content (Union[Dict, List]) – The content of the file parsed into a dictionary.

Note:

This method can be overridden by subclasses to provide custom package directory resolution; e.g. Task.py.

Return type:

pathlib.Path

_get_t_idx_goal(solution)

Finds the time t and the index within the time array idx at which the goal is achieved.

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

Tuple[float, int]

_id = ''
_valid(solution, t_goal, idx_goal)

Checks all goal-level constraints

Parameters:
Return type:

bool

achieved(solution)

Calls the custom _achieved method and checks that constraints are held

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

bool

constraints = None
classmethod from_json_data(d, *args, **kwargs)
Abstractmethod:

Parameters:

d (Dict[str, any])

Deserializes a goal from a dictionary

classmethod from_json_file(filepath, *args, **kwargs)

Factory method to load a class instance from a json file.

Parameters:
  • filepath (Union[pathlib.Path, str]) – The path to the json file.

  • args – Additional arguments to pass to the from_json_data factory method of the specific class.

  • kwargs – Additional arguments to pass to the from_json_data factory method of the specific class.

classmethod from_json_string(s, *args, **kwargs)

Create from a json string.

Parameters:

s (str)

static goal_from_json_data(description, frames)

Maps a json description to a goal instance

Parameters:
Return type:

GoalBase

green_material
property id: str

The unique goal identifier

Return type:

str

abstractmethod to_json_data()

Returns a json-compatible dictionary representation of the goal.

Return type:

Dict[str, any]

to_json_file(save_at, *args, **kwargs)

Writes the instance to a json file.

Parameters:

save_at (Union[pathlib.Path, str]) – File location or folder to write the class to.

to_json_string()

Return the json string representation.

Return type:

str

abstractmethod visualize(viz, scale=0.33, show_name=False)

Every goal should have a visualization. The default color is green.

Parameters:
  • viz (pinocchio.visualize.MeshcatVisualizer) – A meshcat visualizer as defined in pinocchio

  • scale (float) – The visualization method assumes the robot size is ~1-2m maximum reach. Use the scale factor to adapt for significantly different sizes of robots and/or obstacles.

  • show_name (bool) – Whether to show the name of the goal in the visualization.

Return type:

None

class timor.task.Goals.GoalWithDuration(ID, duration, constraints=None)
Inheritance diagram of timor.task.Goals.GoalWithDuration

Any goal that needs to test more than a single time-step to be achieved.

This also includes checking the goal constraints at any point of the goal’s duration.

Construct a goal with duration.

Parameters:
abstractmethod __eq__(other)

Enforce the implementation

__getstate__()

Return objects which will be pickled and saved.

__hash__()

Hashes the goal by its id

__setstate__(state)

Take object from parameter and use it to retrieve class state.

__slots__ = ()
abstractmethod _achieved(solution, t_goal, idx_goal)

Needs to be implemented by children according to the goal

Parameters:
Return type:

bool

_assert_constraints_local()

Checks that the constraints of this goal have a “local meaning”.

Raises:

ValueError if one of the constraints would be better off as a global constraint.

_constraints_serialized()
Return type:

List[Dict[str, any]]

static _deduce_package_dir(filepath, content)

Logic for deducing the package directory if the JSONable object is loaded from a file.

Parameters:
  • filepath (pathlib.Path) – The path to the file.

  • content (Union[Dict, List]) – The content of the file parsed into a dictionary.

Note:

This method can be overridden by subclasses to provide custom package directory resolution; e.g. Task.py.

Return type:

pathlib.Path

_duration
_get_t_idx_goal(solution)

Finds the time t and the index within the time array idx at which the goal is achieved.

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

Tuple[float, int]

_id = ''
_valid(solution, t_goal, idx_goal)

A goal with duration needs to ensure that its constraints hold at all time-steps within this duration.

Parameters:
Return type:

bool

achieved(solution)

Calls the custom _achieved method and checks that constraints are held

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

bool

constraints = None
epsilon: float = 1e-09
classmethod from_json_data(d, *args, **kwargs)
Abstractmethod:

Parameters:

d (Dict[str, any])

Deserializes a goal from a dictionary

classmethod from_json_file(filepath, *args, **kwargs)

Factory method to load a class instance from a json file.

Parameters:
  • filepath (Union[pathlib.Path, str]) – The path to the json file.

  • args – Additional arguments to pass to the from_json_data factory method of the specific class.

  • kwargs – Additional arguments to pass to the from_json_data factory method of the specific class.

classmethod from_json_string(s, *args, **kwargs)

Create from a json string.

Parameters:

s (str)

get_time_range_goal(solution)

Get all time-steps in solution that belong to this goal’s duration as list of times and indices.

Parameters:

solution (timor.task.Solution.SolutionBase) – Solution to evaluate this goal with duration on.

Returns:

  • A tuple of times that are included in the duration of the goal

  • A range of indices into the solution’s time array that fall into the duration of this goal

Return type:

Tuple[numpy.ndarray, range]

static goal_from_json_data(description, frames)

Maps a json description to a goal instance

Parameters:
Return type:

GoalBase

green_material
property id: str

The unique goal identifier

Return type:

str

abstractmethod to_json_data()

Returns a json-compatible dictionary representation of the goal.

Return type:

Dict[str, any]

to_json_file(save_at, *args, **kwargs)

Writes the instance to a json file.

Parameters:

save_at (Union[pathlib.Path, str]) – File location or folder to write the class to.

to_json_string()

Return the json string representation.

Return type:

str

abstractmethod visualize(viz, scale=0.33, show_name=False)

Every goal should have a visualization. The default color is green.

Parameters:
  • viz (pinocchio.visualize.MeshcatVisualizer) – A meshcat visualizer as defined in pinocchio

  • scale (float) – The visualization method assumes the robot size is ~1-2m maximum reach. Use the scale factor to adapt for significantly different sizes of robots and/or obstacles.

  • show_name (bool) – Whether to show the name of the goal in the visualization.

Return type:

None

class timor.task.Goals.Pause(ID, duration, constraints=None)
Inheritance diagram of timor.task.Goals.Pause

This goal is achieved if the robot does not move for a preconfigured duration.

Construct a goal with duration.

Parameters:
__eq__(other)

Two pause goals are equal if there’s (almost) the same pause and constraints.

__getstate__()

Return objects which will be pickled and saved.

__hash__()

Hashes the goal by its id

__setstate__(state)

Take object from parameter and use it to retrieve class state.

__slots__ = ()
_achieved(solution, t_goal, idx_goal)

Returns true, if the robot does not move for a preconfigured duration, starting at t_goal.

Parameters:
Return type:

bool

_assert_constraints_local()

Checks that the constraints of this goal have a “local meaning”.

Raises:

ValueError if one of the constraints would be better off as a global constraint.

_constraints_serialized()
Return type:

List[Dict[str, any]]

static _deduce_package_dir(filepath, content)

Logic for deducing the package directory if the JSONable object is loaded from a file.

Parameters:
  • filepath (pathlib.Path) – The path to the file.

  • content (Union[Dict, List]) – The content of the file parsed into a dictionary.

Note:

This method can be overridden by subclasses to provide custom package directory resolution; e.g. Task.py.

Return type:

pathlib.Path

_duration
_get_t_idx_goal(solution)

Finds the time t and the index within the time array idx at which the goal is achieved.

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

Tuple[float, int]

_id = ''
_valid(solution, t_goal, idx_goal)

A goal with duration needs to ensure that its constraints hold at all time-steps within this duration.

Parameters:
Return type:

bool

achieved(solution)

Calls the custom _achieved method and checks that constraints are held

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

bool

constraints = None
property duration: float

Getter for explicit duration of Pause Goal.

Return type:

float

epsilon: float = 1e-09
classmethod from_json_data(d, *args, **kwargs)

Loads the Pause goal from a dictionary description.

Parameters:

d (Dict[str, any])

classmethod from_json_file(filepath, *args, **kwargs)

Factory method to load a class instance from a json file.

Parameters:
  • filepath (Union[pathlib.Path, str]) – The path to the json file.

  • args – Additional arguments to pass to the from_json_data factory method of the specific class.

  • kwargs – Additional arguments to pass to the from_json_data factory method of the specific class.

classmethod from_json_string(s, *args, **kwargs)

Create from a json string.

Parameters:

s (str)

get_time_range_goal(solution)

Get all time-steps in solution that belong to this goal’s duration as list of times and indices.

Parameters:

solution (timor.task.Solution.SolutionBase) – Solution to evaluate this goal with duration on.

Returns:

  • A tuple of times that are included in the duration of the goal

  • A range of indices into the solution’s time array that fall into the duration of this goal

Return type:

Tuple[numpy.ndarray, range]

static goal_from_json_data(description, frames)

Maps a json description to a goal instance

Parameters:
Return type:

GoalBase

green_material
property id: str

The unique goal identifier

Return type:

str

to_json_data()

Dumps the Pause goal to a dictionary description.

Return type:

Dict[str, any]

to_json_file(save_at, *args, **kwargs)

Writes the instance to a json file.

Parameters:

save_at (Union[pathlib.Path, str]) – File location or folder to write the class to.

to_json_string()

Return the json string representation.

Return type:

str

visualize(viz, scale=0.33, show_name=False)

Pause goals cannot be visualized, but the method is kept for consistency

Parameters:
  • viz (pinocchio.visualize.MeshcatVisualizer)

  • scale (float)

  • show_name (bool)

Return type:

None

class timor.task.Goals.Reach(ID, goalPose, velocity_tolerance=Tolerance.Abs6dPoseTolerance.default(), constraints=None)
Inheritance diagram of timor.task.Goals.Reach

A goal that is achieved when the robot is at a certain position for at least one time step at zero velocity

Reach a desired pose while standing still.

Parameters:
__eq__(other)

Reach goals are same if they have the same constraints, velocity, and desired pose

__getstate__()

Return objects which will be pickled and saved.

__hash__()

Hashes the goal by its id

__setstate__(state)

Take object from parameter and use it to retrieve class state.

__slots__ = ()
_achieved(solution, t_goal, idx_goal)

Returns true, if position and velocity are within the defined tolerances

Parameters:
Return type:

bool

_assert_constraints_local()

Checks that the constraints of this goal have a “local meaning”.

Raises:

ValueError if one of the constraints would be better off as a global constraint.

_constraints_serialized()
Return type:

List[Dict[str, any]]

static _deduce_package_dir(filepath, content)

Logic for deducing the package directory if the JSONable object is loaded from a file.

Parameters:
  • filepath (pathlib.Path) – The path to the file.

  • content (Union[Dict, List]) – The content of the file parsed into a dictionary.

Note:

This method can be overridden by subclasses to provide custom package directory resolution; e.g. Task.py.

Return type:

pathlib.Path

_get_t_idx_goal(solution)

Finds the time t and the index within the time array idx at which the goal is achieved.

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

Tuple[float, int]

_id = ''
_valid(solution, t_goal, idx_goal)

Checks all goal-level constraints

Parameters:
Return type:

bool

achieved(solution)

Calls the custom _achieved method and checks that constraints are held

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

bool

constraints = None
classmethod from_json_data(d, *args, **kwargs)

Loads the Reach goal to a dictionary description.

Parameters:

d (Dict[str, any])

classmethod from_json_file(filepath, *args, **kwargs)

Factory method to load a class instance from a json file.

Parameters:
  • filepath (Union[pathlib.Path, str]) – The path to the json file.

  • args – Additional arguments to pass to the from_json_data factory method of the specific class.

  • kwargs – Additional arguments to pass to the from_json_data factory method of the specific class.

classmethod from_json_string(s, *args, **kwargs)

Create from a json string.

Parameters:

s (str)

static goal_from_json_data(description, frames)

Maps a json description to a goal instance

Parameters:
Return type:

GoalBase

goal_pose: timor.utilities.tolerated_pose.ToleratedPose
green_material
property id: str

The unique goal identifier

Return type:

str

property nominal_goal

The nominal goal pose

to_json_data()

Dumps the Reach goal to a dictionary description.

Return type:

Dict[str, any]

to_json_file(save_at, *args, **kwargs)

Writes the instance to a json file.

Parameters:

save_at (Union[pathlib.Path, str]) – File location or folder to write the class to.

to_json_string()

Return the json string representation.

Return type:

str

velocity_tolerance
visualize(viz, scale=0.33, show_name=False)

Shows an error pointing towards the desired position

Parameters:
  • viz (pinocchio.visualize.MeshcatVisualizer)

  • scale (float)

  • show_name (bool)

Return type:

None

class timor.task.Goals.ReturnTo(ID, returnToGoal=None, epsilon=0.0001, constraints=None)
Inheritance diagram of timor.task.Goals.ReturnTo

This goal is achieved when the robot returns to the state it was in at a previous goal

Return to a previous goal

Parameters:
  • ID (str) – The id of the goal. This is used to identify the goal in the solution.

  • returnToGoal (Optional[str]) – ID of other goal which should be matched again; can be left out to denote the start of the solution trajectory.

  • epsilon (float) – Allowed L2 distance between joint states at this goal and the the other goal.

  • constraints (Sequence[timor.task.Constraints.ConstraintBase])

__eq__(other)

Return goals are same if they have the same constraints, tolerance, and return to option

__getstate__()

Return objects which will be pickled and saved.

__hash__()

Hashes the goal by its id

__setstate__(state)

Take object from parameter and use it to retrieve class state.

__slots__ = ()
_achieved(solution, t_goal, idx_goal)

Returns true, if position, velocity and acceleration are (almost) equal to those at t=return_to_t

Parameters:
Return type:

bool

_assert_constraints_local()

Checks that the constraints of this goal have a “local meaning”.

Raises:

ValueError if one of the constraints would be better off as a global constraint.

_constraints_serialized()
Return type:

List[Dict[str, any]]

static _deduce_package_dir(filepath, content)

Logic for deducing the package directory if the JSONable object is loaded from a file.

Parameters:
  • filepath (pathlib.Path) – The path to the file.

  • content (Union[Dict, List]) – The content of the file parsed into a dictionary.

Note:

This method can be overridden by subclasses to provide custom package directory resolution; e.g. Task.py.

Return type:

pathlib.Path

_get_t_idx_goal(solution)

Finds the time t and the index within the time array idx at which the goal is achieved.

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

Tuple[float, int]

_id = ''
_valid(solution, t_goal, idx_goal)

Checks all goal-level constraints

Parameters:
Return type:

bool

achieved(solution)

Calls the custom _achieved method and checks that constraints are held

Parameters:

solution (timor.task.Solution.SolutionBase)

Return type:

bool

constraints = None
desired_pose: timor.utilities.tolerated_pose.ToleratedPose | None = None
distance_tolerance
classmethod from_json_data(d, *args, **kwargs)

Loads the Return goal to a dictionary description.

Parameters:

d (Dict[str, any])

classmethod from_json_file(filepath, *args, **kwargs)

Factory method to load a class instance from a json file.

Parameters:
  • filepath (Union[pathlib.Path, str]) – The path to the json file.

  • args – Additional arguments to pass to the from_json_data factory method of the specific class.

  • kwargs – Additional arguments to pass to the from_json_data factory method of the specific class.

classmethod from_json_string(s, *args, **kwargs)

Create from a json string.

Parameters:

s (str)

static goal_from_json_data(description, frames)

Maps a json description to a goal instance

Parameters:
Return type:

GoalBase

green_material
property id: str

The unique goal identifier

Return type:

str

return_to_goal = None
to_json_data()

Dumps the Return goal to a dictionary description.

Return type:

Dict[str, any]

to_json_file(save_at, *args, **kwargs)

Writes the instance to a json file.

Parameters:

save_at (Union[pathlib.Path, str]) – File location or folder to write the class to.

to_json_string()

Return the json string representation.

Return type:

str

visualize(viz, scale=0.33, show_name=False)

Shows an error pointing towards the desired position

Parameters:
  • viz (pinocchio.visualize.MeshcatVisualizer)

  • scale (float)

  • show_name (bool)

Return type:

None