Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Feb 11, 2017 11:25 pm 
Offline

Joined: Sat Jul 04, 2015 10:33 am
Posts: 349
Location: Bern, Switzerland
Hello,

I produced a simple snake multibody (a chain of 5 links) and I am working ok a reinforcement learning setup to make it move. Therefore I need to reset the multibody, but when I use the standard resetBasePositionAndOrientation, this greatly messes up my multibody. It usually gets instable and flies around. Is this insufficient to reset the whole body?Do I need to reset anything else? I will have to work on the stability later as I intend to increase the chain length to around 20 parts.


Top
 Profile  
 
PostPosted: Sun Feb 12, 2017 12:19 pm 
Offline

Joined: Sat Jul 04, 2015 10:33 am
Posts: 349
Location: Bern, Switzerland
Problem solved. It is that I rotated the inertial of the urdf body.

If your base has an orientation != Quaternion(0,0,0,1) when placed into the world such as this one:

Code:
   <link name="link_8">
      <collision>
        <geometry>
          <cylinder length="0.2" radius="0.025"/>
        </geometry>
        <origin rpy="0 1.57075 0" xyz="-0.1 0 0"/>
      </collision>
      <visual>
        <geometry>
          <cylinder length="0.2" radius="0.025"/>
        </geometry>
        <origin rpy="0 1.57075 0" xyz="-0.1 0 0"/>
      </visual>
      <inertial>
        <origin rpy="0 1.57075 0" xyz="-0.1 0 0"/> <<<<==== HERE I rotated the intertial
        <mass value="0.2"/>
        <inertia ixx="0.00006" ixy="0" ixz="0" iyy="0.00006" iyz="0" izz="0.00006"/>
      </inertial>
     </link>


resetting the multibody to some position and a Quaternion(0,0,0,1) causes it to be oriented wrongly. It can be solved by storing the initial orientation via getBasePositionAndOrientation(...) and resetting to that, or by not rotating the inertial.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group