Home | Tutorials | Wiki | Issues
Ask Your Question
0

how to add collision to walking actor.

asked 2017-07-07 02:42:50 -0500

helenh gravatar image

It is said that link have to be child of model, but actor is not a model. But collision can be defined only in a link. My problem is that if I import walking_person from gazebos database into my world then it has collision, but if I define an actor in my world and add same link with collisions to my actor then it doesnt have collision still. Also i want the collision to be during walking. Any suggestions?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-07-07 09:39:37 -0500

nkoenig gravatar image

The Actor class inherits from Model. You can add links to an <actor> in SDF.. Not sure if that helps you.

What version of Gazebo are you using? Can you also post the world file that you are using?

edit flag offensive delete link more

Comments

I have posted the code now, that can be seen above.

helenh gravatar imagehelenh ( 2017-07-16 08:00:19 -0500 )edit
0

answered 2017-07-16 05:07:18 -0500

helenh gravatar image

updated 2017-07-16 05:13:50 -0500

I am using Gazebo 8. I tryed to add the collision link to my actor that is used in walking_person model sdf file in gazebo database, but it didnt work. And right now I have a box collision defined for my terrain. If including the walking_person model to the world then collision seems to work, person is on the collision box that is defined for terrain but with actor its not.

<actor name="actor5">

     <skin>
        <filename>walk.dae</filename>
        <scale>1.0</scale>
     </skin>

     <animation name="walking">
        <filename>walk.dae</filename>
        <scale>1.000000</scale>
        <interpolate_x>true</interpolate_x>
     </animation>

     <script>
        <loop>true</loop>
        <delay_start>0.000000</delay_start>
        <auto_start>true</auto_start>
        <trajectory id="0" type="walking">
           <waypoint>
              <time>1.000000</time>
              <pose>0 0 8 0.000000 0.000000 -1.47</pose>
           </waypoint>
           <waypoint>
              <time>1.000000</time>
              <pose>-1 0 8 0.000000 0.000000 -1.47</pose>
           </waypoint>
           <waypoint>
              <time>1.500000</time>
              <pose>-2 0 8 0.000000 0.000000 -1.47</pose>
           </waypoint>
           <waypoint>
              <time>2.000000</time>
              <pose>-3 0 8 0.000000 0.000000 -1.47</pose>
           </waypoint>
           <waypoint>
              <time>2.500000</time>
              <pose>-4 0 8 0.000000 0.000000 -1.47</pose>
           </waypoint>
           <waypoint>
              <time>3.000000</time>
              <pose>-5 0 8 0.000000 0.000000 -1.47</pose>
           </waypoint>
        </trajectory>
     </script>

  <link name="link">

      <inertial>
    <pose>0 0 0.95 0 0 0</pose>
    <mass>80.0</mass>
    <inertia>
      <ixx>27.82</ixx>
      <ixy>0</ixy>
      <ixz>0</ixz>
      <iyy>24.88</iyy>
      <iyz>0</iyz>
      <izz>4.57</izz>
    </inertia>
      </inertial>

      <collision name="bottom">
    <pose>0 0 8 0 0 0</pose>
    <geometry>
      <box>
        <size>0.35 0.75 0.02</size>
      </box>
    </geometry>
      </collision>
</link>

</actor>

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-07-07 02:42:50 -0500

Seen: 167 times

Last updated: Jul 16