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]#
init_terrain()[source]#
init_light()[source]#
class rofunc.simulator.base_sim.RobotSim(args)[source]#

Initialization

Initialize the robot-centered simulator

Parameters:

args – arguments

create_env()[source]#
set_colors_for_parts(handles, wb_decompose_param_rb_ids)[source]#
set_char_color(handles, body_ids, col)[source]#

Set the color of the character’s body parts

Parameters:
  • body_ids – list of body ids

  • col – color in RGB

Returns:

setup_robot_dof_prop()[source]#
add_object()[source]#
add_table()[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_actor_root_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(robot_asset)[source]#
get_actor_rigid_body_info(actor_handle)[source]#
get_dof_info()[source]#
get_robot_state(mode)[source]#
update_robot(traj, attractor_handles, axes_geom, sphere_geom, index, verbose=True, index_list=None)[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, attr_rbs: List = None, attr_types=None, object_start_pose: List = None, object_end_pose: List = None, object_related_joints: List = None, root_state=None, update_freq=0.001, verbose=True, index_list=None, recursive_play=False)[source]#

Set multiple attractors to let the robot run the trajectory with multiple rigid bodies.

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

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

  • attr_types – [list], e.g. [gymapi.AXIS_ALL, gymapi.AXIS_ROTATION, gymapi.AXIS_TRANSLATION]

  • object_start_pose – the initial pose of the object

  • object_end_pose – the final pose of the object

  • object_related_joints – the related joints of the object

  • root_state – the root state of the robot

  • update_freq – the frequency of updating the robot pose

  • verbose – if True, visualize the attractor spheres

  • index_list

  • recursive_play

Returns: