Ask Your Question
0

Attach an object to already attached object [closed]

asked 2016-12-14 06:46:42 -0500

bhavyadoshi26 gravatar image

Hi,

I want to know if it is possible to attach an object to an already attached object to the robot.

I tried to attach a second object to the first object (already attached to the robot) but got the error Link 'first_object' not found in model 'robot'

I attached the second object as a planning scene diff with these details :

attached_object.link_name = "first_object"; planning_scene.robot_state.attached_collision_objects.push_back(attached_object) planning_scene.robot_state.is_diff = true;

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by bhavyadoshi26
close date 2016-12-19 03:48:10.338066

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-12-14 08:39:30 -0500

rbbg gravatar image

Like you already guessed, that is not possible. The error Link 'first_object' not found in model 'robot' is coming from the robot_model.cpp. The planning scene updater looks for a LinkModel to attach the object to but cannot find it.

However, if you attach to the link of the robot that the first object is attached to, you will get the exact same result. As the transform between the Link and first_object will be static, and between Link and second_object as well (once you attach them), the transform between first_object and second_object will also be static.

edit flag offensive delete link more

Comments

I thought of that method but the problem in my case is that I have a host of objects of different sizes that I have to attach. So attaching them to the link the first_object was attached to works for some but not all (The others get displaced from where they are supposed to be).

bhavyadoshi26 gravatar image bhavyadoshi26  ( 2016-12-14 09:10:20 -0500 )edit

Can I attach the second_object to the link but assign the TF of the first_object ?

bhavyadoshi26 gravatar image bhavyadoshi26  ( 2016-12-14 09:14:02 -0500 )edit

The others get displaced from where they are supposed to be

that would seem to imply that your objects either have their origins not where they should be, of you're not accounting for the additional offset that you need to include between Link and your new objects.

gvdhoorn gravatar image gvdhoorn  ( 2016-12-14 13:19:29 -0500 )edit

Yes, I had manually shifted the origin of the second_object so that they would be oriented properly when attached to the link. But after reading your comment, I got another idea of how to do it. So I set the origins at the right places and set up some parameters and now it works fine. Thank you!

bhavyadoshi26 gravatar image bhavyadoshi26  ( 2016-12-19 03:46:18 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-12-14 06:46:42 -0500

Seen: 204 times

Last updated: Dec 14 '16