# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 2 posts ]
 Print view Previous topic | Next topic
Author Message
 Posted: Sat Feb 11, 2017 11:25 pm

Joined: Sat Jul 04, 2015 10:33 am
Posts: 348
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

 Posted: Sun Feb 12, 2017 12:19 pm

Joined: Sat Jul 04, 2015 10:33 am
Posts: 348
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:
<collision>
<geometry>
</geometry>
<origin rpy="0 1.57075 0" xyz="-0.1 0 0"/>
</collision>
<visual>
<geometry>
</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>

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

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 2 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 9 guests

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

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities