Gazebo | Ignition | Community
Ask Your Question
0

Attaching A Sensor To An Animated Actor

asked 2017-02-07 16:22:28 -0500

mikec gravatar image

Hi all, Is there a way to attach a sensor to an animated actor? For example, in Gazebo 8 there is the ability to have animated collada files. This is a great new feature.

Using this tutorial, can I attach a sensor to the actor (for example, on his foot or waist)? Then as the actor moves, the sensor also moves.

I can add a sensor in a URDF. I can add a sensor to a model link in a world file. How can I do this to an already existing animated collada/DAE file?

Thanks,

Mike

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-02-07 17:52:58 -0500

chapulina gravatar image

Yes, you can attach a sensor using SDF (that's what the tutorial uses, not URDF).

The <actor> tag can have <link>s just like the <model> tag can.

Take the box example world in the tutorial for example and add a camera sensor to the box link:

<link name="box_link">
  ...
  <sensor name="camera" type="camera">
    <camera>
    </camera>
    <visualize>true</visualize>
  </sensor>
</link>

To do the same for the animated person, you could add a link to it. See more documentation on SDF here.

Also see this related question.

edit flag offensive delete link more

Comments

Chapulina, thanks for the reply. Your answer works. I think I'm trying to perform too many tasks simultaneously. My apologies for being redundant: I'm the one who asked the question in the related question. Sorry. :(

mikec gravatar imagemikec ( 2017-02-08 13:23:06 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-02-07 16:22:28 -0500

Seen: 641 times

Last updated: Feb 07 '17