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

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

Julian94 gravatar image

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

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