concepts.benchmark.namo.namo_polygon.namo_polygon_env.NamoPolygonEnv#
- class NamoPolygonEnv[source]#
Bases:
PymunkDefaultEnv
Methods
add_additional_drawing_region_circle
(center, ...)add_additional_drawing_region_rect
(top_left, ...)attach_object
(body[, render_mode])can_control
(body)Check if the body can be controlled by the user.
detach_object
([render_mode])distance_to_body
(body)get_jittered_velocity
(velocity)Get an observation dict of the current state of the environment.
Run a mainloop so that the user can control the objects in the environment.
move_cfree_trajectory
(trajectory[, render_mode])non_physical_execute_trajectory
(body_name, ...)Execute a trajectory without physical simulation.
render
()Render the environment.
render_and_display
([render_mode, trajectory])reset
(**kwargs)set_agent_pos
(pos)set_current_selection
(body)step
(steps[, render_mode, callback])Step the simulation for a number of steps.
Attributes
- __new__(**kwargs)#
- add_additional_drawing_region_circle(center, radius, color)#
- add_additional_drawing_region_rect(top_left, bottom_right, color)#
- attach_object(body, render_mode='human')[source]#
- Parameters:
body (Body)
render_mode (str)
- Return type:
- can_control(body)#
Check if the body can be controlled by the user. This function can be overridden by subclasses.
- Return type:
- get_jittered_velocity(velocity)#
- get_observation()#
Get an observation dict of the current state of the environment.
- humanplay_mainloop()#
Run a mainloop so that the user can control the objects in the environment.
- move_cfree_trajectory(trajectory, render_mode='human')[source]#
- Parameters:
render_mode (str)
- Return type:
- move_cfree_trajectory_with_attached_object(trajectory, render_mode='human')[source]#
- Parameters:
render_mode (str)
- Return type:
- non_physical_execute_trajectory(body_name, trajectory)#
Execute a trajectory without physical simulation. This is done by manually setting the positions of the bodies.
- render()#
Render the environment. If recording is enabled, the rendered frames will be stored in the recorded_frames list. Use
start_recording()
andstop_recording()
to control the recording process.The rendering is done by calling the debug_draw method of the PymunkWorld object.
- Return type:
None
- render_and_display(render_mode='image', trajectory=None)#
- reset(**kwargs)#
- reset_world()#
- Return type:
- set_additional_step_callable(fn)#
- Parameters:
fn (Callable[[PymunkDefaultEnv], None])
- set_current_selection(body)#
- Parameters:
body (Body)
- start_recording()#
- step(steps, render_mode='image', callback=None)#
Step the simulation for a number of steps.
- Parameters:
- Return type:
- stop_recording()#
- RENDER_MODES = ['image', 'human', 'pose', 'state']#
- SCREENSHOT_TITLE = 'screenshot'#
- TITLE = 'Pymunk Default'#
- property agent#
- property agent_pos#