-
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?
Changes from 36 commits
3123d1d
f94c760
5871adc
f902e86
8f73b6f
ee0f8f6
5740749
519f5e5
0fbefe7
749d2cf
9f0e101
c06029c
ced8693
c1b4986
863f3b6
671db19
b3fd62b
81647d3
9e5c349
071baa3
7ba8054
6b8b670
08e9b14
ec5d68b
4466ee5
6e5682b
267fad0
90c3b0c
3615f24
bd6768a
b4c83c7
c7629d3
2dfa062
09e68f5
f24e4b9
a997b28
b93185e
fe3c003
5b9d242
82fffbe
21fa12e
b284d28
1eb7244
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, | ||
self_collision_check=True, | ||
maximum_trajectory_dt=None, | ||
fixed_iters_trajopt=True, | ||
|
@@ -336,6 +336,7 @@ def check_collisions( | |
self, | ||
q, | ||
check_self_collision=True, | ||
skip_obstacle_update=False, | ||
): | ||
""" | ||
Checks collisions between the sphere representation of the robot and the rest of the current scene | ||
|
@@ -353,7 +354,8 @@ def check_collisions( | |
emb_sel = CuroboEmbodimentSelection.DEFAULT | ||
|
||
# Update obstacles | ||
self.update_obstacles() | ||
if not skip_obstacle_update: | ||
self.update_obstacles() | ||
|
||
q_pos = self.robot.get_joint_positions().unsqueeze(0) | ||
cu_joint_state = lazy.curobo.types.state.JointState( | ||
|
@@ -428,7 +430,9 @@ def compute_trajectories( | |
return_full_result=False, | ||
success_ratio=None, | ||
attached_obj=None, | ||
motion_constraint=None, | ||
attached_obj_scale=None, | ||
skip_obstacle_update=False, | ||
emb_sel=CuroboEmbodimentSelection.DEFAULT, | ||
): | ||
""" | ||
|
@@ -509,8 +513,16 @@ def compute_trajectories( | |
success_ratio=1.0 / self.batch_size if success_ratio is None else success_ratio, | ||
) | ||
|
||
# Refresh the collision state | ||
self.update_obstacles() | ||
# 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 commentThe reason will be displayed to describe this comment to others. Learn more. can you add some comments to explain what this means? |
||
|
||
if not skip_obstacle_update: | ||
self.update_obstacles() | ||
|
||
for link_name in target_pos.keys(): | ||
target_pos_link = target_pos[link_name] | ||
|
@@ -581,9 +593,12 @@ def compute_trajectories( | |
object_names=obj_paths, | ||
ee_pose=ee_pose, | ||
link_name=self.robot.curobo_attached_object_link_names[ee_link_name], | ||
scale=0.99 if attached_obj_scale is None else attached_obj_scale[ee_link_name], | ||
scale=1.0 if attached_obj_scale is None else attached_obj_scale[ee_link_name], | ||
pitch_scale=1.0, | ||
merge_meshes=True, | ||
world_objects_pose_offset=lazy.curobo.types.math.Pose.from_list( | ||
[0, 0, 0.01, 1, 0, 0, 0], self._tensor_args | ||
), | ||
Comment on lines
+670
to
+672
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm I still prefer using |
||
) | ||
|
||
all_rollout_fns = [ | ||
|
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.