robotics_toolbox.render.renderer_spatial.RendererSpatial
- class robotics_toolbox.render.renderer_spatial.RendererSpatial
Bases:
Scene- __init__()
- Return type:
None
Methods
__init__()add_object(obj[, verbose])add_robot(robot[, verbose])animation([fps])Return context of the animation that allow us to record animations. Usage: with scene.animation(fps=30): scene['obj'].pos = 3. # set properties of a first frame scene.render() # create a second frame of animation scene['obj'].pos = 3.
clear()Remove all the objects/robots from the scene
plot_drone(robot[, render])plot_manipulator(robot[, render])plot_se3(t[, scale, render])remove_object(obj[, verbose])remove_robot(robot[, verbose])render()Render current scene either to browser, video or to the next frame of the animation.
render_image()Reset camera to default pose and let user interact with it again.
set_background_color([top_color, bottom_color])Set background color of the visualizer.
video_recording([filename, fps, directory])Return a context manager for video recording. The output filename is given by: 1) filename parameter if it is not None 2) directory/timestemp.mp4 if filename is None and directory is not None 3) /tmp/timestemp if filename is None and directory is None.
A method that just sleep for a few seconds.
wait_for_enter([msg])Attributes
camera_poscamera_posecamera_rotcamera_zoom- animation(fps=30)
Return context of the animation that allow us to record animations. Usage:
- with scene.animation(fps=30):
scene[‘obj’].pos = 3. # set properties of a first frame scene.render() # create a second frame of animation scene[‘obj’].pos = 3.
- Parameters:
fps (int)
- clear()
Remove all the objects/robots from the scene
- render()
Render current scene either to browser, video or to the next frame of the animation.
- reset_camera()
Reset camera to default pose and let user interact with it again.
- set_background_color(top_color=None, bottom_color=None)
Set background color of the visualizer. Use white background by default.
- video_recording(filename=None, fps=30, directory=None, **kwargs)
Return a context manager for video recording. The output filename is given by:
filename parameter if it is not None
directory/timestemp.mp4 if filename is None and directory is not None
/tmp/timestemp if filename is None and directory is None
- wait_at_the_end()
A method that just sleep for a few seconds. Call it at the end to prevent interruption of the connection with the renderer.