Simulations¶
Bend Wire¶
Simulation of bend wire environment
This module creates the simulation files which will be used in BendWire environments. TODO: Instead of setting all parameters in this file, there should be a parameter file (e.g. YAML or XML).
- gym_agx.sims.bend_wire.add_rendering(sim)¶
- gym_agx.sims.bend_wire.sample_random_goal(sim, app=None, dof_vector=array([1.0, 1.0, 1.0]))¶
- Goal Randomization: Sample 2 points, and execute point-to-point trajectory. - Parameters
- sim -- AGX Dynamics simulation object 
- app -- AGX Dynamics application object 
- dof_vector (np.array) -- desired degrees of freedom of the gripper(s), [x, y, z] 
 
 
- gym_agx.sims.bend_wire.sample_fixed_goal(sim, app=None)¶
- Define the trajectory to generate fixed goal. - Parameters
- sim -- AGX Dynamics simulation object 
- app -- AGX Dynamics application object 
 
 
- gym_agx.sims.bend_wire.build_simulation(goal=False)¶
- Builds simulations for both start and goal configurations. - Parameters
- goal (bool) -- toggles between simulation definition of start and goal configurations 
- Return agxSDK.Simulation
- simulation object 
 
- gym_agx.sims.bend_wire.main(args)¶
Bend Wire with Obstacle¶
Simulation of bend wire with obstacle
This module creates the simulation files which will be used in BendWireObstacle environments. TODO: Instead of setting all parameters in this file, there should be a parameter file (e.g. YAML or XML).
- gym_agx.sims.bend_wire_obstacle.add_rendering(sim)¶
- gym_agx.sims.bend_wire_obstacle.sample_random_goal(sim, app=None, dof_vector=array([1.0, 1.0, 1.0]))¶
- Goal Randomization: Sample 2 points, and execute point-to-point trajectory. - Parameters
- sim -- AGX Dynamics simulation object 
- app -- AGX Dynamics application object 
- dof_vector (np.array) -- desired degrees of freedom of the gripper(s), [x, y, z] 
 
 
- gym_agx.sims.bend_wire_obstacle.sample_fixed_goal(sim, app=None)¶
- Define the trajectory to generate fixed goal. - Parameters
- sim -- AGX Dynamics simulation object 
- app -- AGX Dynamics application object 
 
 
- gym_agx.sims.bend_wire_obstacle.build_simulation(goal=False)¶
- Builds simulations for both start and goal configurations. - Parameters
- goal (bool) -- toggles between simulation definition of start and goal configurations 
- Return agxSDK.Simulation
- simulation object 
 
- gym_agx.sims.bend_wire_obstacle.main(args)¶
Push Rope¶
Simulation of rope pushing
This module creates the simulation files which will be used in PushRope environments. TODO: Instead of setting all parameters in this file, there should be a parameter file (e.g. YAML or XML).
- gym_agx.sims.push_rope.add_rendering(sim)¶
- gym_agx.sims.push_rope.sample_random_goal(sim, render=False)¶
- Goal Randomization for the PushRope environment it is too difficult to generate proper trajectories that lead to varied shapes. For this reason, a new rope is added to the scene every time, and routed through random points. - Parameters
- sim -- AGX Dynamics simulation object 
- render (bool) -- toggle rendering for debugging purposes only 
 
 
- gym_agx.sims.push_rope.sample_fixed_goal(sim, app=None)¶
- Define the trajectory to generate fixed goal. For the PushRope environment a keyboard listener is added to allow manual control. - Parameters
- sim -- AGX Dynamics simulation object 
- app -- AGX Dynamics application object 
 
 
- gym_agx.sims.push_rope.build_simulation(goal=False, rope=True)¶
- Builds simulations for both start and goal configurations. - Parameters
- goal (bool) -- toggles between simulation definition of start and goal configurations 
- rope (bool) -- add rope to the scene or not 
 
- Return agxSDK.Simulation
- simulation object 
 
- gym_agx.sims.push_rope.main(args)¶
Peg In Hole¶
Simulation of peg in hole
This module creates the simulation files which will be used in PegInHole environments. TODO: Instead of setting all parameters in this file, there should be a parameter file (e.g. YAML or XML).
- gym_agx.sims.peg_in_hole.create_gripper_peg_in_hole(sim=None, name='', material=None, position=<agx.Vec3; proxy of <Swig Object of type 'agx::Vec3T< double > *'> >, geometry_transform=<agx.AffineMatrix4x4; proxy of <Swig Object of type 'agx::AffineMatrix4x4 *'> >, geometry_scaling=<agx.Matrix3x3; proxy of <Swig Object of type 'agx::Matrix3x3T< double > *'> >, joint_ranges=None, force_ranges=None)¶
- gym_agx.sims.peg_in_hole.add_rendering(sim)¶
- gym_agx.sims.peg_in_hole.build_simulation()¶
- gym_agx.sims.peg_in_hole.compute_segments_pos(sim)¶
- gym_agx.sims.peg_in_hole.is_goal_reached(sim)¶
- Checks if positions of cable segments on lower end are within goal region. Returns True if cable is partially inserted and False otherwise. 
- gym_agx.sims.peg_in_hole.determine_n_segments_inserted(segment_pos, cylinder_pos)¶
- Determine number of segments that are inserted into the hole. - Parameters
- segment_pos -- 
- Returns
 
- gym_agx.sims.peg_in_hole.compute_dense_reward_and_check_goal(sim, segment_pos_0, segment_pos_1)¶
- gym_agx.sims.peg_in_hole.main(args)¶
Rubber Band¶
Simulation of rubber band
This module creates the simulation files which will be used in RubberBand environments. TODO: Instead of setting all parameters in this file, there should be a parameter file (e.g. YAML or XML).
- gym_agx.sims.rubber_band.create_pole(id, sim, position, material)¶
- gym_agx.sims.rubber_band.add_rendering(sim)¶
- gym_agx.sims.rubber_band.build_simulation()¶
- gym_agx.sims.rubber_band.set_center_obstacle(sim, center_pos)¶
- gym_agx.sims.rubber_band.get_poles_enclosed(segments_pos, pole_pos)¶
- gym_agx.sims.rubber_band.compute_segments_pos(sim)¶
- gym_agx.sims.rubber_band.is_goal_reached(center_pos, segment_pos)¶
- gym_agx.sims.rubber_band.compute_dense_reward_and_check_goal(center_pos, segment_pos_0, segment_pos_1)¶
- gym_agx.sims.rubber_band.main(args)¶
Cable Closing¶
Simulation of cable closing
This module creates the simulation files which will be used in CableClosing environments. TODO: Instead of setting all parameters in this file, there should be a parameter file (e.g. YAML or XML).
- gym_agx.sims.cable_closing.add_rendering(sim)¶
- gym_agx.sims.cable_closing.build_simulation()¶
- gym_agx.sims.cable_closing.compute_segments_pos(sim)¶
- gym_agx.sims.cable_closing.is_goal_reached(sim, segments_pos)¶
- gym_agx.sims.cable_closing.compute_dense_reward_and_check_goal(sim, segments_pos_0, segments_pos_1)¶
- gym_agx.sims.cable_closing.main(args)¶