Gazebo | Ignition | Community
Ask Your Question

How do you add collision and physical properties to Actor model?

asked 2021-11-10 17:07:02 -0500

Julian94 gravatar image

updated 2021-11-10 17:08:13 -0500

I am trying to simulate an environment where my bot has to interact with walking actors but the models keep walking through walls and my bot cannot detect them with sensors. How can I add collision to the Actor Model?

Below is my world sdf file being used.

<?xml version="1.0" ?>
<sdf version='1.7'>
<world name='default'>
<model name='ground_plane'>
  <link name='link'>
    <collision name='collision'>
          <normal>0 0 1</normal>
          <size>100 100</size>
    <visual name='visual'>
          <normal>0 0 1</normal>
          <size>100 100</size>
<gravity>0 0 -9.8</gravity>
<magnetic_field>6e-06 2.3e-05 -4.2e-05</magnetic_field>
<atmosphere type='adiabatic'/>
<physics type='ode'>
  <ambient>0.4 0.4 0.4 1</ambient>
  <background>0.7 0.7 0.7 1</background>
<actor name="actor1">
  <animation name="walking">
    <trajectory id="0" type="walking">
        <pose>2 2 0 0 0 -1.57</pose>
        <pose>2 -2 0 0 0 -1.57</pose>
        <pose>2 -2 0 0 0 1.57</pose>
        <pose>2 2 0 0 0 1.57</pose>
        <pose>2 2 0 0 0 -1.57</pose>
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2022-02-17 09:23:27 -0500

kakcalu13 gravatar image


If I were you, I would just create a sdf to import that .dae and add collision then import that sdf inside this world sdf. See here: for example.

That's my preference way.

Anyway back to your question,

I think your actor is not defined as a model. So, you need to define model then add collision in it. Try that

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2021-11-10 17:07:02 -0500

Seen: 1,136 times

Last updated: Feb 17 '22