rofunc.simulator.base_sim#
1. Module Contents#
1.1. Classes#
1.2. API#
- class rofunc.simulator.base_sim.RobotSim(args)[source]#
Initialization
Initialize the robot-centered simulator
- Parameters:
args – arguments
- 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:
- show(visual_obs_flag=False)[source]#
Visualize the robot in an interactive viewer :param visual_obs_flag: If True, show the visual observation
- 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: