maddux package¶
Submodules¶
maddux.environment module¶
Our experiment environment.
-
class
maddux.environment.
Environment
(dimensions=None, dynamic_objects=None, static_objects=None, robot=None)[source]¶ -
animate
(duration=None, save_path=None)[source]¶ Animates the running of the program
Parameters: - duration (int or None) – (Optional) Duration of animation in seconds
- save_path (String or None) – (Optional) Path to save mp4 in instead of displaying
Return type:
-
collision
()[source]¶ Check if any dynamic objects collide with any static objects or walls.
Returns: Whether there was a collision Return type: bool
-
hypothetical_landing_position
()[source]¶ Find the position that the ball would land (or hit a wall)
Returns: Position (x, y, z) of hypothetical landing position of a thrown object based on end effector velocity. Return type: numpy.ndarray or None
-
maddux.plot module¶
-
maddux.plot.
plot_sphere
(position, radius, ax, color='g', linewidth=0)[source]¶ Plot a sphere.
Parameters: Return type: matplotlib.axes
-
maddux.plot.
plot_sphere_data
(position, radius)[source]¶ Given a position and radius, get the data needed to plot.
Parameters: - position (numpy.ndarray) – Position in (x, y, z) of sphere
- radius (int) – radius of sphere
Returns: (x, y, z) tuple of sphere data to use to create a surface
Return type: (np.ndarray, np.ndarray, np.ndarray)
maddux.predefined_environments module¶
-
maddux.predefined_environments.
get_easy_environment
()[source]¶ An easy difficulty environment for planning tests with two obstacles, a ball as a target, and a simple human arm.
-
maddux.predefined_environments.
get_hard_environment
()[source]¶ A hard difficulty environment for planning tests with five obstacles, a ball as a target, and a simple human arm.
-
maddux.predefined_environments.
get_medium_environment
()[source]¶ A medium difficulty environment for planning tests with two obstacles, a ball as a target, and a simple human arm.
-
maddux.predefined_environments.
get_noodle_environment
()[source]¶ An absurd environment for our noodle arm to do planning tests. It has five obstacles, a ball as a target, and our 10 link noodle arm