MotionPlanner

class pyniryo_nate.components.MotionPlanner(http_client: HttpClient, mqtt_client: MqttClient, correlation_id: str)[source]

Bases: BaseAPIComponent

Motion planner component for generating robot trajectories.

This component provides methods for generating optimized trajectories from waypoints, which can then be executed on the robot for smooth motion.

Methods

close

Close the component and release any resources if needed.

generate_trajectory

Generate a trajectory from a sequence of waypoints.

Parameters:
  • http_client (HttpClient)

  • mqtt_client (MqttClient)

  • correlation_id (str)

generate_trajectory(waypoints: list[Waypoint], add_start: bool = False) → list[JointsStamped][source]

Generate a trajectory from a sequence of waypoints.

This method computes a smooth trajectory that passes through the specified waypoints, taking into account robot kinematics, joint limits, and velocity/acceleration constraints.

Parameters:
  • waypoints (list[Waypoint]) – The waypoints to generate the trajectory from.

  • add_start (bool) – If True, add the current robot position as the first waypoint.

Returns:

The generated trajectory.

Return type:

list[JointsStamped]