pyrobot.algorithms.motion_planner.
MotionPlanner
(configs, world, ros_launch_manager=None, robots={}, sensors={}, algorithms={})[source]¶Bases: pyrobot.algorithms.algorithm.Algorithm
Base class of Motion Planning algorithms. Specifically, this algorithm handles computing and executing of motion plans.
The algorithm should take a robot model urdf, specified in a tree of joint frames, and an end-effector frame, in the constructor. Motion plans should be computed w.r.t that urdf and end-effector frame.
__init__
(configs, world, ros_launch_manager=None, robots={}, sensors={}, algorithms={})[source]¶Initialize self. See help(type(self)) for accurate signature.
check_cfg
()[source]¶This function checks required configs shared by all motion planning instances in constructor.
The motion planning algorithm handles one robot, and one robot only
The robot has an arm
The arm has a base frame, an end-effector frame, and urdf description.
with customized algorithm config checks after calling this function using super().check_cfg()
plan_end_effector_pose
(position, orientation)[source]¶generate a motion plan to the desired pose, and execute the plan.
position: position vector as list-like objects in the form of [x, y, z]. Unit: meters. orientation: orientation vector or matrix with one of the following forms:
euler angles, as list-like object of form [x, y, z]
quaternion, as list-like object of form [x, y, z, w]
a 3x3 3D rotation matrix
i.e. for a 5DoF arm with (joint1, joint2, …, joint5) in urdf, this function should return a list of points with point.positions, point.velocities and point.accelarations as vectors of size 5 (angle1, angle2, …, angle5)
If a plan cannot be generated or the generated plan cannot be executed, this function should raise an error.
plan_joint_angles
(target_joint)[source]¶generate a motion plan to the desired pose, and execute the plan.
for a 5DoF arm with (joint1, joint2, …, joint5) in urdf, this function should return a vector with size 5 of (angle1, angle2, …, angle5)
i.e. for a 5DoF arm with (joint1, joint2, …, joint5) in urdf, this function should return a list of points with point.positions, point.velocities and point.accelarations as vectors of size 5 (angle1, angle2, …, angle5)
If a plan cannot be generated or the generated plan cannot be executed, this function should raise an error.