@@ -328,18 +328,21 @@ class Cartesian6dVelocityEffector(
328328 cartesian_6d_velocity_effector .Cartesian6dVelocityEffector ):
329329 """Panda Version of the MoMa Cartesian6dVelocityEffector."""
330330
331- def __init__ (self , robot_params : params .RobotParams , arm : robot_arm .RobotArm ,
331+ def __init__ (self ,
332+ robot_params : params .RobotParams ,
333+ arm : robot_arm .RobotArm ,
332334 gripper : robot_hand .RobotHand ,
333335 joint_velocity_effector : effector .Effector ,
334- tcp_sensor : robot_tcp_sensor .RobotTCPSensor ):
336+ tcp_sensor : robot_tcp_sensor .RobotTCPSensor ,
337+ control_timestep : float = 0.1 ):
335338 self ._frame = robot_params .control_frame
336339 self ._arm = arm
337340 self ._get_world_pos = tcp_sensor .observables [tcp_sensor .get_obs_key (
338341 robot_tcp_sensor .Observations .POS )]
339342 model_params = cartesian_6d_velocity_effector .ModelParams (
340343 gripper .tool_center_point , arm .joints )
341344 control_params = cartesian_6d_velocity_effector .ControlParams (
342- 0.1 ,
345+ control_timestep ,
343346 joint_position_limit_velocity_scale = .95 ,
344347 minimum_distance_from_joint_position_limit = .01 ,
345348 joint_velocity_limits = np .array (consts .VELOCITY_LIMITS ['max' ]))
@@ -483,7 +486,8 @@ def _joint_torques(self, physics: mjcf.Physics) -> np.ndarray:
483486 self ._arm .joints ).qfrc_passive # pytype: disable=attribute-error
484487
485488
486- def build_robot (robot_params : params .RobotParams ) -> robot .Robot :
489+ def build_robot (robot_params : params .RobotParams ,
490+ control_timestep : float = 0.1 ) -> robot .Robot :
487491 """Builds a MoMa robot model of the Panda."""
488492 robot_sensors = []
489493 arm = Panda (actuation = robot_params .actuation , name = robot_params .name )
@@ -520,7 +524,7 @@ def build_robot(robot_params: params.RobotParams) -> robot.Robot:
520524 joint_velocity_effector = ArmEffector (robot_params , arm )
521525 _arm_effector = Cartesian6dVelocityEffector (robot_params , arm , gripper ,
522526 joint_velocity_effector ,
523- tcp_sensor )
527+ tcp_sensor , control_timestep )
524528
525529 robot .standard_compose (arm , gripper )
526530 moma_robot = robot .StandardRobot (arm = arm ,
0 commit comments