How to simulate a Stewart Platform with Gazebo and ROS?
Hi :)
For an own project I want to move a platform with a pneumatic system (like the Stewart platform and for this I need a simulation with Gazebo. I'm really a beginner in using Gazebo and ROS and so I started with some tests (and tutorials) to learn how to use both systems. To begin with a "simple urdf-file" I created a table (1 platform with 4 legs) where I want to change the size of the legs. My aim is that Gazebo simulates the position of the platform when I change the size of each leg. But now I have some problems where I don't know how to solve them - maybe you can help me :)
I'm using the standalone version of Gazebo with Groovy on Ubuntu 12.04 32-Bit.
1) Unfortunately the tutorials ends before the description of how to manipulate the robot with controllers (here) and in addition I can't find a controller which simulates a pneumatic actuator. So I decided to create two boxes and to change the position of the inner box with a c++-program - this works for the moment very nice :) The problem is that I have to switch of the gravity for the inner box to avoid that it falls down - do you have a better idea to solve this problem?
<!-- Link 1 (outer box)-->
<joint name="Pn1_joint1" type="fixed">
<origin xyz="0 0 0"/>
<parent link="world"/>
<child link="Pn1_link1"/>
</joint>
<link name="Pn1_link1">
<collision>
<origin xyz="0 0 0.05" rpy="0 0 0"/>
<geometry>
<box size="${widthPneumatic} ${widthPneumatic} 0.1"/>
</geometry>
</collision>
<visual>
<origin xyz="0 0 ${heightPneumatic/2}" rpy="0 0 0"/>
<geometry>
<box size="${widthPneumatic} ${widthPneumatic} ${heightPneumatic}"/>
</geometry>
<material name="orange"/>
</visual>
<inertial>
<origin xyz="0 0 ${heightPneumatic/2}" rpy="0 0 0"/>
<mass value="1"/>
<inertia
ixx="1.0" ixy="0.0" ixz="0.0"
iyy="1.0" iyz="0.0"
izz="1.0"/>
</inertial>
</link>
<gazebo reference="Pn1_link1">
<material>Gazebo/Orange</material>
</gazebo>
<!-- Link 2 (inner box) -->
<joint name="Pn1_joint2" type="prismatic">
<origin xyz="0 0 0"/>
<parent link="Pn1_link1"/>
<child link="Pn1_link2"/>
<axis xyz="0 0 1"/>
<dynamics damping="100"/>
<limit lower="0" upper="${heightPneumatic}" effort="0.00001" velocity="0.00001"/>
</joint>
<link name="Pn1_link2">
<collision>
<origin xyz="0 0 ${heightPneumatic/2}" rpy="0 0 0"/>
<geometry>
<box size="${widthPneumatic-diffInOut} ${widthPneumatic-diffInOut} ${heightPneumatic+diffInOut}"/>
</geometry>
</collision>
<visual>
<origin xyz="0 0 ${heightPneumatic/2}" rpy="0 0 0"/>
<geometry>
<box size="${widthPneumatic-diffInOut} ${widthPneumatic-diffInOut} ${heightPneumatic+diffInOut}"/>
</geometry>
<material name="orange"/>
</visual>
<inertial>
<origin xyz="0 0 ${heightPneumatic/2}" rpy="0 0 0"/>
<mass value="1"/>
<inertia
ixx="1.0" ixy="0.0" ixz="0.0"
iyy="1.0" iyz="0.0"
izz="1.0"/>
</inertial>
</link>
<gazebo reference="Pn1_link2">
<material>Gazebo/Orange</material>
<turnGravityOff>true</turnGravityOff>
<mu1>100</mu1>
<mu2>100</mu2>
<selfCollide>true</selfCollide>
</gazebo>
2) So I added a second one to the world and wanted to connect these two actuators with the platform. There the tree structure of the urdf-file causes ...
After some other test I would say that the problem is that gazebo does not detect a collision. I found some other questions about this topic but no solution...<selfCollide>true</selfCollide> is set in all links. Do I have to do something more?