-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate cuRobo into action primitives & primitives refactoring #1027
base: og-develop
Are you sure you want to change the base?
Conversation
…checks in batched mode; generalize primitives to dual-arm setting
@@ -228,7 +228,7 @@ def __init__( | |||
num_trajopt_seeds=4, | |||
num_graph_seeds=4, | |||
interpolation_dt=0.03, | |||
collision_activation_distance=0.005, | |||
collision_activation_distance=0.05, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we make this configurable from the outside? Also, 0.05
seems a bit too large, not sure.
# Add the pose cost metric | ||
if motion_constraint is None: | ||
motion_constraint = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] | ||
pose_cost_metric = lazy.curobo.wrap.reacher.motion_gen.PoseCostMetric( | ||
hold_partial_pose=False, hold_vec_weight=self._tensor_args.to_device(motion_constraint) | ||
) | ||
plan_cfg.pose_cost_metric = pose_cost_metric |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add some comments to explain what this means?
for example, if someone passes in motion constraint [1, 0, 0, 0, 0 ,0]
, what does it mean?
world_objects_pose_offset=lazy.curobo.types.math.Pose.from_list( | ||
[0, 0, 0.01, 1, 0, 0, 0], self._tensor_args | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm I still prefer using scale
rather than world_objects_pose_offset
. IMO "shrinking" the object is still better than "lifting" the object.
arm_left: | ||
name: JointController | ||
subsume_controllers: [trunk] | ||
# subsume_controllers: [trunk] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why comment out?
use_impedances: true | ||
pos_kp: 200 | ||
pos_ki: 0.5 | ||
max_integral_error: 10.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this?
if isinstance(self.robot, Fetch): | ||
pose = { | ||
self.arm: ( | ||
th.tensor([0.48688125, -0.12507881, 0.97888719]), | ||
th.tensor([0.61324748, 0.61305553, -0.35266518, 0.35173529]), | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove fetch?
elif isinstance(self.robot, R1): | ||
pose = { | ||
self.robot.arm_names[0]: ( | ||
th.tensor([0.43, 0.2, 1.2]), | ||
th.tensor([1.0, 0.0, 0.0, 0.0]), | ||
), | ||
self.robot.arm_names[1]: ( | ||
th.tensor([0.43, -0.2, 1.2]), | ||
th.tensor([-1.0, 0.0, 0.0, 0.0]), | ||
), | ||
} | ||
elif isinstance(self.robot, Tiago): | ||
# TODO: default trunk position vs. raised trunk position | ||
# pose = { | ||
# self.robot.arm_names[0]: ( | ||
# th.tensor([0.4997, 0.2497, 0.6357]), | ||
# th.tensor([-0.5609, 0.5617, 0.4299, 0.4302]), | ||
# ), | ||
# self.robot.arm_names[1]: ( | ||
# th.tensor([0.4978, -0.2521, 0.6357]), | ||
# th.tensor([-0.5609, -0.5617, 0.4299, -0.4302]), | ||
# ), | ||
# } | ||
pose = { | ||
self.robot.arm_names[0]: ( | ||
th.tensor([0.5021, 0.2458, 0.7648]), | ||
th.tensor([-0.5599, 0.5649, 0.4303, 0.4269]), | ||
), | ||
self.robot.arm_names[1]: ( | ||
th.tensor([0.4999, -0.2486, 0.7633]), | ||
th.tensor([-0.5592, -0.5646, 0.4311, -0.4274]), | ||
), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the same as the reset joint pos?
@@ -1584,12 +1571,12 @@ def _get_reset_joint_pos(self): | |||
4.50000000e-02, | |||
] | |||
) | |||
if self.robot_model == "Fetch": | |||
if isinstance(self.robot, Fetch): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove fetch and add R1?
context=context, | ||
) | ||
pose_3d = self._get_robot_pose_from_2d_pose(pose_2d) | ||
# TODO: why was this 0.1? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this comment still valid?
@@ -2042,12 +2049,13 @@ def _settle_robot(self): | |||
Returns: | |||
th.tensor or None: Action array for one step for the robot to do nothing | |||
""" | |||
# TODO: fix empty action |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this comment still valid?
tiago_primitives_demo.mov