How to consider tools' spheres while attaching objects to robot? #361
Replies: 6 comments 8 replies
-
Yes, the assumption is that the link to attach spheres should not contain any geometry. You can create an additional frame for your robot like how it's done in In addition to creating the link, you also need to initialize spheres for the link like here: |
Beta Was this translation helpful? Give feedback.
-
Another problem i meet is that when i use The related code is listed below:
Here, the obs_package_grasp is the name of Cuboid defined by: I also find the “attached_object” spheres in robot cfg seems no change before and after attaching because i print motion_gen.robot_cfg, like this:
I think after attaching, the motion_gen should change, but i don't find how to write a new config (robot with attached object), could you tell me the write function? If i write a new yaml file, and pass it to the UsdHelper.write_trajectory_animation_with_robot_usd(), maybe it works?
|
Beta Was this translation helpful? Give feedback.
-
Hello @linhy97 and @qingquluofeng The Attach/Detach functions will create a sphere representation of the selecting object on the virtual link (or tool) on the robot and updates the whole robot's sphere representation (As I tested the CuRobo itself using MoveIt and in ROS-Noetic). The problem you're encountering is that the environment represented for CuRobo (contains a set of Cuboids, Meshes, ....) is not equal to the Isaac Sim's world. It basically means that everytime you're trying to plan a movement for your robot, you're updating the CuRobo's world representation using USD_Helper library which acts like an API to get the information from Isaac Sim and update CuRobo's world with that. Therefore, there is no real-time communication between CuRobo's world representation and Isaac Sim (it might be in CuRobo's MPC function, but I haven't gone deep into it yet). Now, once you attach an object to the robot, what happens is that the object's sphere representation will be generated and added to the created virtual link (which updates the whole robot's sphere representation in CuRobo). This will result in a correct movement of the robot (when you're using path planning functions such as plan_single(...)). However, you won't see an actual attachment of the object to the robot in your simulation environment (Isaac Sim for your case or Gazebo in other cases). Therefore, you can proceed to the solution with 2 different approaches: 1- The simple solution is to remove the object from the environment and create it in the virtual link's location once the path planning is done (It seems dumb since you can't see the actual movement of the robot + object). However, it works fine since the sphere representation of the robot has the object's sphere representation added to itself (Because the whole point of CuRobo is to move the robot's sphere in a way to avoid collision with the world environment). 2- If you want to see the actual movement of the robot and object together, you have to not only attach the object to the robot in CuRobo (the sphere representation of it), but also attach the object to the robot in the simulation environment (creating a new virtual link in Isaac Sim). To do so, you have to use the Isaac Sim's Surface Gripper extension. It will create an additional link for the robot (it can be in the same location as the virtual link or tool created for CuRobo) and it will attach and lock any object that hits the coordination on Close/Open impulses. I will add a couple of links below which are good starting points to this matter. Omniverse Isaac Sim Gripper Extension Surface Gripper Medium Tutorial Just a quick tip: We have already used this extension in our Python standalone code and it's working. However, since we haven't published the work yet, I can't provide any piece of our code as of now. You can get into it and let me know if you had any problems, so I will help you on that matter if you want to ^-^. Best of Luck |
Beta Was this translation helpful? Give feedback.
-
@AmirpooyaSh Thanks a lot for your detailed answer~ |
Beta Was this translation helpful? Give feedback.
-
Another problem i meet is how to find an appropriate settings of attaching objects, i find a larger number(e.g. 256) of parameter
|
Beta Was this translation helpful? Give feedback.
-
@linhy97
Once you call the attach_object_to_robot(...) function, it will automatically update the sphere representation of the links (basically adding the sphere representation of the attached object). Therefore, having the above piece of code in the execution function of your path planning algorithm will make it work (the moment you're passing waypoints to the robot's articulation controller). Just to let you know, if you're robot is not in [0,0,0] and you want to add_robot_to_scene(...) with a different origin (for our case we had a second robot in [4.6, 0, 0.025] location, the robot will be placed, but the spheres will be shown on [0,0,0] if you use the code above. To make it work, you have to update sphere poses in the loops position=np.ravel(s.position) | spheres[si].set_world_pose(position=np.ravel(s.position)) with the robot's location (in the case I mentioned you have to add 4.6 to their x values and 0.025 to their z values). |
Beta Was this translation helpful? Give feedback.
-
Hello, when i use the function "attach_object_to_robot()"
I note that the statements about the parameter "link_name" is: Name of the link (frame) to attach the objects to. The assumption is that this link does not have any geometry and all spheres of this link represent attached objects.
However, in my situation, there exists an tool attached to the UR10's ee_link (for example, a sponge suction cup used to draw something), is there any method to consider the tool's spheres in collision checker at the same time? In my practice, it seems when i attach the object to the tool link, then only spheres of the attached object will be consider and the tool's original spheres will disapear.
Beta Was this translation helpful? Give feedback.
All reactions