Skip to content

Commit

Permalink
feat: improve grasping cube (#195)
Browse files Browse the repository at this point in the history
This commit improves the grasping cube so that it doesn't slide
out of the gripper (see #37).
  • Loading branch information
rickstaa authored Dec 13, 2023
1 parent 753f9e1 commit 3441187
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 24 deletions.
2 changes: 1 addition & 1 deletion panda_gazebo/resources/models/cube/model.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<name>Rick Staa</name>
<email>[email protected]</email>
</author>
<description>A small cube.</description>
<description>A small wooden cube.</description>
</model>
33 changes: 15 additions & 18 deletions panda_gazebo/resources/models/cube/model.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
<link name='link'>
<inertial>
<pose>0.03 0.03 0.03 0 -0 0</pose>
<!--NOTE: Uses Polyethylene density to calculate the mass
see https://en.wikipedia.org/wiki/Polyethylene
<!--NOTE: Uses wood (Longleaf Pine) density (i.e 590 kg/m^3) to calculate the
mass see https://en.wikipedia.org/wiki/Wood.
-->
<mass>0.20735999999999996</mass>
<mass>0.12743999999999997</mass>
<inertia>
<ixx>0.00012442</ixx>
<ixx>7.6464e-05</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.00012442</iyy>
<iyy>7.6464e-05</iyy>
<iyz>0</iyz>
<izz>0.00012442</izz>
<izz>7.6464e-05</izz>
</inertia>
</inertial>
<visual name='visual'>
Expand All @@ -40,27 +40,24 @@
</box>
</geometry>
<surface>
<!--NOTE: Used dynamic friction of clean dry plastic cube on a plastic surface
(i.e. Polyethylene) see https://www.engineeringtoolbox.com/friction-coefficients-d_778.html
<!--NOTE: Uses dynamic friction of brick on a wood surface
see https://www.engineeringtoolbox.com/friction-coefficients-d_778.html
-->
<friction>
<ode>
<mu>0.2</mu>
<mu2>0.2</mu2>
<mu>0.6</mu>
<mu2>0.6</mu2>
</ode>
<bullet>
<friction>0.6</friction>
<friction2>0.6</friction2>
</bullet>
</friction>
<contact>
<collide_bitmask>1</collide_bitmask>
<ode>
<kp>1e+06</kp>
<kd>1e+06</kd>
<max_vel>1</max_vel>
<min_depth>0.002</min_depth>
</ode>
<bullet>
<kp>1e+06</kp>
<kd>1e+06</kd>
</bullet>
</ode>
</contact>
</surface>
</collision>
Expand Down
2 changes: 1 addition & 1 deletion panda_gazebo/resources/models/long_platform/model.sdf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0'?>
<sdf version='1.7'>
<model name='long platform'>
<model name='long_platform'>
<link name='link'>
<inertial>
<mass>10</mass>
Expand Down
8 changes: 4 additions & 4 deletions panda_gazebo/resources/tools/inertia_mass_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
import numpy as np

# Script settings.
CUBE_WIDTH = 0.02
CUBE_DEPTH = 0.032
CUBE_HEIGHT = 0.064
CUBE_WIDTH = 0.06
CUBE_DEPTH = 0.06
CUBE_HEIGHT = 0.06

CYLINDER_RADIUS = 0.025
CYLINDER_HEIGHT = 0.02

MATERIAL_DENSITY = 2000
MATERIAL_DENSITY = 590


def get_cylinder_mass(radius, height, rho):
Expand Down

0 comments on commit 3441187

Please sign in to comment.