questions about attach_external_objects_to_robot #410
Answered
by
balakumar-s
frankchan12138
asked this question in
Software Q&A
-
I tried to use attach_external_objects_to_robot in motion_gen.py. I wonder why we have to judge n_spheres variable? max_spheres = self.robot_cfg.kinematics.kinematics_config.get_number_of_spheres(link_name)
object_names = [x.name for x in external_objects]
n_spheres = int(max_spheres / len(object_names))
sphere_tensor = torch.zeros((max_spheres, 4))
sphere_tensor[:, 3] = -10.0
sph_list = []
if n_spheres == 0:
log_warn(
"MG: No spheres found, max_spheres: "
+ str(max_spheres)
+ " n_objects: "
+ str(len(object_names))
)
return False |
Beta Was this translation helpful? Give feedback.
Answered by
balakumar-s
Oct 16, 2024
Replies: 1 comment 1 reply
-
We have to set a specific number of spheres as this is allocated during creation of the kinematics instance. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
frankchan12138
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have to set a specific number of spheres as this is allocated during creation of the kinematics instance.