Studio LiveΒΆ
- class jacobi.StudioΒΆ
Bases:
pybind11_object- class ActionΒΆ
Bases:
pybind11_objectAn action that can be performed in Jacobi Studio.
The Action class represents an action in Jacobi Studio, such as setting a robotβs joint position, adding an obstacle, or manipulating the environment. An action can contain multiple commands, allowing for complex interactions in Studio.
- __init__(*args, **kwargs)ΒΆ
- class EventsΒΆ
Bases:
pybind11_objectA container that maps a specific timing to one or multiple actions. The static methods of this class do not change the visualization in Jacobi Studio immediately, but only return an action that can be executed later (e.g. alongside a trajectory).
The Events struct allows for scheduling actions in Jacobi Studio at specific times. Static methods are provided to create various actions, which can be executed later.
- __init__(self: Events) NoneΒΆ
A container that maps a specific timing to one or multiple actions. The static methods of this class do not change the visualization in Jacobi Studio immediately, but only return an action that can be executed later (e.g. alongside a trajectory).
The Events struct allows for scheduling actions in Jacobi Studio at specific times. Static methods are provided to create various actions, which can be executed later.
- static add_camera(camera: Camera) ActionΒΆ
Returns an action that adds a camera.
- Parameter
camera: The camera to be added.
- Returns:
The action to add the camera.
- Parameter
- static add_obstacle(obstacle: Obstacle) ActionΒΆ
Returns an action that adds the given obstacle to the environment.
- Parameter
obstacle: The obstacle to be added.
- Returns:
The action to add the obstacle.
- Parameter
- static add_robot(robot: Robot) ActionΒΆ
Returns an action that adds the given robot to the environment.
- Parameter
robot: The robot to be added.
- Returns:
The action to add the robot.
- Parameter
- static add_robot_path(points: list[list[float]], robot: Robot = None, name: str = '', color: str = '', stroke: float = -1.0, arrow_size: float = 1.0) ActionΒΆ
Returns an action that adds a visualization of a path for the given robot.
- Parameter
points: The points defining the path.
- Parameter
robot: Optional robot associated with the path.
- Parameter
name: Optional name for the path.
- Parameter
color: Optional color for the path visualization.
- Parameter
stroke: Optional stroke width for the path visualization.
- Parameter
arrow_size: Optional size of arrow for end of path
- Returns:
The action to add the robot path visualization.
- Parameter
- static add_waypoint(point: list[float] | Waypoint | CartesianWaypoint | jacobi.MultiRobotPoint | Region | CartesianRegion) ActionΒΆ
Returns an action that adds the given Cartesian waypoint to the environment.
- Parameter
point: The Cartesian waypoint to be added.
- Returns:
The action to add the Cartesian waypoint.
- Parameter
- static remove_by_name(name: str) ActionΒΆ
Returns an action that removes the elements of the given name from the environment.
- Parameter
name: The name to be removed.
- Returns:
The action to remove the obstacle.
- Parameter
- static remove_by_tag(tag: str) ActionΒΆ
Returns an action that removes the elements containing the tag from the environment.
- Parameter
tag: The tag to be removed.
- Returns:
The action to remove the obstacle.
- Parameter
- static remove_camera(camera: Camera) ActionΒΆ
Returns an action that removes a camera.
- Parameter
camera: The camera to be removed.
- Returns:
The action to remove the camera.
- Parameter
- static remove_obstacle(obstacle: Obstacle) ActionΒΆ
Returns an action that removes the given obstacle (by name) from the environment.
- Parameter
obstacle: The obstacle to be removed.
- Returns:
The action to remove the obstacle.
- Parameter
- static remove_obstacles_by_tag(tag: str) ActionΒΆ
Returns an action that removes the obstacles containing the tag from the environment.
- Parameter
tag: The tag to be removed.
- Returns:
The action to remove the obstacle.
- Parameter
- static remove_robot_path(robot: Robot, name: str) ActionΒΆ
Returns an action that removes a visualization of a named path for the given robot.
- Parameter
robot: The robot associated with the path.
- Parameter
name: The name of the path to be removed.
- Returns:
The action to remove the robot path visualization.
- Parameter
- static set_camera_depth_map(depths: list[list[float]], x: float, y: float, camera: Camera = None) ActionΒΆ
Returns an action that sets the depth map visualization of a camera.
- Parameter
depths: The depth map data.
- Parameter
x: Size of the depth map along the x-axis.
- Parameter
y: Size of the depth map along the y-axis.
- Parameter
camera: Optional camera associated with the depth map.
- Returns:
The action to set the camera depth map.
- Parameter
- static set_camera_image_encoded(image: str, camera: Camera) ActionΒΆ
Returns an action that sets an image for a camera encoded as a string.
- Parameter
image: The encoded image to be set.
- Parameter
camera: Optional camera associated with the image.
- Returns:
The action to set the camera image.
- Parameter
- static set_end_effector(obstacle: Obstacle | None, robot: Robot = None) ActionΒΆ
Returns an action that sets the end-effector obstacle of the given robot, or the last active robot instead.
- Parameter
obstacle: Optional obstacle to be set.
- Parameter
robot: Optional robot associated with the obstacle.
- Returns:
The action to set the item obstacle.
- Parameter
- static set_io_signal(name: str, value: int | float, robot: Robot = None) ActionΒΆ
Returns an action that sets an I/O signal of the given robot, or the last active robot instead.
- Parameter
name: The name of the I/O signal.
- Parameter
value: The value to be set for the I/O signal.
- Parameter
robot: Optional robot associated with the I/O signal.
- Returns:
The action to set the I/O signal.
- Parameter
- static set_item(obstacle: Obstacle | None, robot: Robot = None) ActionΒΆ
Returns an action that sets the item obstacle of the given robot, or the last active robot instead.
- Parameter
obstacle: Optional obstacle to be set.
- Parameter
robot: Optional robot associated with the obstacle.
- Returns:
The action to set the item obstacle.
- Parameter
- static set_joint_position(joint_position: list[float], robot: Robot = None) ActionΒΆ
Returns an action that sets the joint position of the given robot, or the last active robot instead.
- Parameter
joint_position: The desired joint position.
- Parameter
robot: Optional robot to set the joint position for.
- Returns:
The action to set the joint position.
- Parameter
- static set_material(material: str, robot: Robot = None) ActionΒΆ
Returns an action that sets the material of the given robot, or the last active robot instead.
- Parameter
material: The material to be set.
- Parameter
robot: Optional robot associated with the material.
- Returns:
The action to set the material.
- Parameter
- __init__(self: Studio, auto_sync: bool = True, auto_connect: bool = True, timeout: float = 3.0) NoneΒΆ
Interface Jacobi Studio via code. Connects to Jacobi Studio automatically - please make sure to enable the Studio Live feature in the Jacobi Studio settings.
- Parameter
auto_sync: Whether to sync changes of the environment to Studio Live automatically. Only a subset of commands are supported right now, including: Environment::add_obstacle, Environment::remove_obstacle, Environment::update_joint_position, RobotArm::set_end_effector, RobotArm::set_item
- Parameter
auto_connect: Whether to connect to Studio Live automatically.
- Parameter
timeout: The timeout for connecting to Studio Live.
- Parameter
- add_camera(self: Studio, camera: Camera) boolΒΆ
Adds a camera in Jacobi Studio.
- Parameter
camera: The camera to be added.
- Parameter
- add_obstacle(self: Studio, obstacle: Obstacle) boolΒΆ
Adds the given obstacle to the environment.
- Parameter
obstacle: The obstacle to be added.
- Parameter
- add_robot(self: Studio, robot: Robot) boolΒΆ
Adds the given robot to the environment.
- Parameter
robot: The robot to be added.
- Parameter
- add_robot_path(self: Studio, points: list[list[float]], robot: Robot = None, name: str = '', color: str = '', stroke: float = -1.0, arrow_size: float = 1.0) boolΒΆ
Adds a visualization of a path for the given robot.
- Parameter
points: The points defining the path.
- Parameter
robot: Optional robot associated with the path.
- Parameter
name: Optional name for the path.
- Parameter
color: Optional color for the path visualization.
- Parameter
stroke: Optional stroke width for the path visualization.
- Parameter
arrow_size: Optional size of arrow for end of path
- Parameter
- add_waypoint(self: Studio, point: list[float] | Waypoint | CartesianWaypoint | jacobi.MultiRobotPoint | Region | CartesianRegion) boolΒΆ
Adds the given Cartesian waypoint to the environment.
- Parameter
point: The Cartesian waypoint to be added.
- Parameter
- get_camera_image_encoded(self: Studio, stream: jacobi.CameraStream, camera: Camera = None) strΒΆ
Get an image from a camera encoded as a string.
- Parameter
stream: The type of camera stream to get.
- Parameter
camera: Optional camera to get the image from.
- Returns:
The encoded image from the camera.
- Parameter
- get_joint_position(self: Studio, robot: Robot = None) list[float]ΒΆ
Get the joint position of a robot.
- Parameter
robot: Optional robot to get the joint position for.
- Returns:
The joint position of the robot.
- Parameter
- reconnect(self: Studio, timeout: float = 3.0) boolΒΆ
Reconnect to Studio Live
- Parameter
timeout: The timeout for reconnecting to Studio Live.
- Returns:
Whether the reconnection was successful.
- Parameter
- remove_by_name(self: Studio, name: str) boolΒΆ
Removes the elements of the given name from the environment.
- Parameter
name: The name to be removed.
- Parameter
- remove_by_tag(self: Studio, tag: str) boolΒΆ
Removes the elements containing the tag from the environment.
- Parameter
tag: The tag to be removed.
- Parameter
- remove_camera(self: Studio, camera: Camera) boolΒΆ
Removes a camera in Jacobi Studio.
- Parameter
camera: The camera to be removed.
- Parameter
- remove_obstacle(self: Studio, obstacle: Obstacle) boolΒΆ
Removes the given obstacle (by name) from the environment.
- Parameter
obstacle: The obstacle to be removed.
- Parameter
- remove_obstacles_by_tag(self: Studio, tag: str) boolΒΆ
Removes the obstacles containing the tag from the environment.
- Parameter
tag: The tag to be removed.
- Parameter
- remove_robot_path(self: Studio, robot: Robot, name: str) boolΒΆ
Removes a named visualization of a path for the given robot.
- Parameter
robot: The robot associated with the path.
- Parameter
name: The name of the path to be removed.
- Parameter
- reset(self: Studio) boolΒΆ
Resets the environment to the state before a trajectory or events were run. In particular, it removes all obstacles there were added dynamically.
- run_action(self: Studio, action: Action) boolΒΆ
Run the given action in Jacobi Studio.
- Parameter
action: The action to be run.
- Returns:
Was the action successfully sent to Studio?
- Parameter
- run_events(self: Studio, events: Events) boolΒΆ
Run the events at the specified timings in Jacobi Studio.
- Parameter
events: The events to be run at the specified timings.
- Parameter
- run_path_command(self: Studio, path_command: jacobi.PathCommand, duration: float, events: Events = Studio.Events(), loop_forever: bool = False, robot: Robot = None) boolΒΆ
Visualize a path command for the given robot (or the last active robot) in Jacobi Studio, alongside the events at the specified timings. Optionally, the visualization can be looped.
- Parameter
path_command: The path command to be run.
- Parameter
duration: The duration of the resulting trajectory.
- Parameter
events: The events to be run at the specified timings.
- Parameter
loop_forever: Whether to loop the visualization forever.
- Parameter
robot: Optional robot to run the trajectory for.
- Parameter
- run_trajectories(self: Studio, trajectories: list[tuple[Trajectory, Robot]], events: Events = Studio.Events(), loop_forever: bool = False) boolΒΆ
Runs multiple trajectories for different robots in parallel, alongside the events at the specified timings. Optionally, the visualization can be looped.
- Parameter
trajectories: Pairs of trajectories per robot to be run.
- Parameter
events: The events to be run at the specified timings.
- Parameter
loop_forever: Whether to loop the visualization forever.
- Parameter
- run_trajectory(self: Studio, trajectory: Trajectory, events: Events = Studio.Events(), loop_forever: bool = False, robot: Robot = None) boolΒΆ
Runs a trajectory for the given robot (or the last active robot) in Jacobi Studio, alongside the events at the specified timings. Optionally, the visualization can be looped.
- Parameter
trajectory: The trajectory to be run.
- Parameter
events: The events to be run at the specified timings.
- Parameter
loop_forever: Whether to loop the visualization forever.
- Parameter
robot: Optional robot to run the trajectory for.
- Parameter
- set_camera_depth_map(self: Studio, depths: list[list[float]], x: float, y: float, camera: Camera = None) boolΒΆ
Sets the depth map visualization of a camera.
- Parameter
depths: The depth map data.
- Parameter
x: Size of the depth map along the x-axis.
- Parameter
y: Size of the depth map along the y-axis.
- Parameter
camera: Optional camera associated with the depth map.
- Parameter
- set_camera_image_encoded(self: Studio, image: str, camera: Camera) boolΒΆ
Sets an image for a camera encoded as a string.
- Parameter
image: The encoded image to be set.
- Parameter
camera: Optional camera associated with the image.
- Parameter
- set_camera_point_cloud(self: Studio, points: list[float], camera: Camera = None) boolΒΆ
Sets the point cloud visualization of a camera.
- Parameter
points: The point cloud data.
- Parameter
camera: Optional camera associated with the point cloud.
- Parameter
- set_end_effector(self: Studio, obstacle: Obstacle | None, robot: Robot = None) boolΒΆ
Sets the end-effector of the given robot, or the last active robot instead.
- Parameter
obstacle: Optional obstacle to be set.
- Parameter
robot: Optional robot associated with the obstacle.
- Parameter
- set_io_signal(self: Studio, name: str, value: int | float, robot: Robot = None) boolΒΆ
Sets an I/O signal of the given robot, or the last active robot instead.
- Parameter
name: The name of the I/O signal.
- Parameter
value: The value to be set for the I/O signal.
- Parameter
robot: Optional robot associated with the I/O signal.
- Parameter
- set_item(self: Studio, obstacle: Obstacle | None, robot: Robot = None) boolΒΆ
Sets the item obstacle of the given robot, or the last active robot instead.
- Parameter
obstacle: Optional obstacle to be set.
- Parameter
robot: Optional robot associated with the obstacle.
- Parameter
- set_joint_position(self: Studio, joint_position: list[float], robot: Robot = None) boolΒΆ
Sets the joint position of the given robot, or the last active robot instead.
- Parameter
joint_position: The desired joint position.
- Parameter
robot: Optional robot to set the joint position for.
- Parameter
- set_material(self: Studio, material: str, robot: Robot = None) boolΒΆ
Sets the material of the given robot, or the last active robot instead.
- Parameter
material: The material to be set.
- Parameter
robot: Optional robot associated with the material.
- Parameter
- update_camera(self: Studio, camera: Camera) boolΒΆ
Updates the camera with the same name in Jacobi Studio.
- Parameter
camera: The camera to be updated.
- Parameter
- update_obstacle(self: Studio, obstacle: Obstacle) boolΒΆ
Updates the obstacle with the same name.
- Parameter
obstacle: The obstacle to be updated.
- Parameter
- property is_connectedΒΆ
Whether the library is connected to Studio Live
- Returns:
Whether the library is connected to Studio Live.
- property portΒΆ
Port of the websocket connection
- property speedupΒΆ
A factor to speed up or slow down running trajectories or events.
- class jacobi.Studio.ActionΒΆ
Bases:
pybind11_objectAn action that can be performed in Jacobi Studio.
The Action class represents an action in Jacobi Studio, such as setting a robotβs joint position, adding an obstacle, or manipulating the environment. An action can contain multiple commands, allowing for complex interactions in Studio.
- __init__(*args, **kwargs)ΒΆ
- class jacobi.Studio.EventsΒΆ
Bases:
pybind11_objectA container that maps a specific timing to one or multiple actions. The static methods of this class do not change the visualization in Jacobi Studio immediately, but only return an action that can be executed later (e.g. alongside a trajectory).
The Events struct allows for scheduling actions in Jacobi Studio at specific times. Static methods are provided to create various actions, which can be executed later.
- __init__(self: Events) NoneΒΆ
A container that maps a specific timing to one or multiple actions. The static methods of this class do not change the visualization in Jacobi Studio immediately, but only return an action that can be executed later (e.g. alongside a trajectory).
The Events struct allows for scheduling actions in Jacobi Studio at specific times. Static methods are provided to create various actions, which can be executed later.
- static add_camera(camera: Camera) ActionΒΆ
Returns an action that adds a camera.
- Parameter
camera: The camera to be added.
- Returns:
The action to add the camera.
- Parameter
- static add_obstacle(obstacle: Obstacle) ActionΒΆ
Returns an action that adds the given obstacle to the environment.
- Parameter
obstacle: The obstacle to be added.
- Returns:
The action to add the obstacle.
- Parameter
- static add_robot(robot: Robot) ActionΒΆ
Returns an action that adds the given robot to the environment.
- Parameter
robot: The robot to be added.
- Returns:
The action to add the robot.
- Parameter
- static add_robot_path(points: list[list[float]], robot: Robot = None, name: str = '', color: str = '', stroke: float = -1.0, arrow_size: float = 1.0) ActionΒΆ
Returns an action that adds a visualization of a path for the given robot.
- Parameter
points: The points defining the path.
- Parameter
robot: Optional robot associated with the path.
- Parameter
name: Optional name for the path.
- Parameter
color: Optional color for the path visualization.
- Parameter
stroke: Optional stroke width for the path visualization.
- Parameter
arrow_size: Optional size of arrow for end of path
- Returns:
The action to add the robot path visualization.
- Parameter
- static add_waypoint(point: list[float] | Waypoint | CartesianWaypoint | jacobi.MultiRobotPoint | Region | CartesianRegion) ActionΒΆ
Returns an action that adds the given Cartesian waypoint to the environment.
- Parameter
point: The Cartesian waypoint to be added.
- Returns:
The action to add the Cartesian waypoint.
- Parameter
- static remove_by_name(name: str) ActionΒΆ
Returns an action that removes the elements of the given name from the environment.
- Parameter
name: The name to be removed.
- Returns:
The action to remove the obstacle.
- Parameter
- static remove_by_tag(tag: str) ActionΒΆ
Returns an action that removes the elements containing the tag from the environment.
- Parameter
tag: The tag to be removed.
- Returns:
The action to remove the obstacle.
- Parameter
- static remove_camera(camera: Camera) ActionΒΆ
Returns an action that removes a camera.
- Parameter
camera: The camera to be removed.
- Returns:
The action to remove the camera.
- Parameter
- static remove_obstacle(obstacle: Obstacle) ActionΒΆ
Returns an action that removes the given obstacle (by name) from the environment.
- Parameter
obstacle: The obstacle to be removed.
- Returns:
The action to remove the obstacle.
- Parameter
- static remove_obstacles_by_tag(tag: str) ActionΒΆ
Returns an action that removes the obstacles containing the tag from the environment.
- Parameter
tag: The tag to be removed.
- Returns:
The action to remove the obstacle.
- Parameter
- static remove_robot_path(robot: Robot, name: str) ActionΒΆ
Returns an action that removes a visualization of a named path for the given robot.
- Parameter
robot: The robot associated with the path.
- Parameter
name: The name of the path to be removed.
- Returns:
The action to remove the robot path visualization.
- Parameter
- static set_camera_depth_map(depths: list[list[float]], x: float, y: float, camera: Camera = None) ActionΒΆ
Returns an action that sets the depth map visualization of a camera.
- Parameter
depths: The depth map data.
- Parameter
x: Size of the depth map along the x-axis.
- Parameter
y: Size of the depth map along the y-axis.
- Parameter
camera: Optional camera associated with the depth map.
- Returns:
The action to set the camera depth map.
- Parameter
- static set_camera_image_encoded(image: str, camera: Camera) ActionΒΆ
Returns an action that sets an image for a camera encoded as a string.
- Parameter
image: The encoded image to be set.
- Parameter
camera: Optional camera associated with the image.
- Returns:
The action to set the camera image.
- Parameter
- static set_end_effector(obstacle: Obstacle | None, robot: Robot = None) ActionΒΆ
Returns an action that sets the end-effector obstacle of the given robot, or the last active robot instead.
- Parameter
obstacle: Optional obstacle to be set.
- Parameter
robot: Optional robot associated with the obstacle.
- Returns:
The action to set the item obstacle.
- Parameter
- static set_io_signal(name: str, value: int | float, robot: Robot = None) ActionΒΆ
Returns an action that sets an I/O signal of the given robot, or the last active robot instead.
- Parameter
name: The name of the I/O signal.
- Parameter
value: The value to be set for the I/O signal.
- Parameter
robot: Optional robot associated with the I/O signal.
- Returns:
The action to set the I/O signal.
- Parameter
- static set_item(obstacle: Obstacle | None, robot: Robot = None) ActionΒΆ
Returns an action that sets the item obstacle of the given robot, or the last active robot instead.
- Parameter
obstacle: Optional obstacle to be set.
- Parameter
robot: Optional robot associated with the obstacle.
- Returns:
The action to set the item obstacle.
- Parameter
- static set_joint_position(joint_position: list[float], robot: Robot = None) ActionΒΆ
Returns an action that sets the joint position of the given robot, or the last active robot instead.
- Parameter
joint_position: The desired joint position.
- Parameter
robot: Optional robot to set the joint position for.
- Returns:
The action to set the joint position.
- Parameter
- static set_material(material: str, robot: Robot = None) ActionΒΆ
Returns an action that sets the material of the given robot, or the last active robot instead.
- Parameter
material: The material to be set.
- Parameter
robot: Optional robot associated with the material.
- Returns:
The action to set the material.
- Parameter