VrepClient.plan_motion
-
VrepClient.
plan_motion
(robot, goal_frame, metric_values=None, collision_meshes=None, planner_id='rrtconnect', trials=1, resolution=0.02, gantry_joint_limits=None, arm_joint_limits=None, shallow_state_search=True, optimize_path_length=False)[source] Find a path plan to move the selected robot from its current position to the goal_frame.
- Parameters
robot (
compas_fab.robots.Robot
) – Robot instance to move.goal_frame (
Frame
) – Target or goal frame.metric_values (
list
offloat
) – List containing one value per configurable joint. Each value ranges from 0 to 1, where 1 indicates the axis/joint is blocked and cannot move during inverse kinematic solving.collision_meshes (
list
ofcompas.datastructures.Mesh
) – Collision meshes to be taken into account when calculating the motion plan. Defaults toNone
.planner_id (
str
) – Name of the planner to use. Defaults torrtconnect
.trials (
int
) – Number of search trials to run. Defaults to1
.resolution (
float
) – Validity checking resolution. This value is specified as a fraction of the space’s extent. Defaults to0.02
.gantry_joint_limits (
list
of float) – List of 6 floats defining the upper/lower limits of gantry joints. Use this if you want to restrict the working area of the path planner.arm_joint_limits (
list
of float) – List of 12 floats defining the upper/lower limits of arm joints. Use this if you want to restrict the working area of the path planner.shallow_state_search (
bool
) – True to search only a minimum of valid states before searching a path, False to search states intensively.optimize_path_length (
bool
) – True to search the path with minimal total length among all trials, False to return the first valid path found. It only affects the output if trials > 1.
- Returns
list – List of
Configuration
objects representing the collision-free path to thegoal_frame
.