rofunc.simulator.base_sim#

1.  Module Contents#

1.1.  Classes#

PlaygroundSim

RobotSim

1.2.  API#

class rofunc.simulator.base_sim.PlaygroundSim(args)[source]#

Initialization

init_sim()[source]#
init_viewer()[source]#
init_plane()[source]#
class rofunc.simulator.base_sim.RobotSim(args)[source]#

Initialization

Initialize the robot-centered simulator

Parameters:

args – arguments

create_env()[source]#
setup_robot_dof_prop()[source]#
add_object()[source]#
add_tracking_target_sphere_axes()[source]#

Visualize the tracking target as a sphere with axes

add_marker(marker_pose)[source]#
add_body_attached_camera(camera_props=None, attached_body=None, local_transform=None)[source]#
monitor_rigid_body_states()[source]#
monitor_dof_states()[source]#
monitor_robot_jacobian(robot_name=None)[source]#
monitor_robot_mass_matrix(robot_name=None)[source]#
show(visual_obs_flag=False)[source]#

Visualize the robot in an interactive viewer :param visual_obs_flag: If True, show the visual observation

get_num_bodies()[source]#
get_actor_rigid_body_info(actor_handle)[source]#
get_dof_info()[source]#
get_robot_state(mode)[source]#
abstract update_robot(traj, attractor_handles, axes_geom, sphere_geom, index)[source]#
update_object(object_handles, object_poses, state_type)[source]#

Update the object pose

Parameters:
  • object_handles

  • object_poses

  • state_type – gymapi.STATE_ALL, gymapi.STATE_POS, gymapi.STATE_VEL

Returns:

run_traj_multi_rigid_bodies(traj: List, attracted_rigid_bodies: List = None, object_start_pose: List = None, object_end_pose: List = None, object_related_joints: List = None, update_freq=0.001, verbose=True)[source]#

Run the trajectory with multiple rigid bodies, the default is to run the trajectory with the left and right hand of bimanual robot.

Parameters:
  • traj – a list of trajectories, each trajectory is a numpy array of shape (N, 7)

  • attracted_rigid_bodies – [list], e.g. [“panda_left_hand”, “panda_right_hand”]

  • update_freq – the frequency of updating the robot pose

  • verbose – if True, visualize the attractor spheres

Returns: