Compare commits

..
476 Commits
Author SHA1 Message Date
erwincoumans 63c4d67e33 add pyproject.toml
see also https://packaging.python.org/en/latest/guides/modernize-setup-py-project/ and
https://github.com/pypa/pip/issues/6334
2025-10-21 19:13:14 -07:00
Erwin Coumans d1a4256b3a update CMake required version 2025-04-23 14:17:20 -07:00
Erwin Coumans 6c888f4abd update docker command/version, so pybullet wheels are compatible with numpy 2.0 and 1.0
(thanks to Antonin Raffin for the report)
2025-01-29 15:09:22 -08:00
Erwin Coumans bda00360fb add wheel creation script, usage
assume bullet3 is located in ~/dev/bullet3 and run this docker command from ~

sudo docker run -it -v $(pwd):/io quay.io/pypa/manylinux2014_x86_64

then in the docker
cd io/dev/bullet3
./wheel.sh

after exit of docker, the wheels are in ~/wheelhouse
and can be uploaded to pypi
2025-01-29 14:29:46 -08:00
Erwin Coumans 69783a8480 : 2025-01-29 14:28:32 -08:00
erwincoumans e9c461b0ac Merge pull request #4576 from lukebayes/patch-1
Add missing ".h" to file pointer
2024-04-09 16:35:53 -07:00
erwincoumans 43d336fcad Merge pull request #4585 from ConnorTingley/Floating-Body-Inverse-Dynamics
Fix calculateInverseDynamics losing one joint DOF for floating bodies
2024-04-09 16:30:33 -07:00
erwincoumans 5e89410409 Merge pull request #4583 from iche033/iche033/joint_force_torque
Fix joint force/torque feedback
2024-04-09 16:25:09 -07:00
ctingley 2c7918423d Quaternion to Euler correction 2024-02-27 07:17:48 -08:00
Ian Chen d7f9d66207 apply joint forces patch
Signed-off-by: Ian Chen <ichen@openrobotics.org>
2024-02-23 23:47:20 +00:00
Luke Bayes 335c18821f Update CMakeLists.txt
Quick patch to fix a build warning.

When building from source with CMake, this warning showed up:

```bash
CMake Warning (dev) at examples/ExampleBrowser/CMakeLists.txt:433 (ADD_EXECUTABLE):
  Policy CMP0115 is not set: Source file extensions must be explicit.  Run 
  "cmake --help-policy CMP0115" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.                     
                                                                           
  File:                                                                    
                                                                           
    examples/Benchmarks/TaruData.h

This warning is for project developers.  Use -Wno-dev to suppress it.      
```

Adding the .h to the reference mitigated this warning.
2024-02-18 22:16:04 -05:00
Erwin Coumans 6bb8d1123d Bump up pybullet version to 3.26
expose max_num_object_capacity and max_shape_capacity_in_bytes to override the graphics VBO buffer allocations. This allows to load larger triangle meshes in pybullet.

Example:
p.connect(p.GUI, options="--max_num_object_capacity=131072 --max_shape_capacity_in_bytes=1073741824")

Use MAX_NUM_PARTS_IN_BITS=4 by default, this allows to use 134 million triangles in each concave triangle mesh in PyBullet (instead of 2 Million)
2023-11-28 14:23:32 -08:00
Erwin Coumans fcef2c81f2 expose max_num_object_capacity and max_shape_capacity_in_bytes to override the graphics VBO buffer allocations. This allows to load larger triangle meshes in pybullet.
Example:
p.connect(p.GUI, options="--max_num_object_capacity=131072 --max_shape_capacity_in_bytes=1073741824")

Use MAX_NUM_PARTS_IN_BITS=4 by default, this allows to use 134 million triangles in each concave triangle mesh in PyBullet (instead of 2 Million)
2023-11-28 14:21:33 -08:00
erwincoumans 39b8de74df Merge pull request #4444 from littlemine/patch-1
fix child transforms of a compound
2023-05-04 06:10:06 -07:00
erwincoumans e7193f8fdf Merge pull request #4462 from gazebo-forks/nkoenig/fix_joint_wrench
Fix joint force/torque sensor values
2023-05-04 06:09:50 -07:00
Xinlei Wang d9a4a7e703 fix child transforms of a compound 2023-04-11 22:21:21 +08:00
Nate Koenig 94e5b69379 Skip zeroAccSpatFrc for the constraint passes
Signed-off-by: Nate Koenig <nate@openrobotics.org>
2023-03-07 11:31:10 -08:00
erwincoumans 0e59474e1c Merge pull request #4413 from aprilprojecteu/master
re-enable softbody/rigidbody contact report
2023-02-24 10:54:03 -08:00
erwincoumans c037d9ba27 Merge pull request #4382 from ManuCorrea/fix-points
Added fix for deleting debug points with life time.
2023-02-24 10:32:04 -08:00
Maarten Behn e323404ac3 ok it's working I guess 2022-12-27 20:28:50 +01:00
Maarten Behn 5c8dfe4b21 got the data tunnelt with getMeshData 2022-12-27 19:46:22 +01:00
Maarten Behn 54cdf39933 extending wrapper 2022-12-22 19:27:16 +01:00
Maarten Behn 2b4757f512 extend wrapper 2022-12-21 14:44:35 +01:00
Maarten Behn 9dd446609a Adding getTetraMeshData() 2022-12-19 15:31:21 +01:00
Johannes Brust 60512c7872 Fix bug due to missing swap
(cherry picked from commit 61d5bdb783)
2022-12-19 11:00:27 +01:00
Johannes Brust fa1d1fc8ee Add deformable contact forces info
- add contact information for collisions between rigid and soft bodies
- collisions between different soft bodies are not supported
- uses impulse acting on tetrahedral nodes for calculation of forces
- contact points are approximated by node positions
- multiple forces acting on identical nodes are accumulated

(cherry picked from commit 5795bd676f)
2022-12-19 10:59:29 +01:00
yo 8549f00502 Added fix for deleting debug points with life time. 2022-12-13 18:39:21 +01:00
erwincoumans 2c204c49e5 Merge pull request #4284 from vitalybuka/master
Initialize vertexSource
2022-09-24 20:00:36 -07:00
erwincoumans 327336d80b Merge pull request #4314 from mahiuchun/core
Use OpenGL 3.3 core profile in eglCreateContext().
2022-09-24 19:59:02 -07:00
erwincoumans dad061fc13 Merge pull request #4295 from ShoYamanishi/improvement_lemke_leaving_variable
fix: improve the lexico-minimum finder in LemkeAlgorithm.
2022-09-02 10:17:14 -07:00
erwincoumans daadfacfff Merge pull request #4309 from vitalybuka/box
Initialize 4th component of btVector3
2022-08-16 21:47:10 -07:00
erwincoumans fd2fe1365a Merge pull request #4321 from crewmatt/master
Update btSoftBody to handle close to degenerate triangles.
2022-08-16 21:45:01 -07:00
Matt Bennice ee0100abbf compare to SIMD_EPSILON. 2022-08-11 14:00:12 -07:00
Matt Bennice 555c0c6cd9 Remove the duplicated code outside of else 2022-08-11 11:55:50 -07:00
Matt Bennice 82b7fa6df0 Update parameters to be const. 2022-08-11 11:46:39 -07:00
Matt Bennice c7a67d509e Update btSoftBody to handle close to degenerate triangles. 2022-08-11 11:09:08 -07:00
Hill Ma dfdb6e2db9 Use OpenGL 3.3 core profile in eglCreateContext().
- Similar attributes are already used in GLFWOpenGLWindow.cpp.
- This could avoid setting environment variables when using old Mesa where OpenGL compatibility profile is limited to 3.1.
2022-08-07 11:46:02 -07:00
Vitaly Buka acbeea543b Initialize 4th component of btVector3
It's used in btVector3::setMax
2022-07-22 11:08:39 -07:00
Sho Yamanishi d19a418728 fix: improve the lexico-minimum finder in LemkeAlgorithm.
The following issues in btLemkeAlgorithm::findLexicographicMinimum() are addressed in this commit.

- The z_0 column located at A(*,2*dim), is used for lexico minimum test, which should not be used.
- If the check on the 1st column 'q' produces multiple minimums due to generacy,
  and if it contains z_0, the tie must be broken in favor of z_0 and return,
  which is not performed in the original.

- The 1st part to construct 'Rows' is unnecessary.
- The 2nd part has three nested loops with brute-force search, which is inefficient.

The improved version performs the lexico minimum test column-by-column
from the left-most column of (-B^{-1}q:B^{-1}).
If the test finds a single row, it returns it.
If the test finds multiple rows and if they contain z_0, it returns z_0.
Otherwise, it moves on to the next column.
Please see  2.2.2 "Pivot Step" of
    K. Murty, "Linear Complementarity, Linear and Nonlinear Programming" Heldermann Verlag, Berlin, 1998
for the algorithm details.

Some performance tests are done and non-negligible improvment was observed.
Please see https://github.com/ShoYamanishi/AppleNumericalComputing/tree/main/14_lcp for the test details.
2022-06-30 19:10:24 +02:00
Vitaly Buka 6626ed1a89 Initialize vertexSource
Default constructor of btVector3 does not initialize the object.
This fixes Memory Sanitizer reports.
2022-06-15 15:17:51 -07:00
erwincoumans a1d96646c8 Merge pull request #4118 from dbartolini/fix-warning
Fix indentation
2022-05-26 23:12:33 -04:00
erwincoumans 466b76680b Merge pull request #4146 from petershh/patch-1
Add explicit int cast to avoid conversion warning
2022-05-26 23:10:40 -04:00
erwincoumans 19aa740d84 Merge pull request #4269 from erwincoumans/master
OpenAI Gym API change: add mode argument to render method
2022-05-20 12:35:28 -07:00
Erwin Coumans 4ca2de2fd7 Merge remote-tracking branch 'bp/master' 2022-05-20 12:32:22 -07:00
Erwin Coumans 7ba2965a22 bump up PyBullet to version 3.25 2022-05-20 12:21:34 -07:00
Erwin Coumans 56186db344 disable the early out, it has some issues.
see https://github.com/bulletphysics/bullet3/issues/4263
2022-05-20 12:18:37 -07:00
erwincoumans 2ad5f5a7d7 Merge pull request #4264 from akien-mga/fix-Wunused-but-set-variable
Fix `-Wunused-but-set-variable` in debug code
2022-05-20 12:14:30 -07:00
Erwin Coumans b9df2190f1 OpenAI Gym API change: add mode argument to render method 2022-05-20 11:16:19 -07:00
Rémi Verschelde cc3f3cf7ca Fix -Wunused-but-set-variable in debug code 2022-05-16 16:07:29 +02:00
erwincoumans 7dee3436e7 Merge pull request #4252 from erwincoumans/master
manually copy data, to avoid possible memory leaks.
Thanks to Jason Peng and Gilbert Feng for the report and reproduction case.
2022-04-25 19:39:24 -07:00
Erwin Coumans 657f347223 Merge remote-tracking branch 'bp/master' 2022-04-25 19:38:10 -07:00
erwin coumans fdab95dbab Merge branch 'master' of github.com:erwincoumans/bullet3 2022-04-25 19:32:45 -07:00
erwin coumans a899725cc6 clear the m_userVisualShapeHandles at resetSimulation to avoid memory build-up (not a leak at exit, since memory was del-allocated in the destructor) 2022-04-25 19:32:25 -07:00
Erwin Coumans ae4c1f8e72 bump up pybullet to 3.24 2022-04-25 18:33:59 -07:00
erwin coumans 9185f93174 manually copy data, to avoid possible memory leaks. 2022-04-25 18:31:07 -07:00
erwincoumans e95657f80f Merge pull request #4251 from erwincoumans/master
remove 'override' since Bullet uses C++2003
2022-04-24 16:50:07 -07:00
Erwin Coumans 9eb945b1e8 Merge remote-tracking branch 'bp/master' 2022-04-24 16:48:57 -07:00
Erwin Coumans 968b4356dc bump up pybullet version to 3.23 2022-04-24 16:48:28 -07:00
Erwin Coumans 957a46d840 Merge branch 'master' of github.com:erwincoumans/bullet3 2022-04-24 16:13:14 -07:00
Erwin Coumans a3ec165915 remove the 'override' keyword, Bullet is C++2003 2022-04-24 16:12:40 -07:00
erwincoumans 617df44898 Merge pull request #4248 from CrosRoad95/patch-1
Allow delivered classes to access unscaled points
2022-04-23 15:52:39 -07:00
erwincoumans ce23bb9dce Merge pull request #4249 from erwincoumans/master
fix for debug lines / point rendering, introduced in PR #3996
2022-04-23 15:52:10 -07:00
Erwin Coumans f263c422e2 Merge branch 'master' of github.com:erwincoumans/bullet3 2022-04-23 14:00:22 -07:00
Erwin Coumans 31b9be82a1 revert lines glsl shader, and add points glsl shader for instanced rendering of point cloud. 2022-04-23 13:56:40 -07:00
erwincoumans 0edcbd693a Merge pull request #4241 from erwincoumans/master
remove dependency on Examples from src folder.
2022-04-23 06:25:00 -07:00
Sebastian Jura 2a8d463fd3 Allow delivered classes to access unscaled points 2022-04-22 18:09:49 +02:00
Erwin Coumans 4f0673810c move loadDeformableState into CustomSoftBodyHelper, Bullet/src is not allowed to depend on Bullet/Examples 2022-04-18 21:17:21 -07:00
erwincoumans cd771af26f Merge pull request #4228 from Teemperor/FixUninitRead
Fix uninitialized read in rpyFromMatrix
2022-04-14 21:55:52 -07:00
erwincoumans 31aeeadb2d Merge pull request #4234 from szabolcsdombi/szabolcsdombi-patch-1
fix missing getTransformB in btMinkowskiSumShape
2022-04-14 21:55:29 -07:00
Szabolcs Dombi aef1d3e27d fix missing getTransformB in btMinkowskiSumShape
- also keep original method with different casing for backward compatibility reasons
2022-04-14 17:10:40 +03:00
Raphael Isemann 772dcf57ff Fix uninitialized read in rpyFromMatrix
The computation of `rpy(1)` tries to take the sin of `rpy(0)` (which is only
initialized a line later).
2022-04-02 00:56:14 +02:00
erwincoumans e306b274f1 Update VERSION 2022-03-29 21:03:06 -07:00
Daniele Bartolini 66012fe215 Fix indentation 2022-03-28 21:57:41 +02:00
Erwin Coumans d3b4c27db4 bump up version to 3.22 2022-03-25 19:59:28 -07:00
erwincoumans 22d9eec148 Merge pull request #4219 from erwincoumans/master
remove thread import, it is not needed and required C++11
2022-03-25 19:56:39 -07:00
Erwin Coumans 5e8a4717b9 remove thread import, it is not needed and required C++11 2022-03-25 19:56:03 -07:00
erwincoumans ae885be38d Merge pull request #4218 from erwincoumans/master
fix compile error
2022-03-25 19:50:48 -07:00
Erwin Coumans 0070e0d52b fix compile error
bump up to pybullet 3.22
2022-03-25 19:49:53 -07:00
erwincoumans 5d75748c0d Merge pull request #4213 from bwrsandman/fix-uwp
UWP: Fix potentially uninitialized local pointer variable error
2022-03-25 19:29:36 -07:00
erwincoumans b9117c780f Merge pull request #4212 from bwrsandman/patch-1
Fix compile on windows 64 bit arm architecture
2022-03-25 19:29:27 -07:00
erwincoumans c07f6f66e8 Merge pull request #4211 from Roker2/fix_manifold_point_warning
BulletCollision: NarrowPhaseCollision: btManifoldPoint: Fix warning spam
2022-03-25 19:25:37 -07:00
erwincoumans c0c03f279a Merge pull request #4217 from DVLP/patch-1
Intermittent alignment issues fix
2022-03-25 19:21:01 -07:00
Pawel 5e8343cffe Intermittent alignment issues fix
Not sure if this is omitted at purpose, but adding this like in most aligned classes/structs fixes some intermittent problems with alignment when reassigning transforms. There's also one `BT_DECLARE_ALIGNED_ALLOCATOR` missing in `btMatrix3x3.h` but with the fix above it doesn't seem to be necessary.
2022-03-24 10:39:51 +00:00
Sandy Carter 35264f81bb UWP: Fix potentially uninitialized local pointer variable error 2022-03-20 15:46:58 -04:00
Sandy e4414c8023 Fix compile on windows 64 bit arm architecture
When building 64 bit arm with visual studio, btScalar will try to include SSE headers meant for x86 and x64 architectures.
This gives the following error in many source files:
```
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.31.31103\include\emmintrin.h(20): fatal error C1189: #error:  This header is specific to X86 and X64 targets
```
2022-03-20 15:41:07 -04:00
Roker2 072439b8eb BulletCollision: NarrowPhaseCollision: btManifoldPoint: Fix warning spam
C:\Program Files (x86)\BULLET_PHYSICS\include\bullet/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h: In constructor 'btManifoldPoint::btManifoldPoint(const btVector3&, const btVector3&, const btVector3&, btScalar)':
C:\Program Files (x86)\BULLET_PHYSICS\include\bullet/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h:108:12: warning: 'btManifoldPoint::m_normalWorldOnB' will be initialized after [-Wreorder]
  btVector3 m_normalWorldOnB;
            ^~~~~~~~~~~~~~~~
2022-03-19 15:08:53 +03:00
erwincoumans ea715cc3b3 Merge pull request #4196 from erwincoumans/master
remove debugging lines
2022-03-09 20:48:02 -08:00
erwincoumans 6c300fbeee Merge pull request #4198 from fuchuyuan/fix
Restore B3_MESH_DATA_SIMULATION_MESH flag and suppress virtual warnings
2022-03-09 17:55:30 -08:00
Chuyuan Kelly Fu d63a721eaa fix 2022-03-09 10:00:19 -08:00
Chuyuan Kelly Fu 158eb6d63b fix 2022-03-08 22:00:14 -08:00
Erwin Coumans e942db6f4d remove debugging lines 2022-03-08 07:48:43 -08:00
erwincoumans e576dbe92c Merge pull request #4195 from bulletphysics/revert-4194-revert-4069-master
redo "Reduced Deformable Model""
2022-03-08 07:46:21 -08:00
erwincoumans 4fbecfeddc Revert "Revert "Reduced Deformable Model"" 2022-03-07 16:35:07 -08:00
erwincoumans aee1ab63fe Merge pull request #4194 from bulletphysics/revert-4069-master
Revert "Reduced Deformable Model"
2022-03-07 15:39:31 -08:00
erwincoumans 3df6e1a721 Revert "Reduced Deformable Model" 2022-03-07 15:38:32 -08:00
erwincoumans a8e1ce8273 Merge pull request #3996 from wkentaro/addUserDebugPoints
Add pybullet.addUserDebugPoints
2022-03-06 20:54:09 -08:00
erwincoumans 2e4e25b330 Merge pull request #4190 from erwincoumans/master
fix build
2022-03-06 18:54:04 -08:00
erwincoumans 6b35174ea9 Merge pull request #4137 from duckdoom5/patch-1
Remove unused variable
2022-03-05 19:13:13 -08:00
erwincoumans 2b685e98ee Merge pull request #4161 from r-a-sattarov/master
E2K: fixed build by MCST lcc compiler when using BUILD_EXTRAS=ON option
2022-03-05 19:12:40 -08:00
Erwin Coumans e262b2b7ee fix premake4 build 2022-03-05 18:41:55 -08:00
Erwin Coumans 3315190d97 add Reduced Deformable files to setup.py 2022-03-05 17:29:44 -08:00
Erwin Coumans 90414a5074 Merge remote-tracking branch 'bp/master' into master 2022-03-05 14:02:18 -08:00
erwincoumans b74bdfbbcf Merge pull request #4187 from asuka-mio/master
fix build with bionic c
2022-03-05 13:51:34 -08:00
erwincoumans 0c40b73b0e Merge pull request #4167 from simjaecheol/master
urdfEditor - handle joint limits
2022-03-05 13:50:58 -08:00
erwincoumans 103db13379 Merge pull request #4175 from cmower/cmower-fix-import-error
Fix import error in humanoid running examples.
2022-03-05 13:50:07 -08:00
erwincoumans 0ec6091efb Merge pull request #4170 from fuchuyuan/reconstruct
Reconstruct
2022-03-05 13:49:36 -08:00
erwincoumans e32c0674e7 Merge pull request #4172 from fuchuyuan/contact
Provide Deformable-Deformable contact for request contact info
2022-03-05 13:48:47 -08:00
erwincoumans 34a471586e Merge pull request #4069 from jyc-n/master
Reduced Deformable Model
2022-03-05 13:48:32 -08:00
Erwin Coumans dd93f73fc4 Merge remote-tracking branch 'bp/master' into master 2022-03-05 13:41:28 -08:00
Chuyuan Kelly Fu 3fd61413df bug fix 2022-03-03 18:20:35 -08:00
Chuyuan Kelly Fu cf185a2d53 format files 2022-03-03 18:11:58 -08:00
Chuyuan Kelly Fu c9fe6638f8 limit num contacts reported. Add distance to Deformable Deformable contact 2022-03-03 18:05:50 -08:00
tarsin 187b2bbc68 fix build with bionic c 2022-03-04 09:28:18 +08:00
Chuyuan Kelly Fu a8cf6008b7 format commit 2022-03-03 12:03:06 -08:00
Chuyuan Kelly Fu c014789db0 remove redundant functions 2022-03-03 12:03:06 -08:00
Chuyuan Kelly Fu 4b12767b60 add collision info 2022-03-03 12:03:06 -08:00
Chuyuan Kelly Fu 3088db22a2 bug fix 2022-03-02 21:43:01 -08:00
jingyuc 5fd7ec99ba Merge branch 'master' of github.com:jyc-n/bullet3 2022-02-28 17:16:57 -08:00
jingyuc 2c1cd798ea revert RobotSimulatorMain.cpp 2022-02-28 17:15:49 -08:00
Jingyu Chen e9a78e460c compile fix 2022-02-28 14:46:44 -08:00
jingyuc ca9d9b3ee6 Merge branch 'bulletphysics:master' into master 2022-02-28 14:30:10 -08:00
erwincoumans 9f3c4123a2 Merge pull request #4174 from sippeyxp/substep_rand
Fix incorrect application of disturbance push.
2022-02-28 07:41:58 -08:00
jingyuc c89a7054e9 pybullet reduced deformable examples setup updated 2022-02-28 01:04:14 -08:00
Erwin Coumans 28b951c128 add optimization for early out for convex versus triangle mesh. Helps getting closer to Jolt Physics Benchmark (at low number of threads) 2022-02-25 13:43:35 -08:00
erwincoumans 267f983498 Merge pull request #4178 from RanTig/rb-userdata
Also adds user data specified in URDF files to rigid bodies.
2022-02-24 11:21:46 -08:00
r-a-sattarov 6038bb2993 E2K: fixed build by MCST lcc compiler when using BUILD_EXTRAS=ON option
re-implementation of previous patch - https://github.com/bulletphysics/bullet3/pull/3060/
2022-02-24 22:08:05 +03:00
erwincoumans 58cde7b598 Merge pull request #4181 from erwincoumans/master
rename tiny_obj_loader.h namespace to bt_tinyobj to avoid conflicts
2022-02-24 09:22:53 -08:00
Erwin Coumans 9bfca83a8f rename tiny_obj_loader.h namespace to bt_tinyobj to avoid conflicts 2022-02-24 08:32:34 -08:00
Tigran Gasparian d26dbef2dc Also adds user data specified in URDF files to rigid bodies (previously,
only multi bodies were added correctly).
2022-02-23 16:45:52 +01:00
erwincoumans 88651395b7 Merge pull request #4171 from fuchuyuan/index
fix inded in loop
2022-02-22 10:07:44 -08:00
Chris E. Mower 713392b789 Fix import error in humanoid running examples.
Note, RuntimeError thrown when eager execution is enabled.
2022-02-21 15:05:16 +00:00
Peng Xu 19d6304d8d Update push randomizer to use the new randomize_sub_step hook. This fixes issue that causes application of push force/torque is only valid for single simulation step. 2022-02-20 15:47:08 -08:00
Peng Xu 751fd3fb65 Adding new randomization hook for sim steps (sub steps). This is necessary for correctly implement force / torque randomization. 2022-02-20 15:35:06 -08:00
jingyuc 41ce1cca24 clean up initialization and the rigid flag 2022-02-20 02:27:18 -08:00
Chuyuan Kelly Fu 60b6df94d9 fix compile 2022-02-18 18:11:18 -08:00
Chuyuan Kelly Fu 372c8e07bc fix inded in loop 2022-02-18 17:51:47 -08:00
Chuyuan Kelly Fu 548d6af901 fix compile 2022-02-18 17:49:26 -08:00
Chuyuan Kelly Fu 807cf3d387 format commit 2022-02-18 17:49:26 -08:00
Chuyuan Kelly Fu bdba9fa2e0 format changes 2022-02-18 17:49:26 -08:00
Chuyuan Kelly Fu 4e5b3f34c9 add API to get and set mesh velocity 2022-02-18 17:49:26 -08:00
Chuyuan Kelly Fu 450c95d0b9 format files 2022-02-18 17:49:21 -08:00
Chuyuan Kelly Fu 236d39d2ec reset deformable velocity 2022-02-18 17:47:54 -08:00
Chuyuan Kelly Fu 07de08a38e request mesh velocity 2022-02-18 17:47:54 -08:00
Chuyuan Kelly Fu fb3b306af1 load deformable deterministic setting 2022-02-18 17:47:54 -08:00
erwincoumans 9eac022ffa Merge pull request #4169 from bulletphysics/revert-3979-deformableForces
Revert "Add deformable contact forces info"
2022-02-18 17:36:42 -08:00
erwincoumans 22ef34bb69 Revert "Add deformable contact forces info" 2022-02-18 16:14:53 -08:00
Jingyu Chen ca334946a7 fixed the uninitialized values in FreeFall example 2022-02-18 11:18:04 -08:00
jaecheol.sim 7d7fb1e291 urdfEditor - handle joint limits 2022-02-15 15:30:10 +09:00
Jingyu Chen c159305910 fixed the incorrect solverBody pairing issue of the reduced deformable solver. still have the problem that the reduced deformable sometimes doesn't show up 2022-02-13 21:30:11 -08:00
erwincoumans 2cad239c00 Merge pull request #4160 from erwincoumans/master
update pybullet quickstart guide pdf
2022-02-12 16:25:17 -08:00
Erwin Coumans 256fe2ec70 update pybullet quickstart guide pdf 2022-02-12 16:24:46 -08:00
erwincoumans f0f2a952e1 Merge pull request #4151 from erwincoumans/master
add btMultiBody spherical joint limit
2022-01-31 09:37:00 -08:00
jingyuc f8abdd1fe1 clean up: remove unused example, rename the benchmark example 2022-01-30 22:33:24 -08:00
jingyuc 11b79c3838 clean up: rename folder 2022-01-30 21:30:43 -08:00
jingyuc cf7b142063 clean up: add missing CMakeLists 2022-01-30 21:13:24 -08:00
jingyuc 6a78b4bb07 clean up: rename the *ReducedSoftBody* as *ReducedDeformableBody* for clarity 2022-01-30 21:12:05 -08:00
jingyuc bfef75f871 clean up: reverted some unnecessary changes 2022-01-30 17:41:44 -08:00
jingyuc fbeafa0249 Merge branch 'bulletphysics:master' into master 2022-01-30 14:32:06 -08:00
Erwin Coumans 6906198132 Implement joint limit for btMultiBody spherical joint. In URDF, add
<limit effort="1000.0" lower="0.2" upper=".8" twist=".3"/>
effort is max force/impulse
lower = swing range in X
upper = swing range in Y
twist = twist range around Z
(ranges all in radians)
lower, upper, twist and effort need to be > 0, otherwise no limit is created

See examples/pybullet/examples/spherical_joint_limit.py and
    examples/pybullet/gym/pybullet_data/spherical_joint_limit.urdf
2022-01-30 13:04:24 -08:00
Erwin Coumans 5cd8160086 add spherical_joint_limit.py example 2022-01-30 13:00:52 -08:00
Erwin Coumans b602045665 Implement joint limit for btMultiBody spherical joint. In URDF, add
<limit effort="1000.0" lower="0.2" upper=".8" twist=".3"/>
effort is max force/impulse
lower = swing range in X
upper = swing range in Y
twist = twist range around Z
(ranges all in radians)
lower, upper, twist and effort need to be > 0, otherwise no limit is created

See examples/pybullet/examples/spherical_joint_limit.py and
    examples/pybullet/gym/pybullet_data/spherical_joint_limit.urdf
2022-01-30 13:00:11 -08:00
Erwin Coumans 6cc267f84b fix cmake build
see also https://github.com/MicrosoftDocs/cpp-docs/issues/2378
2022-01-29 16:52:03 -08:00
Peter 2a5a1d4935 Add explicit int cast to avoid conversion warning
On some platforms size_t is declared as unsigned long, and this triggers spurious
Wconversion warnings in expressions using sizeof operator.
To supress this warning, add explicit cast of sizeof output to int. This is safe, since 
sizeof(btChunk) is very small compared to max value of int.
2022-01-25 21:46:28 +03:00
Jelle 06a212e667 Remove unused variable 2022-01-13 18:15:29 +01:00
erwincoumans 478da7469a Merge pull request #4116 from jamesbraza/fixing-imaging-examples
Fixing pybullet example on getting a point cloud
2022-01-11 22:15:24 -08:00
erwincoumans dc72081eb1 Merge pull request #4119 from erwincoumans/master
move the mutex lock to include the 'getNewManifold', dealing with Iss…
2022-01-03 16:13:27 -08:00
Erwin Coumans 5d1c8a2ece move the mutex lock to include the 'getNewManifold', dealing with Issue #4117 2022-01-02 21:05:07 -08:00
James Braza 51a5aa8026 Added forgotten capitalization of code tag 2022-01-02 15:30:23 -05:00
James Braza 0e114e9f9b Added comment about why H x W differ from expected 2022-01-02 15:20:30 -05:00
James Braza 72dc1bb4dd Added numpy reshapings to raw image 2022-01-02 15:11:17 -05:00
James Braza 878e3d57f6 Added comment giving confidence in the changing w x h orderings 2022-01-02 15:08:16 -05:00
erwincoumans f84b523c05 Merge pull request #4100 from erwincoumans/master
fix texture coordinates for aliengo trunk
2021-12-10 17:27:43 -08:00
Erwin Coumans 0ab3b9d9f7 fix texture coordinates for aliengo trunk 2021-12-10 17:25:39 -08:00
erwincoumans 0fac8209c9 Merge pull request #4099 from erwincoumans/master
replace mpl licensed meshes by hand-made textured ones
2021-12-10 16:16:08 -08:00
Erwin Coumans 610fb2c117 prettify aliengo trunk a bit 2021-12-10 16:12:41 -08:00
Erwin Coumans 0aecbb9cdc delete MPL licensed meshes, replace by manual textured meshes. 2021-12-10 15:51:25 -08:00
Jingyu Chen c9a2d733ad modified benchmark example 2021-12-09 20:39:40 -05:00
Jingyu Chen f19133e410 allow multiple reduced deformable object in one sim 2021-12-09 16:55:10 -05:00
Jingyu Chen 1feb81463a change reduced deformable example set up in pybullet 2021-12-09 14:21:03 -05:00
erwincoumans 578523eab4 Merge branch 'master' into master 2021-12-06 12:38:25 -08:00
jingyuc 4634077733 debug setup again 2021-12-02 11:51:00 -05:00
jyc-n a018d63fb3 debug pybullet setup 2021-12-01 22:39:23 -05:00
erwincoumans 6a59241074 Merge pull request #4060 from erwincoumans/master
bump up PyBullet to version 3.21
2021-12-01 10:29:58 -08:00
Erwin Coumans 9c380f18f6 bump up PyBullet to version 3.21 2021-12-01 10:28:20 -08:00
jingyuc 96605f7a8c Fixed a bug in btReducedSoftBody::transform(): the mesh was rotated/translated incorrectly using btSoftBody::transform(). Now works for mesh whose CoM is not at (0,0,0) 2021-11-29 15:58:33 -05:00
erwincoumans fa50f195e6 Merge pull request #4048 from priority-kew/aliengo_reduced_meshes
Import Aliengo URDF
2021-11-24 13:59:22 -08:00
Chase Kew adf75169d8 Import Aliengo URDF
from github.com/unitreerobotics/unitree_pybullet. Reduced all meshes by
50% due to concerns about the size of pybullet_data. Also renamed some
links and joints in the URDF to match conventions and added an example
script.
2021-11-24 10:30:13 -08:00
jingyuc 6fb7bd9a94 add visual mesh support for the reduced deformable model 2021-11-24 11:41:11 -05:00
jingyuc f729fbda95 add missing flag RESET_USE_REDUCED_DEFORMABLE_WORLD in pybullet.c 2021-11-23 18:23:41 -05:00
jingyuc 9fae47667b add a flag to switch between the reduced deformable and full deformable 2021-11-23 17:40:04 -05:00
jingyuc 8efd0296ab test full deform 2021-11-23 17:07:41 -05:00
jingyuc bc8adf7bd1 clean up urdf mesh input names 2021-11-22 13:26:46 -05:00
jingyuc 4c9d6275aa Now supports mesh with initial CoM not at the origin 2021-11-22 00:31:24 -05:00
jingyuc 0b641b51d7 add benchmark comparison example. change ReduceddMotorGrasp example to the real world dimensions 2021-11-21 02:11:55 -05:00
erwincoumans 946d500c8e Merge pull request #3848 from nekomatata/heightmap-early-exit
Fix early exit in heightfield raycast
2021-11-18 19:45:26 -08:00
jingyuc 0279a5a500 add reduced deformable torus. minor clean up in btReducedSoftBodyHelpers 2021-11-17 01:09:18 -05:00
jingyuc 8c118515b8 Now only reduced deformable files in bullet3/data/ folder 2021-11-17 00:50:45 -05:00
jingyuc 007eea15cb no longer need to use start_modes, because all the rigid modes are not saved in .bin files in the preprocessor 2021-11-16 21:05:48 -05:00
jingyuc 2d08d4047a no need to save the reduced mass matrix because it's always diagonal 2021-11-16 17:41:35 -05:00
jingyuc 18f81dcaea re-compute all the modes using the new python preprocessor. clean up initialization 2021-11-16 17:23:19 -05:00
jingyuc 676221fb3e clean up the binary files loader, so that it can work with files without the non-rigid modes 2021-11-14 02:17:22 -05:00
erwincoumans 10f72b9b5d Merge pull request #3921 from ayzaan/patch-1
Create URDF for white xarm
2021-11-13 22:41:05 -08:00
erwincoumans ccafe333d1 Merge pull request #3979 from johbrust/deformableForces
Add deformable contact forces info
2021-11-13 22:32:43 -08:00
erwincoumans 691ad46baa Merge pull request #4024 from BlGene/egl_device_selection
EGL device selection by environment variable
2021-11-13 22:20:13 -08:00
erwincoumans a9a103fc8c Merge pull request #4010 from erwincoumans/master
add missing bunny.obj to pybullet_data
2021-11-12 05:38:24 +00:00
erwincoumans 40aeecb72e Merge pull request #4020 from QiaodongCui/master
Fix btCollisionDispatcherMt compound compound bugs
2021-11-12 05:29:27 +00:00
erwincoumans 88c04a8eae Merge pull request #4016 from stephentu/patch-1
Fix bug in server handling of inverse dynamics
2021-11-12 05:28:32 +00:00
Erwin Coumans a3005879bb use mainthread on __APPLE__
remove duplicate SimpleCamera.cpp from cmakelists.txt
2021-11-11 21:18:57 -08:00
Erwin Coumans e3b98615f1 add Eigen-3.4 2021-11-11 21:06:39 -08:00
jingyuc c2072b5538 add mass scaling for reduced deformable model 2021-11-11 12:27:36 -05:00
Erwin Coumans a84071ee67 Merge branch 'master' of github.com:erwincoumans/bullet3 into master 2021-11-05 21:08:36 -07:00
Erwin Coumans 6088293149 update to Eigen 3.4.0, to fix Issue 4013 2021-11-05 21:08:24 -07:00
jingyuc 7fafbd7718 reduced deformable is now working with pybullet 2021-11-05 18:02:15 -04:00
jingyuc e386b55543 add reduced deformable urdf parser 2021-11-04 16:12:08 -04:00
erwincoumans 98254b51a9 Merge pull request #4021 from fuchuyuan/userData
add user data to deformable urdf
2021-11-03 19:23:09 +00:00
jingyuc 3ec4d68323 add grasping comparison 2021-11-02 17:54:56 -04:00
jingyuc 0a6f278663 reduced deformable cube free fall example is now working in pybullet 2021-11-02 01:12:09 -04:00
jingyuc d7fb9e8a92 c++ example for reduced deformable object 2021-11-01 16:10:27 -04:00
jingyuc df661fde15 allow set gravity in deformable world. add transformTo for the reduced deformable object 2021-11-01 15:49:00 -04:00
Chuyuan Fu a2aada62ae add user data to deformable urdf 2021-10-29 17:46:03 -07:00
erwincoumans a62fb187a5 Create cmake.yml 2021-10-29 12:57:37 -07:00
erwincoumans 1dd3d8408e Delete .travis.yml 2021-10-29 12:57:07 -07:00
QiaodongCui a672536f43 Update btCollisionDispatcherMt.cpp 2021-10-29 13:26:02 -04:00
QiaodongCui e9d40d0726 Update btCollisionDispatcherMt.h 2021-10-29 13:25:03 -04:00
Stephen Tu 63446558cd Fix bug in server handling of inverse dynamics
The current implementation of processInverseDynamicsCommand has two issues:

1. For floating bases, the handler is not properly copying over the position and orientation from the client inputs.
2. For floating bases, the handler is ignoring the position of the joint angles from the client inputs. 

This CL fixes both issues. While the fix for (2) is straightforward, I am not sure whether or not the right pybullet API convention is to have (x, y, z, orn) passed in, or instead (orn, x, y, z). The former makes more sense to me and is what I implemented.
2021-10-28 12:52:15 -07:00
jingyuc 2255e26e14 add a function to compute the total angular momentum 2021-10-28 14:12:19 -04:00
erwincoumans ac3c283842 Merge pull request #4012 from RanTig/master
Adds a request body info command for the physics direct command.
2021-10-28 15:49:18 +00:00
jingyuc 3540400a9d Merge branch 'bulletphysics:master' into master 2021-10-28 01:39:07 -04:00
jingyuc 88863f92eb made a copy of reduced deformable files, and add a urdf for the reduced cube 2021-10-28 01:10:41 -04:00
Tigran Gasparian 740d2b9783 Adds a request body info command for the physics direct command. This is
useful to incrementally sync the body state in the physics clients of
plugins (e.g. in response to a Body Added notification).
2021-10-26 18:31:33 +02:00
jingyuc e2f6430d19 fixed a assertion error in btReducedDeformableSolver. clean up outputs 2021-10-25 17:28:19 -04:00
Kentaro Wada fd98afe764 Add new members at the last of a struct 2021-10-25 21:07:06 +01:00
Kentaro Wada b22a2432b5 Fix pybullet.addUserDebugPoints help 2021-10-25 21:04:42 +01:00
Erwin Coumans 1a670681f7 Merge branch 'master' of github.com:erwincoumans/bullet3 2021-10-25 09:44:29 -07:00
Erwin Coumans e1ac14b23d add missing bunny.obj 2021-10-25 09:44:10 -07:00
erwincoumans e4a450a53d Merge pull request #3980 from akien-mga/patch-1
SoftBody: Fix local variable shadowing warning
2021-10-25 09:10:29 -07:00
erwincoumans 33cceed500 Merge pull request #3982 from RedTachyon/patch-1
Explicitly state the datatypes in creating action/obs spaces
2021-10-25 09:09:47 -07:00
erwincoumans d4598bf1cf Merge pull request #3981 from akien-mga/patch-2
btSerializer: Remove unused but set variable
2021-10-25 09:08:53 -07:00
erwincoumans f79463b699 Merge pull request #3991 from akien-mga/uwp-disable-processor-information
LinearMath: Fix TaskScheduler build on UWP by disabling `getProcessorInformation`
2021-10-25 09:08:18 -07:00
erwincoumans aef54fed64 Merge pull request #3994 from VincentYu68/master
Add a visual-locomotion configuration: Laikago with two cameras walking over stepstone
2021-10-25 09:06:08 -07:00
Max Argus 3c4cb80157 EGL device selection by env param. 2021-10-22 09:26:59 +02:00
jingyuc b5325a265f much better convergence after separating impulse in different directions 2021-10-22 01:44:02 -04:00
jingyuc 3a3d8c7a3a re-write the fixed constraint. the drift is smaller, but still need some improvements 2021-10-21 23:14:12 -04:00
Johannes Brust 61d5bdb783 Fix bug due to missing swap 2021-10-21 17:38:13 +02:00
Kentaro Wada 00dcce85f5 Add pybullet.addUserDebugPoints 2021-10-16 17:38:05 +01:00
jingyuc d945e48af2 clean up the damping codes 2021-10-13 23:39:36 -04:00
Wenhao Yu af0bfc62ec Merge branch 'bulletphysics:master' into master 2021-10-13 15:53:04 -07:00
Wenhao Yu fd96062972 Add config for visual locomotion env with two cameras and random stepstone. 2021-10-13 15:48:47 -07:00
erwincoumans 48dc1c45da Merge pull request #3992 from erwincoumans/master
remove tensorflow requirement from pybullet.minitaur.envs_v2, tweak gear (mimic) constraint example
2021-10-11 13:55:32 -07:00
Erwin Coumans 90e331a239 bump PyBullet version to 3.20 2021-10-11 13:52:13 -07:00
Erwin Coumans a8f088d4d3 Merge branch 'master' of github.com:erwincoumans/bullet3 into master 2021-10-11 12:56:29 -07:00
Erwin Coumans 00567a5261 remote tensorflow requirement from envs_v2 2021-10-11 12:56:15 -07:00
erwincoumans aa49e19385 Update README.md
remote tensorflow requirement
2021-10-11 12:14:45 -07:00
jingyuc bd6e49bcc1 disable all debug printout 2021-10-11 11:24:17 -04:00
jingyuc 07cfa9a433 add cfm and penetration correction to the velocity error for the contact constraint. clean up btReducedSoftBody class. momenumtum conservation WIP 2021-10-07 15:10:57 -04:00
Rémi Verschelde 41f03e78a5 LinearMath: Fix TaskScheduler build on UWP by disabling getProcessorInformation
Disables the feature that requires loading kernel32 dynamically.
2021-10-06 07:47:44 +02:00
Erwin Coumans 6390db4bd6 Merge remote-tracking branch 'bp/master' 2021-10-04 15:37:12 -07:00
jingyuc 1949710131 clean up momentum conservation test example and the springboard example 2021-10-04 17:36:17 -04:00
jingyuc c4da596778 now support scaling of reduced deformable object. the order of applying impulse is changeable now 2021-10-04 11:56:29 -04:00
Erwin Coumans 931f93d266 Merge remote-tracking branch 'bp/master' into master 2021-10-03 15:19:58 -07:00
Erwin Coumans 9d211393e4 Merge branch 'master' of github.com:erwincoumans/bullet3 into master 2021-10-03 15:19:26 -07:00
Erwin Coumans 34d77242e5 tweak gear (mimic) constraint example, enable erp (to avoid positional relative drift) and position camera at the gears. 2021-10-03 15:18:40 -07:00
Ariel Kwiatkowski 496e614f77 Explicitly state the datatypes in creating action/obs spaces
This should get rid of the annoying warnings that pop up whenever an environment is created. Numpy's default datatype is float64, gym's is float32, the env is actually float32, but the initialization doesn't make it explicit so it causes redundant warnings.
```
/path/lib/python3.9/site-packages/gym/logger.py:34: UserWarning: WARN: Box bound precision lowered by casting to float32 warnings.warn(colorize("%s: %s" % ("WARN", msg % args), "yellow"))
```
2021-09-29 23:10:18 +02:00
Rémi Verschelde 364796d1e5 btSerializer: Remove unused but set variable
Fixes a Clang/Emscripten warning.
2021-09-29 16:32:14 +02:00
Rémi Verschelde ba65e909bc SoftBody: Fix local variable shadowing warning 2021-09-29 15:40:59 +02:00
Johannes Brust 5795bd676f Add deformable contact forces info
- add contact information for collisions between rigid and soft bodies
- collisions between different soft bodies are not supported
- uses impulse acting on tetrahedral nodes for calculation of forces
- contact points are approximated by node positions
- multiple forces acting on identical nodes are accumulated
2021-09-28 22:39:31 +02:00
jingyuc 1bee1ba4c4 support applying impulse in alternating order. change several example setups. 2021-09-28 00:55:12 -04:00
jingyuc 354c5a6e62 Merge branch 'bulletphysics:master' into master 2021-09-26 17:49:41 -04:00
jingyuc 107c5526eb reduced motor grasp example is working 2021-09-24 13:16:33 -04:00
jingyuc 5e0a805d73 separate two tangential direction for the multibody vs reduced deformable contact 2021-09-21 17:35:35 -04:00
jingyuc 9de3d25172 testing multibody vs reduced deformable friction. save files 2021-09-21 16:22:12 -04:00
erwincoumans ce26271923 Merge pull request #3930 from ffontaine/master
Extras/VHACD/inc/vhacdMutex.h: fix musl build
2021-09-20 14:38:30 -07:00
erwincoumans cc84887919 Merge pull request #3945 from craftablescience/master
Fix: remove cmake policy 0115 errors
2021-09-20 14:37:29 -07:00
erwincoumans 289a1b3f6e Merge pull request #3931 from notrabs/bugfix/softbody-compound-crash
Fix crash when btSoftBody collides with btCompoundShape
2021-09-20 14:37:01 -07:00
erwincoumans 9c37ca5185 Merge pull request #3950 from bttner/fix_external_force_command
Fix: reference frame issue of external force command processor (Physics Server)
2021-09-20 14:34:52 -07:00
erwincoumans c57d6f0163 Merge pull request #3964 from erwincoumans/master
pybullet bump up to 3.19
2021-09-20 13:29:39 -07:00
Erwin Coumans 143f87abcf pybullet bump up to 3.19 2021-09-20 13:16:13 -07:00
erwincoumans 47c3f5e994 Merge pull request #3963 from erwincoumans/master
revert linkNames in createMultiBody, we cannot pass pointers pointing… …
2021-09-20 13:07:30 -07:00
Erwin Coumans 87605ca4c8 revert linkNames in createMultiBody, we cannot pass pointers pointing to local memory (storing the string) around into shared memory or over the network. 2021-09-20 12:22:30 -07:00
Brendan L 9675e3d39b Merge branch 'bulletphysics:master' into master 2021-09-18 21:37:53 -04:00
jingyuc 064fdc40bd Merge branch 'bulletphysics:master' into master 2021-09-16 16:09:55 -04:00
erwincoumans 101c98cfb8 Merge pull request #3954 from aaronfranke/url
Update Bullet URL in copyright statements
2021-09-15 14:56:18 -07:00
jingyuc bfd3d1cd8d normal impulse for multibody vs reduced deformable contact is working 2021-09-15 16:45:20 -04:00
jingyuc 19375d6569 grasping cube set up 2021-09-13 23:05:21 -04:00
jingyuc 593f387a06 demo setup 2021-09-13 22:48:08 -04:00
Aaron Franke ad74cfe6c8 Update Bullet URL in copyright statements 2021-09-13 09:06:14 -05:00
jingyuc 1c8afcf54f clean up reduced body creation 2021-09-12 23:21:20 -04:00
jingyuc b4efd91476 add support for damping. the fixed constraint is working again with the deltaImpulse form 2021-09-12 21:53:23 -04:00
jingyuc 9d1aafc51c better support of initial rotation. 2021-09-10 13:34:34 -04:00
jingyuc e62c42f54c rotate the modes when the mesh has a initial transformation. new grasping example with motor WIP 2021-09-09 18:35:07 -04:00
jingyuc ce765a8a88 friction is now applied in a way similar to what the rigid body solver does 2021-09-08 19:00:55 -04:00
jingyuc eef3b73cd2 fixed a sign issue in the friction of the reduced deformable vs moving rigid body contact 2021-09-07 18:38:13 -04:00
jingyuc 3a70641c65 Merge branch 'bulletphysics:master' into master 2021-09-07 15:25:11 -04:00
jingyuc 3a84b05058 Added a new friction slope example (ground is rotating). Fixed a problem in the reduced deformable's friction (now clamp the maximum tangential impulse based on the tangential velocity impulse at the current iteration, not the total tangential velocity at the beginning) 2021-09-06 17:56:32 -04:00
Brendan Lewis b1927a4f92 Merge branch 'bulletphysics:master' into master 2021-09-05 19:31:37 -04:00
Erwin Coumans 4e881118ef bump up pybullet/bullet version to 3.18 2021-09-03 17:06:01 -07:00
jingyuc df07b42318 contact with moving rigid body is working. There is a sign error when calculating the deltaVelocity of the solverBody 2021-09-03 17:32:26 -04:00
jingyuc f2e114fc81 fixed the wrong dimension used to calculate the inertia tensor in btReducedSoftBodyHelpers 2021-09-03 14:47:31 -04:00
jingyuc e70fc6453b add support for initial rotation 2021-09-02 21:32:16 -04:00
erwincoumans b638300fe4 Merge pull request #3951 from erwincoumans/master
implement resetMeshData for deformable bodies, fix tiny_renderer standalone example
2021-09-02 18:03:23 -07:00
Erwin Coumans b6df08b553 implement resetMeshData for deformable bodies, this allows better reset for reinforcement learning algorithms. 2021-09-02 17:27:05 -07:00
jingyuc 93e00054e3 set up reduced grasping example 2021-09-02 13:35:14 -04:00
Felix Büttner 4b6ec20b30 External force and torque frame fix 2021-09-02 17:40:18 +02:00
jingyuc 104410c63d fixed an incorrect impulse factor in btSoftBodyInternals. The total impulse factor is now calculated in the constraint solver class. 2021-09-02 00:20:19 -04:00
erwin coumans 3577ef8108 Merge branch 'master' of github.com:erwincoumans/bullet3 into master 2021-09-01 15:00:10 -07:00
erwin coumans 7de63bdbc5 fix tiny_renderer standalone example 2021-09-01 15:00:01 -07:00
erwincoumans 3fee64fb95 Merge pull request #3949 from fuchuyuan/fixasan
Fixasan
2021-09-01 13:58:57 -07:00
jingyuc c2601663e4 debugging moving rigid vs reduced deformable contact 2021-09-01 16:36:52 -04:00
Chuyuan Fu 9b3c8c8dbb fix format 2021-09-01 13:18:58 -07:00
Chuyuan Fu b795243cc5 fix asan 2021-09-01 13:18:58 -07:00
jingyuc 634c8b7b38 Merge branch 'bulletphysics:master' into master 2021-08-31 20:16:15 -04:00
jingyuc 42fac2e364 fixed a minor issue: disable deactivation for the reduced collision example 2021-08-31 01:33:38 -04:00
erwincoumans 31b8841efc Merge pull request #3948 from erwincoumans/master
add low-resolution Laikago (for faster rendering in CPU renderer) and cleanup sdf files
2021-08-30 13:01:15 -07:00
Erwin Coumans 68424feb2d don't use empty frame for pose in sdf files
use hint for clang that if (0) is intentional
2021-08-30 19:40:20 +00:00
jingyuc b1803afbb9 collision with moving rigid body seems to be working. checking why there is side motion 2021-08-30 13:19:33 -04:00
erwincoumans 5ec0820c0e Merge pull request #3920 from araffin/feat/sb3
Migrate to Stable-Baselines3
2021-08-29 15:01:27 -07:00
jingyuc 3e76b11d46 add check for momentum conservation 2021-08-26 13:41:26 -04:00
jingyuc f26e3d133d set up the reduced vs rigid collision example 2021-08-26 12:47:09 -04:00
jingyuc 6a87310d3c friction is working now 2021-08-25 16:38:57 -04:00
jingyuc 52abe35e41 friction seems to be working. However, when the block is only sliding on the surface, there is no friction because no delta normal impulse...need to think 2021-08-25 00:38:29 -04:00
Brendan Lewis 090f8369f8 Fix: remove cmake policy 0115 errors 2021-08-24 21:39:12 -04:00
jingyuc 166dc2865d frictionless contact also works with reduced modes enabled 2021-08-24 16:30:33 -04:00
jingyuc c735830f0a more stable rigid contact 2021-08-24 15:08:57 -04:00
jingyuc 840db372b9 delta impulse version is working 2021-08-24 00:40:27 -04:00
erwincoumans 41158a4be8 Merge pull request #3937 from fuchuyuan/deformableContact
implement request deformable contact info
2021-08-23 12:25:55 -07:00
jingyuc d9152b9cf5 WIP warm starting 2021-08-23 01:17:58 -04:00
jingyuc 368385d5ad need to project the impulse on the normal to prevent sliding 2021-08-21 15:54:34 -04:00
Chuyuan Fu 107295db5f fix typo 2021-08-19 09:32:49 -07:00
Chuyuan Fu e16c9bb1cc implement request deformable contact info 2021-08-18 18:48:35 -07:00
jingyuc 70ec2f9d46 use the correct relative position to apply the impulse 2021-08-18 16:24:46 -04:00
jingyuc 0444fea9eb collision impulse starts to look reasonable, but the motion is still strange. 2021-08-18 14:31:59 -04:00
erwin coumans 7ac95be8cd add training and run/eval scripts to train envs_v2 Laikago pmtg 2021-08-17 08:56:30 -07:00
jingyuc eacdbe67a0 reduced velocity should be updated from i-th iteration instead of from the predicted state, because thexternal force has no memory of the previous iteration 2021-08-16 14:36:35 -04:00
jingyuc 9a17391a9a modified the code. explicit time stepping should only be implicit in velocity 2021-08-13 16:34:34 -04:00
jyc-n d6d8c3ceac reworking static constraint WIP 2021-08-12 22:36:39 -04:00
jingyuc 35f7a1a569 add new reduced deformable contact constraint class. able to call the reduced soft body's apply impulse function 2021-08-12 12:31:44 -04:00
jingyuc e4e8f1ad93 add tree updates in predict motion. 2021-08-11 15:58:40 -04:00
jingyuc 6355b06a8b use deformable contact detection for the reduced deformable model 2021-08-10 16:31:53 -04:00
jyc-n 3425c01acc created new free fall example. WIP 2021-08-09 16:26:17 -04:00
jyc-n 042a1f75c9 clean up 2021-08-09 14:54:58 -04:00
jingyuc a56ce358f3 reduced dofs and interpolated transform needs to be updated from the time_n states in the iteration 2021-08-09 12:43:59 -04:00
jingyuc 0acf18f246 need to update the rigid frame every time when the impulse is applied. reduced external force needs to be zeroed in every iteration. 2021-08-09 11:23:52 -04:00
notrabs b2fd9a492d Fix crash when btSoftBody collides with btBvhTriangleMeshShape inside a btCompoundShape
- The triBody->getCollisionShape() returns the btCompoundShape again, which does not implement the btConcaveShape interface required
- The crash happens when processAllTriangles is called below
2021-08-08 01:11:04 +02:00
Fabrice Fontaine dd37b97e79 Extras/VHACD/inc/vhacdMutex.h: fix musl build
Fix the following build failure on musl (which does not provide
PTHREAD_MUTEX_RECURSIVE_NP):

In file included from /tmp/instance-5/output-1/build/bullet-3.09/src/LinearMath/btScalar.h:289,
                 from /tmp/instance-5/output-1/build/bullet-3.09/src/LinearMath/btVector3.h:19,
                 from /tmp/instance-5/output-1/build/bullet-3.09/src/LinearMath/btConvexHullComputer.h:18,
                 from /tmp/instance-5/output-1/build/bullet-3.09/Extras/VHACD/src/VHACD.cpp:28:
/tmp/instance-5/output-1/build/bullet-3.09/Extras/BulletRobotics/../../Extras/VHACD/inc/vhacdMutex.h: In constructor 'VHACD::Mutex::Mutex()':
/tmp/instance-5/output-1/build/bullet-3.09/Extras/BulletRobotics/../../Extras/VHACD/inc/vhacdMutex.h:97:54: error: 'PTHREAD_MUTEX_RECURSIVE_NP' was not declared in this scope; did you mean 'PTHREAD_MUTEX_RECURSIVE'?
   97 |   VHACD_VERIFY(pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_RECURSIVE_NP) == 0);
      |                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/79cd2024b3dfc8d3e896cdacf67fb891df81ca6e

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-08-07 17:17:41 +02:00
jingyuc 4f66d8bb87 update reduced variables and full space position every time applied the force 2021-08-06 17:10:58 -04:00
jyc-n 252aa91e9a reduced force WIP 2021-08-06 02:12:39 -04:00
jingyuc 32398d4d7f multiple fixed nodes seem okay 2021-08-05 00:00:12 -04:00
jingyuc fdfb08b72f single fixed constraint for the rigid frame is working 2021-08-04 22:44:53 -04:00
erwin coumans e399944982 add simplified Laikago model for faster CPU rendering (getCameraImage in direct mode using TinyRenderer) 2021-08-03 13:26:39 -07:00
jingyuc 35ec8b39a7 re-work the external force application. clean up position and velocity update 2021-08-02 11:31:09 -04:00
jingyuc a37d23fa24 re-work the simulation time loop in order to support fixed constraints. still wip 2021-07-30 02:08:27 -04:00
Ayzaan Wahid 83fbd60d5b Create URDF for white xarm 2021-07-29 17:08:50 -04:00
jingyuc 5d17353269 add rigidTransformWorld to make the rendering works after applying initial translation. Center of mass looks right. Tested with rotating free fall 2021-07-29 11:45:44 -04:00
Antonin Raffin 13f3778c22 Fix SB3 comment 2021-07-29 15:24:46 +02:00
Antonin Raffin 2f8b44c702 Migrate to Stable-Baselines3 2021-07-29 15:21:49 +02:00
jingyuc c6c7533167 fixed constraints wip 2021-07-28 16:36:15 -04:00
jingyuc 549b57df77 clean up 2021-07-28 14:36:42 -04:00
jingyuc 6c2023e330 add mode visualizer example. 2021-07-28 12:34:01 -04:00
jyc-n bfa74dbacd initial translation WIP 2021-07-28 00:03:51 -04:00
jingyuc 67b58428e8 clean up. now the inertia tensor is calculated based on geometry, and it is updated everytime step 2021-07-27 15:59:25 -04:00
jingyuc 24eb021ed6 clean up. impulse is now applied through a member function of btReducedSoftBody 2021-07-27 01:11:11 -04:00
jyc-n 0983d36eff rotation is working 2021-07-26 21:48:57 -04:00
jyc-n 7678545e76 clean up initialzation 2021-07-26 15:30:35 -04:00
jingyuc 9baee29300 simple rigid translation is working. 2021-07-26 11:28:37 -04:00
jingyuc 6f3dd32f37 add new btReducedSoftBody and btReduceDeformableSolver class 2021-07-23 16:20:09 -04:00
jyc-n 87e20f450b save files. misc 2021-07-22 21:55:34 -04:00
jyc-n c325da8b34 add new ReducedSoftBody class. move read files functions to btReducedSoftBodyHelpers 2021-07-22 11:43:26 -04:00
jyc-n 45c3db58ff remove vscode files 2021-07-22 11:39:56 -04:00
jingyuc 49d7bb0301 minor cleanup 2021-07-19 17:34:38 -04:00
jingyuc 237333d030 make the impulse scaled with nodal mass. all binary mode files contains all modes info. 2021-07-19 15:26:00 -04:00
jingyuc f6dbbd4e66 avoid divided by 0 time 2021-07-19 12:32:16 -04:00
jingyuc 4119d8812e add initial impulse 2021-07-18 00:52:13 -04:00
jingyuc c24f2a72ef add internal force 2021-07-16 15:01:44 -04:00
jingyuc 4b6eaeed4c kinematic tested. specified delta_v as a cosine function. 2021-07-15 17:30:08 -04:00
jingyuc d390360f9e clean up kinematic test setup 2021-07-14 20:01:50 -04:00
jingyuc f1e86bf257 test modes kinematics 2021-07-14 16:00:28 -04:00
jingyuc fa00ee2bbd Start the reduced deformable example. Read in mesh and modes files. 2021-07-13 00:45:11 -04:00
jingyuc a3dc901696 fork origin commit 2021-07-13 00:31:25 -04:00
PouleyKetchoupp 2045f04f3c Fix early exit in heightfield raycast
When deciding the ray is too short to use the accelerated structure and
a simple raycast is performed, the method now returns to avoid
processing it a second time using the accelerated structure.
2021-05-13 18:08:27 -07:00
erwincoumans 0e124cb2f1 Merge pull request #3841 from erwincoumans/master
fix some msan (memory sanitizer) issues
2021-05-12 13:54:56 -07:00
erwincoumans a435fb7a41 Merge pull request #3819 from cadop/bullet-client-subprocess-safety
Fix for bullet_client to be used from a class instance during multiprocessing
2021-05-12 13:54:00 -07:00
erwincoumans 3e0a211868 Merge pull request #3840 from fuchuyuan/fixmsan
initialize unused fields for deformable collision detection
2021-05-12 13:53:11 -07:00
Erwin Coumans 92fb2db0a3 fix some msan (memory sanitizer) issues 2021-05-12 20:14:15 +00:00
Chuyuan Fu 88112560a1 initialize unused fields for deformable collision detection 2021-05-11 22:13:42 -07:00
erwincoumans ebe1916b90 Merge pull request #3834 from erwincoumans/master
bump up pybullet version (and c++ version) to 3.17/3.1.7
2021-05-07 11:04:02 -07:00
Erwin Coumans 092b7bc3d9 bump up pybullet version (and c++ version) to 3.17/3.1.7 2021-05-07 11:03:21 -07:00
erwincoumans 39d981bce6 Merge pull request #3832 from erwincoumans/master
expose roll angle, fix python 2.x compatibility
2021-05-07 10:40:43 -07:00
erwin coumans adcf785a4a re-enable eGUIHelperSetRgbBackground 2021-05-07 09:07:40 -07:00
Erwin Coumans cd76d605a9 more fixes for tsan 2021-05-07 15:37:56 +00:00
erwin coumans f14911c998 fix a tsan test failure 2021-05-06 18:34:43 -07:00
erwin coumans e952ac6f63 Add pybullet.configureDebugVisualizer(rgbBackground=[red,green,blue]) (each component a float in the range [0,1])
This is an alternative to passing options="--background_color_red=red --background_color_green=green --background_color_blue=blue" in the connect method.
2021-05-06 18:08:22 -07:00
erwin coumans 8e85dedaa9 PyUnicode_AsUTF8 breaks python 2.x compatibility 2021-05-06 10:19:15 -07:00
erwin coumans e4ff5a45d4 Merge branch 'master' of github.com:erwincoumans/bullet3 into master 2021-04-28 12:13:44 -07:00
erwin coumans b696ed7d7b enable roll angle in pybullet.computeViewMatrixFromYawPitchRoll / b3ComputeViewMatrixFromYawPitchRoll 2021-04-28 12:13:31 -07:00
cadop ace34c4d08 check the process id before disconnecting 2021-04-27 19:33:37 -04:00
erwincoumans 00cd39dc50 Merge pull request #3799 from AndreaCatania/patch-5
Fixes assertion caused by a 0len vector normalization
2021-04-26 07:54:48 -07:00
Andrea Catania c0efe069c5 Fixes assertion caused by a 0len vector normalization
fixes #3194
2021-04-26 11:04:39 +02:00
erwincoumans c74d5e322f Update README.md 2021-04-25 20:14:43 -07:00
erwincoumans 8aab71a86e Merge pull request #3362 from erwincoumans/master
bump up pybullet version
2021-04-25 00:42:08 -07:00
Erwin Coumans d70c3cfdc8 Merge branch 'master' of github.com:erwincoumans/bullet3 2021-04-25 00:41:28 -07:00
Erwin Coumans 18c62ed725 bump up pybullet version 2021-04-25 00:41:13 -07:00
erwincoumans 7f7238f630 Merge pull request #3361 from erwincoumans/master
@erwincoumans PyBullet: try to address activation/deactivation issue with fixed base multibody
2021-04-25 00:38:57 -07:00
erwin coumans a142e8d174 Merge branch 'master' of github.com:erwincoumans/bullet3 into master 2021-04-24 23:53:04 -07:00
erwin coumans 3b2e46e7dd PyBullet: try to address activation/deactivation issue with fixed base multibody with links. 2021-04-24 23:52:53 -07:00
erwincoumans e0b9bc6d7f Merge pull request #3357 from erwincoumans/master
fixed base should set activation state to 'ISLAND_SLEEPING'
2021-04-22 21:29:43 -07:00
Erwin Coumans 1f6baad974 bump up pybullet version to 3.1.5 2021-04-22 20:42:20 -07:00
Erwin Coumans 85a03bf999 Merge remote-tracking branch 'bp/master' 2021-04-22 20:41:59 -07:00
Erwin Coumans fc2992b75a Merge branch 'master' of github.com:erwincoumans/bullet3 2021-04-22 20:41:45 -07:00
erwin coumans 6cb72b5128 python38 in cmake batch file 2021-04-22 20:32:49 -07:00
erwin coumans 46ea89a284 fixed base should set activation state to 'ISLAND_SLEEPING' 2021-04-22 20:20:08 -07:00
erwincoumans 45d3ead747 Merge pull request #3356 from erwincoumans/master
LICENSE should have no txt extension
2021-04-22 16:46:07 -07:00
Erwin Coumans 184b7816d0 LICENSE should have no txt extension 2021-04-22 16:45:29 -07:00
erwincoumans a7832e3a18 Merge pull request #3355 from erwincoumans/master
sync recent changes
2021-04-22 16:37:01 -07:00
erwincoumans afb572166a Merge pull request #3353 from crewmatt/master
Fix memory leak in BulletSoftBody.
2021-04-22 16:29:01 -07:00
Erwin Coumans c915e82d49 Merge branch 'master' of github.com:erwincoumans/bullet3 2021-04-22 16:20:31 -07:00
Matt Bennice 225fa20944 Fix memory leak in BulletSoftBody. 2021-04-22 15:32:38 -07:00
Erwin Coumans 83a5fe2d31 Merge branch 'master' of github.com:erwincoumans/bullet3 2021-04-21 22:14:38 -07:00
erwincoumans 00dcc77885 Merge pull request #3352 from erwincoumans/master
getDynamicsInfo report local inertia diagonal for useMaxima… …
2021-04-20 20:22:38 -07:00
erwin coumans a5761f2b10 pybullet: getDynamicsInfo report local inertia diagonal for useMaximalCoordinates 2021-04-20 20:20:55 -07:00
Erwin Coumans 9f91e6837a remove type annotations
bump up pybullet version
2021-04-20 15:50:12 -07:00
erwincoumans 5c2fa7009b Merge pull request #3300 from al-tu/cmake-option-per-extra
one cmake option per one extra package
2021-04-20 14:57:02 -07:00
erwincoumans 201e7159d6 Merge pull request #3351 from erwincoumans/master
PyBullet: expose useMultiBody argument for loadMJCF command, expose sleeping threshold
2021-04-20 14:42:42 -07:00
erwincoumans f774a102ee Merge pull request #3350 from r-a-sattarov/master
examples/RobotSimulator/CMake: fixed warning (mis-matching arguments)
2021-04-20 13:45:04 -07:00
erwin coumans e58e5bdf95 PyBullet:
expose pybullet.changeDynamics(sleepThreshold), default 0.05, for both useMaximalCoordinates=False and True
When the dot(vel,vel) < sleepThreshold for longer than 2 seconds (this timeout is hard coded) objects that have the ACTIVATION_STATE_ENABLE_SLEEPING enabled with be deactivated
Example:
p.changeDynamics(ob, -1, activationState=p.ACTIVATION_STATE_ENABLE_SLEEPING, sleepThreshold=0.05)
2021-04-20 11:29:27 -07:00
erwin coumans fd154cee8f set default sleeping threshold for useMaximalCoordinate btRigidBody to be similar to btMultiBody (0.05) 2021-04-20 11:14:28 -07:00
erwin coumans 78f5b141f9 fix for 'useMaximalCoordinates' rigid body in PyBullet: activate a rigid body after picking 2021-04-20 10:24:09 -07:00
erwin coumans 84a63cf221 allow to use the useMultiBody argument for loadMJCF command
note that for dynamic and static objects (without joints) it is best to set useMultiBody=False
2021-04-19 20:37:26 -07:00
r-a-sattarov a923ce184e examples/RobotSimulator/CMake: fixed warning (mis-matching arguments) 2021-04-19 23:32:57 +03:00
erwincoumans 48ba5a37ad Merge pull request #3348 from erwincoumans/master
disable texture release, it causes crashes, need to figure out better…
2021-04-15 20:30:13 -07:00
erwin coumans 910c20334f disable texture release, it causes crashes, need to figure out better solution 2021-04-15 20:26:01 -07:00
Alexander Turkin f26e858154 added default ON values for cmake OPTIONS to fix linker errors on ci builds 2021-04-14 13:42:43 +03:00
Alexander Turkin f04768ecc4 Merge branch 'master' into cmake-option-per-extra 2021-04-14 13:41:19 +03:00
erwincoumans 5ae9a15eca Merge pull request #3063 from jiangnanhugo/patch-1
Update README.md
2021-04-10 15:58:41 -07:00
erwincoumans 049d13d190 Merge pull request #3324 from kjander0/bug/update_comment
Updating a misleading comment
2021-04-10 15:57:14 -07:00
erwincoumans 0a8e4f3f6c Update README.md 2021-04-10 15:56:13 -07:00
Erwin Coumans 973d8c128f Merge branch 'master' of github.com:erwincoumans/bullet3 2021-04-07 22:13:18 -07:00
erwincoumans 0478d10099 Merge pull request #3341 from jaraujo98/patch-1
Replace xrange with range
2021-04-07 21:40:11 -07:00
jaraujo98 dcf9c8d6a5 Replace xrange with range
The xrange function was deprecated in Python 3. Removing it for compatibility.
2021-04-06 11:26:39 -07:00
erwincoumans 21d1b8fc71 Merge pull request #3339 from erwincoumans/master
add pybullet_examples, fix pybullet_envs.minitaur.envs_v2, bump up pybullet 3.1.2
2021-04-05 19:53:38 -07:00
Erwin Coumans 5205dafcc2 add __init__.py 2021-04-05 19:51:38 -07:00
Erwin Coumans 29f388a5d8 add selected examples under pybullet_examples 2021-04-05 19:50:46 -07:00
Erwin Coumans 513e3a7db4 add more __init__.py files 2021-04-05 18:07:39 -07:00
Erwin Coumans 674c82db89 bump up pybullet version to 3.1.2
add missing __init__.py files
2021-04-05 17:58:25 -07:00
erwincoumans 7ec009ec50 Merge pull request #3320 from AnyOldName3/patch-1
Use drawTriangle instead of drawing three lines
2021-04-05 16:21:35 -07:00
erwincoumans 2c3318f86d Merge pull request #3331 from erwincoumans/master
add performCollisionDetection (stepSimulation also calls this, but do…
2021-04-05 12:54:39 -07:00
erwin coumans 8b8c1af6a4 Cleaned-up/fixed version of this Pull Request #3239, thanks to Wenlong Lu 2021-04-05 11:40:45 -07:00
erwin coumans 4d34ba7310 add updated Laikago envs_v2, with PMTG and MPC examples.
python -m pybullet_envs.minitaur.envs_v2.locomotion_gym_env_test
python -m pybullet_envs.minitaur.envs_v2.examples.laikago_mpc_wrapper_example
python -m pybullet_envs.minitaur.envs_v2.examples.laikago_static_gait_example
python -m pybullet_envs.minitaur.agents.baseline_controller.locomotion_controller_example
PMTG example, not well tuned:
python -m pybullet_envs.minitaur.envs_v2.examples.laikago_pmtg_example
2021-04-05 11:35:19 -07:00
Erwin Coumans 58d47935a3 Merge remote-tracking branch 'bp/master' 2021-03-26 11:53:37 -07:00
erwin coumans d1c4c41b9a add performCollisionDetection (stepSimulation also calls this, but does more, including solving constraints and integration) 2021-03-26 10:31:13 -07:00
erwincoumans 93be7e6440 Merge pull request #3311 from erwincoumans/master
allow to compile pybullet using btDiscreteDynamicsWorld (no btMultiBody, no btSoftBody, no btDeformableBody)
2021-03-26 10:29:04 -07:00
erwin coumans 0196edd4d2 update single aabb, during resetJointState/resetBasePositionAndOrientation, to allow raycast/collision queries. 2021-03-26 09:11:59 -07:00
Kieren c810edf483 Updating a misleading comment 2021-03-25 21:00:27 +10:00
erwin coumans 546212b158 add mug obj 2021-03-22 16:53:17 -07:00
Chris Djali 6e2577ca59 Use drawTriangle instead of drawing three lines 2021-03-21 15:07:01 +00:00
erwin coumans 6f7d458679 add missing line in previous commit 2021-03-16 18:17:23 -07:00
erwincoumans 395e17c7bf Merge pull request #3238 from yycho0108/add-link-names-to-createmultibody
Add linkNames argument to CreateMultibody
2021-03-15 22:48:33 -07:00
erwin coumans 5cf8ee3360 Allow to compile pybullet using btDiscreteDynamicsWorld (no multibodies and no deformables), this allows to create Jacobian and Mass matrix (and A=J*M-1*J_transpose) with MLCP solvers
Add examples/pybullet/gym/pybullet_utils/readwriteurdf.py, this allows to read a URDF and write the URDF with more reasonable inertia tensors (based on mass and collision volumes)
2021-03-15 22:44:55 -07:00
erwin coumans 0b8f95598d Merge remote-tracking branch 'bp/master' into master 2021-03-11 17:12:01 -08:00
erwincoumans 87e668f6b2 Merge pull request #3293 from glebm/heightfield-type
heightfield: Fix PHY_FLOAT data handling in double-precision mode
2021-03-11 17:10:38 -08:00
erwincoumans 2bd7fa7064 Merge pull request #3287 from glebm/heightfield-accel
heightfield: improve `processAllTriangles` performance
2021-03-11 17:10:20 -08:00
Erwin Coumans 5864901a2e bump up pybullet to 3.1.0, wheels are using numpy 1.19.5 (to be colab compatible) 2021-03-08 09:32:43 -08:00
erwincoumans 0c7ea68709 Merge pull request #3246 from Danfoa/master
Fix Stable-PD Control bug on First Order Taylor approximation of next `q` state
2021-03-07 08:19:37 -08:00
erwincoumans 0bf5f2cd84 Merge pull request #3301 from crewmatt/master
Update User Data imported from URDF to default to empty string when null
2021-03-07 08:14:30 -08:00
mbennice 296cd85f60 Fix tab/spaces 2021-03-05 09:54:53 -08:00
mbennice 237843b93a Default user data text to empty string when null. 2021-03-05 09:52:10 -08:00
Gleb Mazovetskiy 89c76981fc heightfield: Better support for float/double data
Previously, the heightfield constructor always assumed `PHY_FLOAT` meant
`btScalar`, contrary to documentation and other usages of `PHY_FLOAT`.

Adds new constructors that distinguish between `float` and `double`.
The legacy constructor is still there for backwards compatibility.

This allows the client to use `float` or `double` regardless of
`BT_USE_DOUBLE_PRECISION`.
2021-03-03 14:25:55 +00:00
Gleb Mazovetskiy 40a9584ccb heightfield: Add a test for processAllTriangles up-axis filtering 2021-03-03 13:58:09 +00:00
Gleb Mazovetskiy 8f5a00dd1e heightfield: Add range constructor and overlaps 2021-03-03 00:07:51 +00:00
Gleb Mazovetskiy bb838dbec0 heightfield up axis: Use Range
Reads a bit better than using individual min/max scalars.
2021-03-01 10:26:27 +00:00
Gleb MazovetskiyandAndrew Shulaev e7e28bebf8 heightfield processAllTriangles: Skip triangle processing if the triangle is out-of-AABB
Skips triangle processing if the triangle is out-of-AABB on the up axis.

This massively improves OpenMW performance on my test machine.

Co-authored-by: Andrew Shulaev <ash.drone@gmail.com>
2021-02-28 21:33:27 +00:00
Gleb MazovetskiyandAndrew Shulaev 782f14caa1 heightfield processAllTriangles: Copy 1 less vertex
The 2 triangles of a heightfield quad share 2 vertices.

Co-authored-by: Andrew Shulaev <ash.drone@gmail.com>
2021-02-28 15:22:28 +00:00
Alexander Turkin 7aff26b80d one cmake option per one extra package 2021-02-22 07:30:16 +03:00
daniel.ordonez f719c27b04 Fix Stable PD bug on First Order Taylor approximation of next q state 2021-01-27 21:59:49 -05:00
yycho0108 6f65a12b3a no nullptr 2021-01-20 16:45:23 +09:00
yycho0108 c0d9553d65 add link names args to CreateMultibody 2021-01-20 15:53:24 +09:00
Nan Jiang 46519720eb Update README.md 2020-09-15 12:39:31 -04:00
1063 changed files with 158083 additions and 15246 deletions
+38
View File
@@ -0,0 +1,38 @@
name: CMake
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}
+4
View File
@@ -36,3 +36,7 @@ CTestTestFile.cmake
# vim temp files
*.swp
.vscode/
.idea/
cmake-build-debug/
-46
View File
@@ -1,46 +0,0 @@
language: cpp
matrix:
include:
- os: linux
compiler: clang
env:
- BUILD_NAME=TRUSTY_CLANG
- SUDO=sudo
- os: linux
compiler: clang
env:
- BUILD_NAME=XENIAL_CLANG
- DOCKER_FILE="ubuntu-xenial"
services: docker
- os: linux
compiler: gcc
env:
- BUILD_NAME=BIONIC_GCC
- DOCKER_FILE="ubuntu-bionic"
services: docker
- os: linux
compiler: clang
env:
- BUILD_NAME=BIONIC_CLANG
- DOCKER_FILE="ubuntu-bionic"
services: docker
- os: osx
compiler: gcc
env:
- BUILD_NAME=OSX_GCC
- os: osx
compiler: clang
env:
- COMPILER=clang++
- BUILD_NAME=OSX_CLANG
before_install:
- if [ -n "$DOCKER_FILE" ]; then
docker build -t "$DOCKER_FILE" -f ".ci/docker/$DOCKER_FILE" .;
docker run -itd -v $TRAVIS_BUILD_DIR:$TRAVIS_BUILD_DIR --env-file .ci/docker/env.list --name bullet-docker "$DOCKER_FILE";
fi
script:
- if [ -n "$DOCKER_FILE" ]; then
docker exec bullet-docker /bin/sh -c "cd $TRAVIS_BUILD_DIR && ./.ci/script.sh";
else
'.ci/script.sh';
fi
+1 -1
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.4.3)
cmake_minimum_required(VERSION 3.5)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
cmake_policy(SET CMP0017 NEW)
#this line has to appear before 'PROJECT' in order to be able to disable incremental linking
+1
View File
@@ -304,6 +304,7 @@ INSTALL (
ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
IF(NOT MSVC)
SET(PKGCONFIG_INSTALL_PREFIX "lib${LIB_SUFFIX}/pkgconfig/" CACHE STRING "Base directory for pkgconfig files")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/bullet_robotics.pc.cmake
${CMAKE_CURRENT_BINARY_DIR}/bullet_robotics.pc @ONLY)
INSTALL(
+1
View File
@@ -183,6 +183,7 @@ ENDIF (BUILD_SHARED_LIBS)
ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
IF(NOT MSVC)
SET(PKGCONFIG_INSTALL_PREFIX "lib${LIB_SUFFIX}/pkgconfig/" CACHE STRING "Base directory for pkgconfig files")
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/bullet_robotics_gui.pc.cmake
${CMAKE_CURRENT_BINARY_DIR}/bullet_robotics_gui.pc @ONLY)
INSTALL(
+32 -1
View File
@@ -1,5 +1,36 @@
SUBDIRS( InverseDynamics BulletRoboticsGUI BulletRobotics obj2sdf Serialize ConvexDecomposition HACD GIMPACTUtils )
OPTION(BUILD_INVERSE_DYNAMIC_EXTRA "Build InverseDynamic extra module, only applied when BUILD_EXTRAS is ON" ON)
OPTION(BUILD_BULLET_ROBOTICS_GUI_EXTRA "Build BulletRoboticsGUI extra module, only applied when BUILD_EXTRAS is ON" ON)
OPTION(BUILD_BULLET_ROBOTICS_EXTRA "Build BulletRobotics extra module, only applied when BUILD_EXTRAS is ON" ON)
OPTION(BUILD_OBJ2SDF_EXTRA "Build obj2sdf extra module, only applied when BUILD_EXTRAS is ON" ON)
OPTION(BUILD_SERIALIZE_EXTRA "Build Serialize extra module, only applied when BUILD_EXTRAS is ON" ON)
OPTION(BUILD_CONVEX_DECOMPOSITION_EXTRA "Build ConvexDecomposition extra module, only applied when BUILD_EXTRAS is ON" ON)
OPTION(BUILD_HACD_EXTRA "Build HACD extra module, only applied when BUILD_EXTRAS is ON" ON)
OPTION(BUILD_GIMPACTUTILS_EXTRA "Build GIMPACTUtils extra module, only applied when BUILD_EXTRAS is ON" ON)
IF(BUILD_INVERSE_DYNAMIC_EXTRA)
SUBDIRS( InverseDynamics )
ENDIF()
IF(BUILD_BULLET_ROBOTICS_GUI_EXTRA)
SUBDIRS( BulletRoboticsGUI )
ENDIF()
IF(BUILD_BULLET_ROBOTICS_EXTRA)
SUBDIRS( BulletRobotics )
ENDIF()
IF(BUILD_OBJ2SDF_EXTRA)
SUBDIRS( obj2sdf )
ENDIF()
IF(BUILD_SERIALIZE_EXTRA)
SUBDIRS( Serialize )
ENDIF()
IF(BUILD_CONVEX_DECOMPOSITION_EXTRA)
SUBDIRS( ConvexDecomposition )
ENDIF()
IF(BUILD_HACD_EXTRA)
SUBDIRS( HACD )
ENDIF()
IF(BUILD_GIMPACTUTILS_EXTRA)
SUBDIRS( GIMPACTUtils )
ENDIF()
#Maya Dynamica plugin is moved to http://dynamica.googlecode.com
+2 -1
View File
@@ -75,6 +75,7 @@ bFile::bFile(const char *filename, const char headerString[7])
fseek(fp, 0L, SEEK_SET);
mFileBuffer = (char *)malloc(mFileLen + 1);
memset(mFileBuffer, 0, mFileLen+1);
size_t bytesRead;
bytesRead = fread(mFileBuffer, mFileLen, 1, fp);
@@ -736,7 +737,7 @@ void bFile::parseStruct(char *strcPtr, char *dtPtr, int old_dna, int new_dna, bo
if (new_dna == -1) return;
//disable this, because we need to fixup pointers/ListBase
if (0) //mFileDNA->flagEqual(old_dna))
if (/* DISABLES CODE */ (0)) //mFileDNA->flagEqual(old_dna))
{
short *strc = mFileDNA->getStruct(old_dna);
int len = mFileDNA->getLength(strc[0]);
@@ -333,6 +333,7 @@ void btBulletFile::parse(int verboseMode)
if (m_DnaCopy)
delete m_DnaCopy;
m_DnaCopy = (char*)btAlignedAlloc(sBulletDNAlen64, 16);
memset(m_DnaCopy, 0, sBulletDNAlen64);
memcpy(m_DnaCopy, sBulletDNAstr64, sBulletDNAlen64);
parseInternal(verboseMode, m_DnaCopy, sBulletDNAlen64);
}
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2011 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2011 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
+1 -1
View File
@@ -69,7 +69,7 @@
#include <pthread.h>
#endif
#if defined(__APPLE__)
#if defined(__APPLE__) || !defined(__GLIBC__)
#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
#endif
+12 -12
View File
@@ -30,13 +30,13 @@
#include "Bullet3Common/b3HashMap.h"
#include "../Utils/b3BulletDefaultFileIO.h"
using tinyobj::index_t;
using bt_tinyobj::index_t;
struct ShapeContainer
{
std::string m_matName;
std::string m_shapeName;
tinyobj::material_t material;
bt_tinyobj::material_t material;
std::vector<float> positions;
std::vector<float> normals;
std::vector<float> texcoords;
@@ -91,11 +91,11 @@ int main(int argc, char* argv[])
char materialPrefixPath[MAX_PATH_LEN];
b3FileUtils::extractPath(fileNameWithPath, materialPrefixPath, MAX_PATH_LEN);
std::vector<tinyobj::shape_t> shapes;
tinyobj::attrib_t attribute;
std::vector<bt_tinyobj::shape_t> shapes;
bt_tinyobj::attrib_t attribute;
b3BulletDefaultFileIO fileIO;
std::string err = tinyobj::LoadObj(attribute, shapes, fileNameWithPath, materialPrefixPath,&fileIO);
std::string err = bt_tinyobj::LoadObj(attribute, shapes, fileNameWithPath, materialPrefixPath, &fileIO);
char sdfFileName[MAX_PATH_LEN];
sprintf(sdfFileName, "%s%s.sdf", materialPrefixPath, "newsdf");
@@ -110,8 +110,8 @@ int main(int argc, char* argv[])
for (int s = 0; s < (int)shapes.size(); s++)
{
tinyobj::shape_t& shape = shapes[s];
tinyobj::material_t mat = shape.material;
bt_tinyobj::shape_t& shape = shapes[s];
bt_tinyobj::material_t mat = shape.material;
b3HashString key = mat.name.length() ? mat.name.c_str() : "";
if (!gMaterialNames.find(key))
@@ -212,7 +212,7 @@ int main(int argc, char* argv[])
int faceCount = shapeCon->indices.size();
int vertexCount = shapeCon->positions.size();
tinyobj::material_t mat = shapeCon->material;
bt_tinyobj::material_t mat = shapeCon->material;
if (shapeCon->m_matName.length())
{
const char* objName = shapeCon->m_matName.c_str();
@@ -271,7 +271,7 @@ int main(int argc, char* argv[])
fprintf(sdfFile,
"\t\t<model name='%s'>\n"
"\t\t\t<static>1</static>\n"
"\t\t\t<pose frame=''>0 0 0 0 0 0</pose>\n"
"\t\t\t<pose >0 0 0 0 0 0</pose>\n"
"\t\t\t<link name='link_d%d'>\n"
"\t\t\t<inertial>\n"
"\t\t\t<mass>0</mass>\n"
@@ -317,7 +317,7 @@ int main(int argc, char* argv[])
{
for (int s = 0; s < (int)shapes.size(); s++)
{
tinyobj::shape_t& shape = shapes[s];
bt_tinyobj::shape_t& shape = shapes[s];
if (shape.name.length())
{
@@ -351,7 +351,7 @@ int main(int argc, char* argv[])
int faceCount = shape.mesh.indices.size();
int vertexCount = attribute.vertices.size();
tinyobj::material_t mat = shape.material;
bt_tinyobj::material_t mat = shape.material;
if (shape.name.length())
{
const char* objName = shape.name.c_str();
@@ -411,7 +411,7 @@ int main(int argc, char* argv[])
fprintf(sdfFile,
"\t\t<model name='%s'>\n"
"\t\t\t<static>1</static>\n"
"\t\t\t<pose frame=''>0 0 0 0 0 0</pose>\n"
"\t\t\t<pose>0 0 0 0 0 0</pose>\n"
"\t\t\t<link name='link_d%d'>\n"
"\t\t\t<inertial>\n"
"\t\t\t<mass>0</mass>\n"
+20 -17
View File
@@ -7,8 +7,11 @@ This is the official C++ source code repository of the Bullet Physics SDK: real-
![PyBullet](https://pybullet.org/wordpress/wp-content/uploads/2019/03/cropped-pybullet.png)
## Issues ##
The Issue tracker was flooded with support questions and is closed until it is cleaned up. Use the [PyBullet forums](http://pybullet.org) to discuss with others.
## PyBullet ##
New in Bullet 2.85: pybullet Python bindings, improved support for robotics and VR. Use pip install pybullet and checkout the [PyBullet Quickstart Guide](https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit#heading=h.2ye70wns7io3).
It is highly recommended to use PyBullet Python bindings for improved support for robotics, reinforcement learning and VR. Use pip install pybullet and checkout the [PyBullet Quickstart Guide](https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit#heading=h.2ye70wns7io3).
Installation is simple:
```
@@ -21,11 +24,11 @@ python3 -m pybullet_envs.deep_mimic.testrl --arg_file run_humanoid3d_backflip_ar
If you use PyBullet in your research, please cite it like this:
```
@MISC{coumans2019,
@MISC{coumans2021,
author = {Erwin Coumans and Yunfei Bai},
title = {PyBullet, a Python module for physics simulation for games, robotics and machine learning},
howpublished = {\url{http://pybullet.org}},
year = {2016--2019}
year = {2016--2021}
}
```
@@ -63,7 +66,7 @@ You can download and install Bullet using the [vcpkg](https://github.com/Microso
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
vcpkg install bullet3
./vcpkg install bullet3
The Bullet port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
@@ -88,12 +91,12 @@ p.connect(p.SHARED_MEMORY) #or (p.TCP, "localhost", 6667) or (p.UDP, "192.168.86
**Linux and Mac OSX gnu make**
Make sure cmake is installed (sudo apt-get install cmake, brew install cmake, or https://cmake.org)
Make sure gcc and cmake is installed (`sudo apt-get install build-essential` and `sudo apt-get install cmake` for Linux, `brew install cmake` for Mac, or https://cmake.org)
In a terminal type:
./build_cmake_pybullet_double.sh
```
./build_cmake_pybullet_double.sh
```
This script will invoke cmake and build in the build_cmake directory. You can find pybullet in Bullet/examples/pybullet.
The BulletExampleBrowser binary will be in Bullet/examples/ExampleBrowser.
@@ -101,15 +104,15 @@ You can also build Bullet using premake. There are premake executables in the bu
Depending on your system (Linux 32bit, 64bit or Mac OSX) use one of the following lines
Using premake:
```
cd build3
./premake4_linux --double gmake
./premake4_linux64 --double gmake
./premake4_osx --double --enable_pybullet gmake
cd build3
./premake4_linux --double gmake
./premake4_linux64 --double gmake
./premake4_osx --double --enable_pybullet gmake
```
Then
```
cd gmake
make
cd gmake
make
```
Note that on Linux, you need to use cmake to build pybullet, since the compiler has issues of mixing shared and static libraries.
@@ -117,9 +120,9 @@ Note that on Linux, you need to use cmake to build pybullet, since the compiler
**Mac OSX Xcode**
Click on build3/xcode4.command or in a terminal window execute
./premake_osx xcode4
```
./premake_osx xcode4
```
## Usage
The App_ExampleBrowser executables will be located in the bin folder.
+1 -1
View File
@@ -1 +1 @@
3.08
3.27
+29 -1
View File
@@ -66,7 +66,27 @@
trigger = "enable_static_vr_plugin",
description = "Statically link vr plugin (in examples/SharedMemory/plugins/vrSyncPlugin)"
}
newoption
{
trigger = "enable_static_test_plugin",
description = "Statically link test plugin (in examples/SharedMemory/plugins/testPlugin)"
}
newoption
{
trigger = "enable_static_tiny_renderer__plugin",
description = "Statically link vr plugin (in examples/SharedMemory/plugins/tinyRendererPlugin)"
}
newoption
{
trigger = "enable_static_pd_control_plugin",
description = "Statically link vr plugin (in examples/SharedMemory/plugins/pdControlPlugin)"
}
newoption
{
trigger = "enable_static_collision_filter_plugin",
description = "Statically link vr plugin (in examples/SharedMemory/plugins/collisionFilterPlugin)"
}
newoption
{
trigger = "enable_physx",
@@ -319,6 +339,12 @@ end
trigger = "no-test",
description = "Disable all tests"
}
newoption
{
trigger = "test-bullet2",
description = "Enable Bullet2 LinearMath test"
}
newoption
{
@@ -646,7 +672,9 @@ end
end
if not _OPTIONS["no-test"] then
if _OPTIONS["test-bullet2"] then
include "../test/Bullet2"
end
if not _OPTIONS["no-gtest"] then
include "../test/gtest-1.7.0"
@@ -1,4 +1,4 @@
mkdir build_cmake
cd build_cmake
cmake -DBUILD_PYBULLET=ON -DUSE_DOUBLE_PRECISION=ON -DCMAKE_BUILD_TYPE=Release -DPYTHON_INCLUDE_DIR=c:\python-3.5.3.amd64\include -DPYTHON_LIBRARY=c:\python-3.5.3.amd64\libs\python35.lib -DPYTHON_DEBUG_LIBRARY=c:\python-3.5.3.amd64\libs\python35_d.lib -G "Visual Studio 16 2019" ..
cmake -DBUILD_PYBULLET=ON -DUSE_DOUBLE_PRECISION=ON -DCMAKE_BUILD_TYPE=Release -DPYTHON_INCLUDE_DIR=c:\python38\include -DPYTHON_LIBRARY=c:\python38\libs\python38.lib -DPYTHON_DEBUG_LIBRARY=c:\python38\libs\python38.lib -G "Visual Studio 16 2019" ..
start .
+1 -1
View File
@@ -1,7 +1,7 @@
<sdf version='1.6'>
<world name='default'>
<model name='unit_box_0'>
<pose frame=''>0 0 0.107 0 0 0</pose>
<pose>0 0 0.107 0 0 0</pose>
<link name='unit_box_0::link'>
<inertial>
<mass>0.1</mass>
+27 -27
View File
@@ -2,7 +2,7 @@
<sdf version='1.6'>
<world name='default'>
<model name='wsg50_with_gripper'>
<pose frame=''>0 0 0.26 3.14 0 0</pose>
<pose>0 0 0.26 3.14 0 0</pose>
<link name='world'>
</link>
@@ -28,9 +28,9 @@
</joint>
<link name='base_link'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<mass>1.2</mass>
<inertia>
<ixx>1</ixx>
@@ -43,7 +43,7 @@
</inertial>
<visual name='base_link_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -58,9 +58,9 @@
</link>
<link name='motor'>
<pose frame=''>0 0 0.03 0 0 0</pose>
<pose>0 0 0.03 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -72,7 +72,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>0 0 0.01 0 0 0</pose>
<pose>0 0 0.01 0 0 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.02 </size>
@@ -102,9 +102,9 @@
</joint>
<link name='left_hinge'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.035 0 0 0</pose>
<pose>0 0 0.035 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -116,7 +116,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>-0.03 0 0.01 0 -1.2 0</pose>
<pose>-0.03 0 0.01 0 -1.2 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.07 </size>
@@ -147,9 +147,9 @@
</joint>
<link name='right_hinge'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.035 0 0 0</pose>
<pose>0 0 0.035 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -161,7 +161,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>0.03 0 0.01 0 1.2 0</pose>
<pose>0.03 0 0.01 0 1.2 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.07 </size>
@@ -192,9 +192,9 @@
</joint>
<link name='gripper_left'>
<pose frame=''>-0.055 0 0.06 0 -0 0</pose>
<pose>-0.055 0 0.06 0 -0 0</pose>
<inertial>
<pose frame=''>0 0 0.0115 0 -0 0</pose>
<pose>0 0 0.0115 0 -0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -207,7 +207,7 @@
</inertial>
<visual name='gripper_left_visual'>
<pose frame=''>0 0 -0.06 0 0 0</pose>
<pose>0 0 -0.06 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -216,7 +216,7 @@
</geometry>
</visual>
<visual name='gripper_left_fixed_joint_lump__finger_left_visual_1'>
<pose frame=''>0 0 -0.037 0 0 0</pose>
<pose>0 0 -0.037 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -249,9 +249,9 @@
</joint>
<link name='gripper_right'>
<pose frame=''>0.055 0 0.06 0 0 3.14159</pose>
<pose>0.055 0 0.06 0 0 3.14159</pose>
<inertial>
<pose frame=''>0 0 0.0115 0 -0 0</pose>
<pose>0 0 0.0115 0 -0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -264,7 +264,7 @@
</inertial>
<visual name='gripper_right_visual'>
<pose frame=''>0 0 -0.06 0 0 0</pose>
<pose>0 0 -0.06 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -273,7 +273,7 @@
</geometry>
</visual>
<visual name='gripper_right_fixed_joint_lump__finger_right_visual_1'>
<pose frame=''>0 0 -0.037 0 0 0</pose>
<pose>0 0 -0.037 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -305,7 +305,7 @@
</joint>
<link name='finger_right'>
<pose frame=''>0.062 0 0.145 0 0 1.5708</pose>
<pose>0.062 0 0.145 0 0 1.5708</pose>
<inertial>
<mass>0.2</mass>
<inertia>
@@ -319,7 +319,7 @@
</inertial>
<collision name='finger_right_collision'>
<pose frame=''>0 0 0.042 0 0 0 </pose>
<pose>0 0 0.042 0 0 0 </pose>
<geometry>
<box>
<size>0.02 0.02 0.15 </size>
@@ -329,7 +329,7 @@
</collision>
<visual name='finger_right_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -345,7 +345,7 @@
</joint>
<link name='finger_left'>
<pose frame=''>-0.062 0 0.145 0 0 4.71239</pose>
<pose>-0.062 0 0.145 0 0 4.71239</pose>
<inertial>
<mass>0.2</mass>
<inertia>
@@ -359,7 +359,7 @@
</inertial>
<collision name='finger_left_collision'>
<pose frame=''>0 0 0.042 0 0 0 </pose>
<pose>0 0 0.042 0 0 0 </pose>
<geometry>
<box>
<size>0.02 0.02 0.15 </size>
@@ -369,7 +369,7 @@
</collision>
<visual name='finger_left_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -3,11 +3,11 @@
<world name='default'>
<model name='wsg50_with_gripper'>
<pose frame=''>0 -2.3 2.1 0 0 0</pose>
<pose>0 -2.3 2.1 0 0 0</pose>
<link name='world'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>1</ixx>
@@ -26,9 +26,9 @@
</joint>
<link name='base_link'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<mass>1.2</mass>
<inertia>
<ixx>1</ixx>
@@ -41,7 +41,7 @@
</inertial>
<visual name='base_link_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -56,9 +56,9 @@
</link>
<link name='motor'>
<pose frame=''>0 0 0.03 0 0 0</pose>
<pose>0 0 0.03 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -70,7 +70,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>0 0 0.01 0 0 0</pose>
<pose>0 0 0.01 0 0 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.02 </size>
@@ -100,9 +100,9 @@
</joint>
<link name='left_hinge'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.035 0 0 0</pose>
<pose>0 0 0.035 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -114,7 +114,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>-0.03 0 0.01 0 -1.2 0</pose>
<pose>-0.03 0 0.01 0 -1.2 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.07 </size>
@@ -145,9 +145,9 @@
</joint>
<link name='right_hinge'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.035 0 0 0</pose>
<pose>0 0 0.035 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -159,7 +159,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>0.03 0 0.01 0 1.2 0</pose>
<pose>0.03 0 0.01 0 1.2 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.07 </size>
@@ -190,9 +190,9 @@
</joint>
<link name='gripper_left'>
<pose frame=''>-0.055 0 0.06 0 -0 0</pose>
<pose>-0.055 0 0.06 0 -0 0</pose>
<inertial>
<pose frame=''>0 0 0.0115 0 -0 0</pose>
<pose>0 0 0.0115 0 -0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -205,7 +205,7 @@
</inertial>
<visual name='gripper_left_visual'>
<pose frame=''>0 0 -0.06 0 0 0</pose>
<pose>0 0 -0.06 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -214,7 +214,7 @@
</geometry>
</visual>
<visual name='gripper_left_fixed_joint_lump__finger_left_visual_1'>
<pose frame=''>0 0 -0.037 0 0 0</pose>
<pose>0 0 -0.037 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -247,9 +247,9 @@
</joint>
<link name='gripper_right'>
<pose frame=''>0.055 0 0.06 0 0 3.14159</pose>
<pose>0.055 0 0.06 0 0 3.14159</pose>
<inertial>
<pose frame=''>0 0 0.0115 0 -0 0</pose>
<pose>0 0 0.0115 0 -0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -262,7 +262,7 @@
</inertial>
<visual name='gripper_right_visual'>
<pose frame=''>0 0 -0.06 0 0 0</pose>
<pose>0 0 -0.06 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -271,7 +271,7 @@
</geometry>
</visual>
<visual name='gripper_right_fixed_joint_lump__finger_right_visual_1'>
<pose frame=''>0 0 -0.037 0 0 0</pose>
<pose>0 0 -0.037 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -307,7 +307,7 @@
<lateral_friction value="1.0"/>
<spinning_friction value="1.5"/>
</contact>
<pose frame=''>0.042 0 0.145 0 0 1.5708</pose>
<pose>0.042 0 0.145 0 0 1.5708</pose>
<inertial>
<mass>0.2</mass>
<inertia>
@@ -321,7 +321,7 @@
</inertial>
<collision name='finger_right_collision'>
<pose frame=''>0 0 0.042 0 0 0 </pose>
<pose>0 0 0.042 0 0 0 </pose>
<geometry>
<box>
<size>0.02 0.02 0.15 </size>
@@ -331,7 +331,7 @@
</collision>
<visual name='finger_right_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -351,7 +351,7 @@
<lateral_friction value="1.0"/>
<spinning_friction value="1.5"/>
</contact>
<pose frame=''>-0.042 0 0.145 0 0 4.71239</pose>
<pose>-0.042 0 0.145 0 0 4.71239</pose>
<inertial>
<mass>0.2</mass>
<inertia>
@@ -365,7 +365,7 @@
</inertial>
<collision name='finger_left_collision'>
<pose frame=''>0 0 0.042 0 0 0 </pose>
<pose>0 0 0.042 0 0 0 </pose>
<geometry>
<box>
<size>0.02 0.02 0.15 </size>
@@ -375,7 +375,7 @@
</collision>
<visual name='finger_left_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
+27 -27
View File
@@ -2,7 +2,7 @@
<sdf version='1.6'>
<world name='default'>
<model name='wsg50_with_gripper'>
<pose frame=''>0 0 0.7 3.14 0 0</pose>
<pose>0 0 0.7 3.14 0 0</pose>
<link name='world'>
</link>
@@ -28,9 +28,9 @@
</joint>
<link name='base_link'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<mass>1.2</mass>
<inertia>
<ixx>1</ixx>
@@ -43,7 +43,7 @@
</inertial>
<visual name='base_link_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -58,9 +58,9 @@
</link>
<link name='motor'>
<pose frame=''>0 0 0.03 0 0 0</pose>
<pose>0 0 0.03 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -72,7 +72,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>0 0 0.01 0 0 0</pose>
<pose>0 0 0.01 0 0 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.02 </size>
@@ -102,9 +102,9 @@
</joint>
<link name='left_hinge'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.035 0 0 0</pose>
<pose>0 0 0.035 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -116,7 +116,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>-0.03 0 0.01 0 -1.2 0</pose>
<pose>-0.03 0 0.01 0 -1.2 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.07 </size>
@@ -147,9 +147,9 @@
</joint>
<link name='right_hinge'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.035 0 0 0</pose>
<pose>0 0 0.035 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -161,7 +161,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>0.03 0 0.01 0 1.2 0</pose>
<pose>0.03 0 0.01 0 1.2 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.07 </size>
@@ -192,9 +192,9 @@
</joint>
<link name='gripper_left'>
<pose frame=''>-0.055 0 0.06 0 -0 0</pose>
<pose>-0.055 0 0.06 0 -0 0</pose>
<inertial>
<pose frame=''>0 0 0.0115 0 -0 0</pose>
<pose>0 0 0.0115 0 -0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -207,7 +207,7 @@
</inertial>
<visual name='gripper_left_visual'>
<pose frame=''>0 0 -0.06 0 0 0</pose>
<pose>0 0 -0.06 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -216,7 +216,7 @@
</geometry>
</visual>
<visual name='gripper_left_fixed_joint_lump__finger_left_visual_1'>
<pose frame=''>0 0 -0.037 0 0 0</pose>
<pose>0 0 -0.037 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -248,9 +248,9 @@
</joint>
<link name='gripper_right'>
<pose frame=''>0.055 0 0.06 0 0 3.14159</pose>
<pose>0.055 0 0.06 0 0 3.14159</pose>
<inertial>
<pose frame=''>0 0 0.0115 0 -0 0</pose>
<pose>0 0 0.0115 0 -0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -263,7 +263,7 @@
</inertial>
<visual name='gripper_right_visual'>
<pose frame=''>0 0 -0.06 0 0 0</pose>
<pose>0 0 -0.06 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -272,7 +272,7 @@
</geometry>
</visual>
<visual name='gripper_right_fixed_joint_lump__finger_right_visual_1'>
<pose frame=''>0 0 -0.037 0 0 0</pose>
<pose>0 0 -0.037 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -307,7 +307,7 @@
<spinning_friction>.3</spinning_friction>
<rolling_friction>0.04</rolling_friction>
</contact>
<pose frame=''>0.062 0 0.145 0 0 1.5708</pose>
<pose>0.062 0 0.145 0 0 1.5708</pose>
<inertial>
<mass>0.2</mass>
<inertia>
@@ -321,7 +321,7 @@
</inertial>
<collision name='finger_right_collision'>
<pose frame=''>0 0 0.042 0 0 0 </pose>
<pose>0 0 0.042 0 0 0 </pose>
<geometry>
<box>
<size>0.02 0.02 0.15 </size>
@@ -331,7 +331,7 @@
</collision>
<visual name='finger_right_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -351,7 +351,7 @@
<spinning_friction>.3</spinning_friction>
<rolling_friction>0.04</rolling_friction>
</contact>
<pose frame=''>-0.062 0 0.145 0 0 4.71239</pose>
<pose>-0.062 0 0.145 0 0 4.71239</pose>
<inertial>
<mass>0.2</mass>
<inertia>
@@ -365,7 +365,7 @@
</inertial>
<collision name='finger_left_collision'>
<pose frame=''>0 0 0.042 0 0 0 </pose>
<pose>0 0 0.042 0 0 0 </pose>
<geometry>
<box>
<size>0.02 0.02 0.15 </size>
@@ -375,7 +375,7 @@
</collision>
<visual name='finger_left_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -2,11 +2,11 @@
<sdf version='1.6'>
<world name='default'>
<model name='wsg50_with_gripper'>
<pose frame=''>1.4 -0.2 2.1 0 0 0</pose>
<pose>1.4 -0.2 2.1 0 0 0</pose>
<link name='world'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>1</ixx>
@@ -25,9 +25,9 @@
</joint>
<link name='base_link'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<mass>1.2</mass>
<inertia>
<ixx>1</ixx>
@@ -40,7 +40,7 @@
</inertial>
<visual name='base_link_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -55,9 +55,9 @@
</link>
<link name='motor'>
<pose frame=''>0 0 0.03 0 0 0</pose>
<pose>0 0 0.03 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -69,7 +69,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>0 0 0.01 0 0 0</pose>
<pose>0 0 0.01 0 0 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.02 </size>
@@ -99,9 +99,9 @@
</joint>
<link name='left_hinge'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.035 0 0 0</pose>
<pose>0 0 0.035 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -113,7 +113,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>-0.03 0 0.01 0 -1.2 0</pose>
<pose>-0.03 0 0.01 0 -1.2 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.07 </size>
@@ -144,9 +144,9 @@
</joint>
<link name='right_hinge'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.035 0 0 0</pose>
<pose>0 0 0.035 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -158,7 +158,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>0.03 0 0.01 0 1.2 0</pose>
<pose>0.03 0 0.01 0 1.2 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.07 </size>
@@ -189,9 +189,9 @@
</joint>
<link name='gripper_left'>
<pose frame=''>-0.055 0 0.06 0 -0 0</pose>
<pose>-0.055 0 0.06 0 -0 0</pose>
<inertial>
<pose frame=''>0 0 0.0115 0 -0 0</pose>
<pose>0 0 0.0115 0 -0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -204,7 +204,7 @@
</inertial>
<visual name='gripper_left_visual'>
<pose frame=''>0 0 -0.06 0 0 0</pose>
<pose>0 0 -0.06 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -213,7 +213,7 @@
</geometry>
</visual>
<visual name='gripper_left_fixed_joint_lump__finger_left_visual_1'>
<pose frame=''>0 0 -0.037 0 0 0</pose>
<pose>0 0 -0.037 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -245,9 +245,9 @@
</joint>
<link name='gripper_right'>
<pose frame=''>0.055 0 0.06 0 0 3.14159</pose>
<pose>0.055 0 0.06 0 0 3.14159</pose>
<inertial>
<pose frame=''>0 0 0.0115 0 -0 0</pose>
<pose>0 0 0.0115 0 -0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -260,7 +260,7 @@
</inertial>
<visual name='gripper_right_visual'>
<pose frame=''>0 0 -0.06 0 0 0</pose>
<pose>0 0 -0.06 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -269,7 +269,7 @@
</geometry>
</visual>
<visual name='gripper_right_fixed_joint_lump__finger_right_visual_1'>
<pose frame=''>0 0 -0.037 0 0 0</pose>
<pose>0 0 -0.037 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -304,7 +304,7 @@
<lateral_friction>1.0</lateral_friction>
<spinning_friction>1.5</spinning_friction>
</contact>
<pose frame=''>0.062 0 0.145 0 0 1.5708</pose>
<pose>0.062 0 0.145 0 0 1.5708</pose>
<inertial>
<mass>0.2</mass>
<inertia>
@@ -318,7 +318,7 @@
</inertial>
<collision name='finger_right_collision'>
<pose frame=''>0 0 0.042 0 0 0 </pose>
<pose>0 0 0.042 0 0 0 </pose>
<geometry>
<box>
<size>0.02 0.02 0.15 </size>
@@ -328,7 +328,7 @@
</collision>
<visual name='finger_right_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -348,7 +348,7 @@
<lateral_friction>1.0</lateral_friction>
<spinning_friction>1.5</spinning_friction>
</contact>
<pose frame=''>-0.062 0 0.145 0 0 4.71239</pose>
<pose>-0.062 0 0.145 0 0 4.71239</pose>
<inertial>
<mass>0.2</mass>
<inertia>
@@ -362,7 +362,7 @@
</inertial>
<collision name='finger_left_collision'>
<pose frame=''>0 0 0.042 0 0 0 </pose>
<pose>0 0 0.042 0 0 0 </pose>
<geometry>
<box>
<size>0.02 0.02 0.15 </size>
@@ -372,7 +372,7 @@
</collision>
<visual name='finger_left_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -2,7 +2,7 @@
<sdf version='1.6'>
<world name='default'>
<model name='wsg50_with_gripper'>
<pose frame=''>0 0 0.4 3.14 0 0</pose>
<pose>0 0 0.4 3.14 0 0</pose>
<link name='world'>
</link>
@@ -28,9 +28,9 @@
</joint>
<link name='base_link'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<mass>1.2</mass>
<inertia>
<ixx>1</ixx>
@@ -43,7 +43,7 @@
</inertial>
<visual name='base_link_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -58,9 +58,9 @@
</link>
<link name='motor'>
<pose frame=''>0 0 0.03 0 0 0</pose>
<pose>0 0 0.03 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -72,7 +72,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>0 0 0.01 0 0 0</pose>
<pose>0 0 0.01 0 0 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.02 </size>
@@ -102,9 +102,9 @@
</joint>
<link name='left_hinge'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.035 0 0 0</pose>
<pose>0 0 0.035 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -116,7 +116,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>-0.03 0 0.01 0 -1.2 0</pose>
<pose>-0.03 0 0.01 0 -1.2 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.07 </size>
@@ -147,9 +147,9 @@
</joint>
<link name='right_hinge'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.035 0 0 0</pose>
<pose>0 0 0.035 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -161,7 +161,7 @@
</inertia>
</inertial>
<visual name='motor_visual'>
<pose frame=''>0.03 0 0.01 0 1.2 0</pose>
<pose>0.03 0 0.01 0 1.2 0</pose>
<geometry>
<box>
<size>0.02 0.02 0.07 </size>
@@ -192,9 +192,9 @@
</joint>
<link name='gripper_left'>
<pose frame=''>-0.055 0 0.06 0 -0 0</pose>
<pose>-0.055 0 0.06 0 -0 0</pose>
<inertial>
<pose frame=''>0 0 0.0115 0 -0 0</pose>
<pose>0 0 0.0115 0 -0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -207,7 +207,7 @@
</inertial>
<visual name='gripper_left_visual'>
<pose frame=''>0 0 -0.06 0 0 0</pose>
<pose>0 0 -0.06 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -216,7 +216,7 @@
</geometry>
</visual>
<visual name='gripper_left_fixed_joint_lump__finger_left_visual_1'>
<pose frame=''>0 0 -0.037 0 0 0</pose>
<pose>0 0 -0.037 0 0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -248,9 +248,9 @@
</joint>
<link name='gripper_right'>
<pose frame=''>0.055 0 0.06 0 0 0</pose>
<pose>0.055 0 0.06 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.0115 0 -0 0</pose>
<pose>0 0 0.0115 0 -0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -263,7 +263,7 @@
</inertial>
<visual name='gripper_right_visual'>
<pose frame=''>0 0 -0.06 0 0 3.14159</pose>
<pose>0 0 -0.06 0 0 3.14159</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -272,7 +272,7 @@
</geometry>
</visual>
<visual name='gripper_right_fixed_joint_lump__finger_right_visual_1'>
<pose frame=''>0 0 -0.037 0 0 3.14159</pose>
<pose>0 0 -0.037 0 0 3.14159</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
+23 -23
View File
@@ -2,7 +2,7 @@
<sdf version='1.6'>
<world name='default'>
<model name='wsg50_with_gripper'>
<pose frame=''>0 0 0.27 3.14 0 0</pose>
<pose>0 0 0.27 3.14 0 0</pose>
<link name='world'>
</link>
@@ -28,9 +28,9 @@
</joint>
<link name='base_link'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<mass>1.2</mass>
<inertia>
<ixx>1</ixx>
@@ -42,7 +42,7 @@
</inertia>
</inertial>
<collision name='base_link_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<box>
<size>0.2 0.05 0.05 </size>
@@ -50,7 +50,7 @@
</geometry>
</collision>
<visual name='base_link_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -67,9 +67,9 @@
</link>
<link name='gripper_left'>
<pose frame=''>-0.055 0 0 0 -0 0</pose>
<pose>-0.055 0 0 0 -0 0</pose>
<inertial>
<pose frame=''>0 0 0.0115 0 -0 0</pose>
<pose>0 0 0.0115 0 -0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -82,7 +82,7 @@
</inertial>
<collision name='gripper_left_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -91,7 +91,7 @@
</geometry>
</collision>
<collision name='gripper_left_fixed_joint_lump__finger_left_collision_1'>
<pose frame=''>0 0 0.023 0 -0 0</pose>
<pose>0 0 0.023 0 -0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -101,7 +101,7 @@
</collision>
<visual name='gripper_left_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -110,7 +110,7 @@
</geometry>
</visual>
<visual name='gripper_left_fixed_joint_lump__finger_left_visual_1'>
<pose frame=''>0 0 0.023 0 -0 0</pose>
<pose>0 0 0.023 0 -0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -141,9 +141,9 @@
</joint>
<link name='gripper_right'>
<pose frame=''>0.055 0 0 0 -0 3.14159</pose>
<pose>0.055 0 0 0 -0 3.14159</pose>
<inertial>
<pose frame=''>0 0 0.0115 0 -0 0</pose>
<pose>0 0 0.0115 0 -0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -156,7 +156,7 @@
</inertial>
<collision name='gripper_right_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -165,7 +165,7 @@
</geometry>
</collision>
<collision name='gripper_right_fixed_joint_lump__finger_right_collision_1'>
<pose frame=''>0 0 0.023 0 -0 0</pose>
<pose>0 0 0.023 0 -0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -175,7 +175,7 @@
</collision>
<visual name='gripper_right_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -184,7 +184,7 @@
</geometry>
</visual>
<visual name='gripper_right_fixed_joint_lump__finger_right_visual_1'>
<pose frame=''>0 0 0.023 0 -0 0</pose>
<pose>0 0 0.023 0 -0 0</pose>
<geometry>
<mesh>
<scale>0.001 0.001 0.001</scale>
@@ -219,7 +219,7 @@
<lateral_friction>1.0</lateral_friction>
<spinning_friction>1.5</spinning_friction>
</contact>
<pose frame=''>0.062 0 0.145 0 0 1.5708</pose>
<pose>0.062 0 0.145 0 0 1.5708</pose>
<inertial>
<mass>0.2</mass>
<inertia>
@@ -233,7 +233,7 @@
</inertial>
<collision name='finger_right_collision'>
<pose frame=''>0 0 0.042 0 0 0 </pose>
<pose>0 0 0.042 0 0 0 </pose>
<geometry>
<box>
<size>0.02 0.02 0.15 </size>
@@ -243,7 +243,7 @@
</collision>
<visual name='finger_right_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -263,7 +263,7 @@
<lateral_friction>1.0</lateral_friction>
<spinning_friction>1.5</spinning_friction>
</contact>
<pose frame=''>-0.062 0 0.145 0 0 4.71239</pose>
<pose>-0.062 0 0.145 0 0 4.71239</pose>
<inertial>
<mass>0.2</mass>
<inertia>
@@ -277,7 +277,7 @@
</inertial>
<collision name='finger_left_collision'>
<pose frame=''>0 0 0.042 0 0 0 </pose>
<pose>0 0 0.042 0 0 0 </pose>
<geometry>
<box>
<size>0.02 0.02 0.15 </size>
@@ -287,7 +287,7 @@
</collision>
<visual name='finger_left_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
+170 -170
View File
File diff suppressed because it is too large Load Diff
+57 -57
View File
@@ -11,9 +11,9 @@
<world name='default'>
<model name='lbr_iiwa_with_wsg50'>
<link name='lbr_iiwa_link_0'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<inertial>
<pose frame=''>-0.1 0 0.07 0 -0 0</pose>
<pose>-0.1 0 0.07 0 -0 0</pose>
<mass>0</mass>
<inertia>
<ixx>0.05</ixx>
@@ -25,7 +25,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_0_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -34,7 +34,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_0_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -50,9 +50,9 @@
</visual>
</link>
<link name='lbr_iiwa_link_1'>
<pose frame=''>0 0 0.1575 0 -0 0</pose>
<pose>0 0 0.1575 0 -0 0</pose>
<inertial>
<pose frame=''>0 -0.03 0.12 0 -0 0</pose>
<pose>0 -0.03 0.12 0 -0 0</pose>
<mass>4</mass>
<inertia>
<ixx>0.1</ixx>
@@ -64,7 +64,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_1_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -73,7 +73,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_1_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -108,9 +108,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_2'>
<pose frame=''>0 0 0.36 1.5708 -0 -3.14159</pose>
<pose>0 0 0.36 1.5708 -0 -3.14159</pose>
<inertial>
<pose frame=''>0.0003 0.059 0.042 0 -0 0</pose>
<pose>0.0003 0.059 0.042 0 -0 0</pose>
<mass>4</mass>
<inertia>
<ixx>0.05</ixx>
@@ -122,7 +122,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_2_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -131,7 +131,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_2_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -166,9 +166,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_3'>
<pose frame=''>0 -0 0.5645 0 0 0</pose>
<pose>0 -0 0.5645 0 0 0</pose>
<inertial>
<pose frame=''>0 0.03 0.13 0 -0 0</pose>
<pose>0 0.03 0.13 0 -0 0</pose>
<mass>3</mass>
<inertia>
<ixx>0.08</ixx>
@@ -180,7 +180,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_3_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -189,7 +189,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_3_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -224,9 +224,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_4'>
<pose frame=''>0 -0 0.78 1.5708 0 0</pose>
<pose>0 -0 0.78 1.5708 0 0</pose>
<inertial>
<pose frame=''>0 0.067 0.034 0 -0 0</pose>
<pose>0 0.067 0.034 0 -0 0</pose>
<mass>2.7</mass>
<inertia>
<ixx>0.03</ixx>
@@ -238,7 +238,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_4_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -247,7 +247,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_4_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -282,9 +282,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_5'>
<pose frame=''>0 -0 0.9645 0 -0 -3.14159</pose>
<pose>0 -0 0.9645 0 -0 -3.14159</pose>
<inertial>
<pose frame=''>0.0001 0.021 0.076 0 -0 0</pose>
<pose>0.0001 0.021 0.076 0 -0 0</pose>
<mass>1.7</mass>
<inertia>
<ixx>0.02</ixx>
@@ -296,7 +296,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_5_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -305,7 +305,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_5_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -340,9 +340,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_6'>
<pose frame=''>0 0 1.18 1.5708 -0 -3.14159</pose>
<pose>0 0 1.18 1.5708 -0 -3.14159</pose>
<inertial>
<pose frame=''>0 0.0006 0.0004 0 -0 0</pose>
<pose>0 0.0006 0.0004 0 -0 0</pose>
<mass>1.8</mass>
<inertia>
<ixx>0.005</ixx>
@@ -354,7 +354,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_6_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -363,7 +363,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_6_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -398,9 +398,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_7'>
<pose frame=''>0 0 1.261 0 0 0</pose>
<pose>0 0 1.261 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.02 0 -0 0</pose>
<pose>0 0 0.02 0 -0 0</pose>
<mass>0.3</mass>
<inertia>
<ixx>0.001</ixx>
@@ -412,7 +412,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_7_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -421,7 +421,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_7_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -462,9 +462,9 @@
<child>base_link</child>
</joint>
<link name='base_link'>
<pose frame=''>0 0 1.305 0 -0 0</pose>
<pose>0 0 1.305 0 -0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<mass>1.2</mass>
<inertia>
<ixx>1</ixx>
@@ -476,7 +476,7 @@
</inertia>
</inertial>
<visual name='base_link_visual'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<geometry>
<box>
<size>0.05 0.05 0.1 </size>
@@ -511,9 +511,9 @@
</axis>
</joint>
<link name='left_finger'>
<pose frame=''>0 0.024 1.35 0 -0.05 0</pose>
<pose>0 0.024 1.35 0 -0.05 0</pose>
<inertial>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -525,7 +525,7 @@
</inertia>
</inertial>
<visual name='left_finger_visual'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<geometry>
<box>
<size>0.01 0.01 0.08</size>
@@ -544,9 +544,9 @@
<child>left_finger_base</child>
</joint>
<link name='left_finger_base'>
<pose frame=''>-0.005 0.024 1.43 0 -0.3 0</pose>
<pose>-0.005 0.024 1.43 0 -0.3 0</pose>
<inertial>
<pose frame=''>-0.003 0 0.04 0 0 0 </pose>
<pose>-0.003 0 0.04 0 0 0 </pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -558,7 +558,7 @@
</inertia>
</inertial>
<visual name='left_finger_base_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -573,7 +573,7 @@
</material>
</visual>
<collision name='left_finger_base_collision'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -606,9 +606,9 @@
<lateral_friction>0.8</lateral_friction>
<spinning_friction>1.0</spinning_friction>
</contact>
<pose frame=''>-0.02 0.024 1.49 0 0.2 0</pose>
<pose>-0.02 0.024 1.49 0 0.2 0</pose>
<inertial>
<pose frame=''>-0.005 0 0.026 0 0 0 </pose>
<pose>-0.005 0 0.026 0 0 0 </pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -620,7 +620,7 @@
</inertia>
</inertial>
<visual name='left_finger_tip_visual'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -635,7 +635,7 @@
</material>
</visual>
<collision name='left_finger_tip_collision'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -664,9 +664,9 @@
</axis>
</joint>
<link name='right_finger'>
<pose frame=''>0 0.024 1.35 0 0.05 0</pose>
<pose>0 0.024 1.35 0 0.05 0</pose>
<inertial>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<mass>0.1</mass>
<inertia>
<ixx>0.1</ixx>
@@ -678,7 +678,7 @@
</inertia>
</inertial>
<visual name='right_finger_visual'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<geometry>
<box>
<size>0.01 0.01 0.08</size>
@@ -697,9 +697,9 @@
<child>right_finger_base</child>
</joint>
<link name='right_finger_base'>
<pose frame=''>0.005 0.024 1.43 0 0.3 0</pose>
<pose>0.005 0.024 1.43 0 0.3 0</pose>
<inertial>
<pose frame=''>0.003 0 0.04 0 0 0 </pose>
<pose>0.003 0 0.04 0 0 0 </pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -711,7 +711,7 @@
</inertia>
</inertial>
<visual name='right_finger_base_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -726,7 +726,7 @@
</material>
</visual>
<collision name='right_finger_base_collision'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -759,9 +759,9 @@
<lateral_friction>0.8</lateral_friction>
<spinning_friction>1.0</spinning_friction>
</contact>
<pose frame=''>0.02 0.024 1.49 0 -0.2 0</pose>
<pose>0.02 0.024 1.49 0 -0.2 0</pose>
<inertial>
<pose frame=''>0.005 0 0.026 0 0 0 </pose>
<pose>0.005 0 0.026 0 0 0 </pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -773,7 +773,7 @@
</inertia>
</inertial>
<visual name='right_finger_visual'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -788,7 +788,7 @@
</material>
</visual>
<collision name='right_finger_tip_collision'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
+60 -60
View File
@@ -11,9 +11,9 @@
<world name='default'>
<model name='lbr_iiwa_with_wsg50'>
<link name='lbr_iiwa_link_0'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<inertial>
<pose frame=''>-0.1 0 0.07 0 -0 0</pose>
<pose>-0.1 0 0.07 0 -0 0</pose>
<mass>0</mass>
<inertia>
<ixx>0.05</ixx>
@@ -25,7 +25,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_0_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -34,7 +34,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_0_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -50,9 +50,9 @@
</visual>
</link>
<link name='lbr_iiwa_link_1'>
<pose frame=''>0 0 0.1575 0 -0 0</pose>
<pose>0 0 0.1575 0 -0 0</pose>
<inertial>
<pose frame=''>0 -0.03 0.12 0 -0 0</pose>
<pose>0 -0.03 0.12 0 -0 0</pose>
<mass>4</mass>
<inertia>
<ixx>0.1</ixx>
@@ -64,7 +64,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_1_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -73,7 +73,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_1_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -108,9 +108,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_2'>
<pose frame=''>0 0 0.36 1.5708 -0 -3.14159</pose>
<pose>0 0 0.36 1.5708 -0 -3.14159</pose>
<inertial>
<pose frame=''>0.0003 0.059 0.042 0 -0 0</pose>
<pose>0.0003 0.059 0.042 0 -0 0</pose>
<mass>4</mass>
<inertia>
<ixx>0.05</ixx>
@@ -122,7 +122,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_2_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -131,7 +131,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_2_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -166,9 +166,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_3'>
<pose frame=''>0 -0 0.5645 0 0 0</pose>
<pose>0 -0 0.5645 0 0 0</pose>
<inertial>
<pose frame=''>0 0.03 0.13 0 -0 0</pose>
<pose>0 0.03 0.13 0 -0 0</pose>
<mass>3</mass>
<inertia>
<ixx>0.08</ixx>
@@ -180,7 +180,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_3_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -189,7 +189,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_3_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -224,9 +224,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_4'>
<pose frame=''>0 -0 0.78 1.5708 0 0</pose>
<pose>0 -0 0.78 1.5708 0 0</pose>
<inertial>
<pose frame=''>0 0.067 0.034 0 -0 0</pose>
<pose>0 0.067 0.034 0 -0 0</pose>
<mass>2.7</mass>
<inertia>
<ixx>0.03</ixx>
@@ -238,7 +238,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_4_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -247,7 +247,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_4_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -282,9 +282,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_5'>
<pose frame=''>0 -0 0.9645 0 -0 -3.14159</pose>
<pose>0 -0 0.9645 0 -0 -3.14159</pose>
<inertial>
<pose frame=''>0.0001 0.021 0.076 0 -0 0</pose>
<pose>0.0001 0.021 0.076 0 -0 0</pose>
<mass>1.7</mass>
<inertia>
<ixx>0.02</ixx>
@@ -296,7 +296,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_5_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -305,7 +305,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_5_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -340,9 +340,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_6'>
<pose frame=''>0 0 1.18 1.5708 -0 -3.14159</pose>
<pose>0 0 1.18 1.5708 -0 -3.14159</pose>
<inertial>
<pose frame=''>0 0.0006 0.0004 0 -0 0</pose>
<pose>0 0.0006 0.0004 0 -0 0</pose>
<mass>1.8</mass>
<inertia>
<ixx>0.005</ixx>
@@ -354,7 +354,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_6_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -363,7 +363,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_6_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -398,9 +398,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_7'>
<pose frame=''>0 0 1.261 0 0 0</pose>
<pose>0 0 1.261 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.02 0 -0 0</pose>
<pose>0 0 0.02 0 -0 0</pose>
<mass>1.3</mass>
<inertia>
<ixx>0.001</ixx>
@@ -412,7 +412,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_7_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -421,7 +421,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_7_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -468,9 +468,9 @@
<link name='base_link'>
<pose frame=''>0 0 1.305 0 -0 0</pose>
<pose>0 0 1.305 0 -0 0</pose>
<inertial>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>1</ixx>
@@ -482,7 +482,7 @@
</inertia>
</inertial>
<visual name='base_link_visual'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<geometry>
<box>
<size>0.05 0.05 0.1 </size>
@@ -496,7 +496,7 @@
</material>
</visual>
<collision name='base_link_collision'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<geometry>
<box>
<size>0.05 0.05 0.1 </size>
@@ -531,9 +531,9 @@
</axis>
</joint>
<link name='left_finger'>
<pose frame=''>0 0.024 1.35 0 -0.05 0</pose>
<pose>0 0.024 1.35 0 -0.05 0</pose>
<inertial>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -545,7 +545,7 @@
</inertia>
</inertial>
<visual name='left_finger_visual'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<geometry>
<box>
<size>0.01 0.01 0.08</size>
@@ -559,7 +559,7 @@
</material>
</visual>
<collision name='left_finger_collision'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<geometry>
<box>
<size>0.01 0.01 0.08</size>
@@ -577,9 +577,9 @@
<lateral_friction>0.8</lateral_friction>
<spinning_friction>.1</spinning_friction>
</contact>
<pose frame=''>-0.005 0.024 1.43 0 -0.3 0</pose>
<pose>-0.005 0.024 1.43 0 -0.3 0</pose>
<inertial>
<pose frame=''>-0.003 0 0.04 0 0 0 </pose>
<pose>-0.003 0 0.04 0 0 0 </pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -591,7 +591,7 @@
</inertia>
</inertial>
<visual name='left_finger_base_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -606,7 +606,7 @@
</material>
</visual>
<collision name='left_finger_base_collision'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -639,9 +639,9 @@
<lateral_friction>0.8</lateral_friction>
<spinning_friction>.1</spinning_friction>
</contact>
<pose frame=''>-0.02 0.024 1.49 0 0.2 0</pose>
<pose>-0.02 0.024 1.49 0 0.2 0</pose>
<inertial>
<pose frame=''>-0.005 0 0.026 0 0 0 </pose>
<pose>-0.005 0 0.026 0 0 0 </pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -653,7 +653,7 @@
</inertia>
</inertial>
<visual name='left_finger_tip_visual'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -668,7 +668,7 @@
</material>
</visual>
<collision name='left_finger_tip_collision'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -701,9 +701,9 @@
<lateral_friction>0.8</lateral_friction>
<spinning_friction>.1</spinning_friction>
</contact>
<pose frame=''>0 0.024 1.35 0 0.05 0</pose>
<pose>0 0.024 1.35 0 0.05 0</pose>
<inertial>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -715,7 +715,7 @@
</inertia>
</inertial>
<visual name='right_finger_visual'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<geometry>
<box>
<size>0.01 0.01 0.08</size>
@@ -729,7 +729,7 @@
</material>
</visual>
<collision name='right_finger_collision'>
<pose frame=''>0 0 0.04 0 0 0</pose>
<pose>0 0 0.04 0 0 0</pose>
<geometry>
<box>
<size>0.01 0.01 0.08</size>
@@ -752,9 +752,9 @@
<lateral_friction>0.8</lateral_friction>
<spinning_friction>.1</spinning_friction>
</contact>
<pose frame=''>0.005 0.024 1.43 0 0.3 0</pose>
<pose>0.005 0.024 1.43 0 0.3 0</pose>
<inertial>
<pose frame=''>0.003 0 0.04 0 0 0 </pose>
<pose>0.003 0 0.04 0 0 0 </pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -766,7 +766,7 @@
</inertia>
</inertial>
<visual name='right_finger_base_visual'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -781,7 +781,7 @@
</material>
</visual>
<collision name='right_finger_base_collision'>
<pose frame=''>0 0 0 0 0 0 </pose>
<pose>0 0 0 0 0 0 </pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -814,9 +814,9 @@
<lateral_friction>0.8</lateral_friction>
<spinning_friction>.1</spinning_friction>
</contact>
<pose frame=''>0.02 0.024 1.49 0 -0.2 0</pose>
<pose>0.02 0.024 1.49 0 -0.2 0</pose>
<inertial>
<pose frame=''>0.005 0 0.026 0 0 0 </pose>
<pose>0.005 0 0.026 0 0 0 </pose>
<mass>0.2</mass>
<inertia>
<ixx>0.1</ixx>
@@ -828,7 +828,7 @@
</inertia>
</inertial>
<visual name='right_finger_visual'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
@@ -843,7 +843,7 @@
</material>
</visual>
<collision name='right_finger_tip_collision'>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<geometry>
<mesh>
<scale>1 1 1 </scale>
+32 -32
View File
@@ -6,9 +6,9 @@
<child>lbr_iiwa_link_0</child>
</joint>
<link name='lbr_iiwa_link_0'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<inertial>
<pose frame=''>-0.1 0 0.07 0 -0 0</pose>
<pose>-0.1 0 0.07 0 -0 0</pose>
<mass>0.01</mass>
<inertia>
<ixx>0.05</ixx>
@@ -20,7 +20,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_0_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -29,7 +29,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_0_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -39,9 +39,9 @@
</visual>
</link>
<link name='lbr_iiwa_link_1'>
<pose frame=''>0 0 0.1575 0 -0 0</pose>
<pose>0 0 0.1575 0 -0 0</pose>
<inertial>
<pose frame=''>0 -0.03 0.12 0 -0 0</pose>
<pose>0 -0.03 0.12 0 -0 0</pose>
<mass>4</mass>
<inertia>
<ixx>0.1</ixx>
@@ -53,7 +53,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_1_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -62,7 +62,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_1_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -92,9 +92,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_2'>
<pose frame=''>0 0 0.36 1.5708 -0 -3.14159</pose>
<pose>0 0 0.36 1.5708 -0 -3.14159</pose>
<inertial>
<pose frame=''>0.0003 0.059 0.042 0 -0 0</pose>
<pose>0.0003 0.059 0.042 0 -0 0</pose>
<mass>4</mass>
<inertia>
<ixx>0.05</ixx>
@@ -106,7 +106,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_2_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -115,7 +115,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_2_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -145,9 +145,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_3'>
<pose frame=''>0 -0 0.5645 0 0 0</pose>
<pose>0 -0 0.5645 0 0 0</pose>
<inertial>
<pose frame=''>0 0.03 0.13 0 -0 0</pose>
<pose>0 0.03 0.13 0 -0 0</pose>
<mass>3</mass>
<inertia>
<ixx>0.08</ixx>
@@ -159,7 +159,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_3_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -168,7 +168,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_3_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -198,9 +198,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_4'>
<pose frame=''>0 -0 0.78 1.5708 0 0</pose>
<pose>0 -0 0.78 1.5708 0 0</pose>
<inertial>
<pose frame=''>0 0.067 0.034 0 -0 0</pose>
<pose>0 0.067 0.034 0 -0 0</pose>
<mass>2.7</mass>
<inertia>
<ixx>0.03</ixx>
@@ -212,7 +212,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_4_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -221,7 +221,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_4_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -251,9 +251,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_5'>
<pose frame=''>0 -0 0.9645 0 -0 -3.14159</pose>
<pose>0 -0 0.9645 0 -0 -3.14159</pose>
<inertial>
<pose frame=''>0.0001 0.021 0.076 0 -0 0</pose>
<pose>0.0001 0.021 0.076 0 -0 0</pose>
<mass>1.7</mass>
<inertia>
<ixx>0.02</ixx>
@@ -265,7 +265,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_5_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -274,7 +274,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_5_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -304,9 +304,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_6'>
<pose frame=''>0 0 1.18 1.5708 -0 -3.14159</pose>
<pose>0 0 1.18 1.5708 -0 -3.14159</pose>
<inertial>
<pose frame=''>0 0.0006 0.0004 0 -0 0</pose>
<pose>0 0.0006 0.0004 0 -0 0</pose>
<mass>1.8</mass>
<inertia>
<ixx>0.005</ixx>
@@ -318,7 +318,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_6_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -327,7 +327,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_6_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -357,9 +357,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_7'>
<pose frame=''>0 0 1.261 0 0 0</pose>
<pose>0 0 1.261 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.02 0 -0 0</pose>
<pose>0 0 0.02 0 -0 0</pose>
<mass>0.3</mass>
<inertia>
<ixx>0.001</ixx>
@@ -371,7 +371,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_7_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -380,7 +380,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_7_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
+33 -33
View File
@@ -1,11 +1,11 @@
<sdf version='1.6'>
<world name='default'>
<model name='lbr_iiwa'>
<pose frame=''>0 -2.3 0.7 0 0 0</pose>
<pose>0 -2.3 0.7 0 0 0</pose>
<link name='lbr_iiwa_link_0'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<inertial>
<pose frame=''>-0.1 0 0.07 0 -0 0</pose>
<pose>-0.1 0 0.07 0 -0 0</pose>
<mass>0</mass>
<inertia>
<ixx>0.05</ixx>
@@ -17,7 +17,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_0_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -26,7 +26,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_0_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -42,9 +42,9 @@
</visual>
</link>
<link name='lbr_iiwa_link_1'>
<pose frame=''>0 0 0.1575 0 -0 0</pose>
<pose>0 0 0.1575 0 -0 0</pose>
<inertial>
<pose frame=''>0 -0.03 0.12 0 -0 0</pose>
<pose>0 -0.03 0.12 0 -0 0</pose>
<mass>4</mass>
<inertia>
<ixx>0.1</ixx>
@@ -56,7 +56,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_1_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -65,7 +65,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_1_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -101,9 +101,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_2'>
<pose frame=''>0 0 0.36 1.5708 -0 -3.14159</pose>
<pose>0 0 0.36 1.5708 -0 -3.14159</pose>
<inertial>
<pose frame=''>0.0003 0.059 0.042 0 -0 0</pose>
<pose>0.0003 0.059 0.042 0 -0 0</pose>
<mass>4</mass>
<inertia>
<ixx>0.05</ixx>
@@ -115,7 +115,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_2_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -124,7 +124,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_2_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -160,9 +160,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_3'>
<pose frame=''>0 -0 0.5645 0 0 0</pose>
<pose>0 -0 0.5645 0 0 0</pose>
<inertial>
<pose frame=''>0 0.03 0.13 0 -0 0</pose>
<pose>0 0.03 0.13 0 -0 0</pose>
<mass>3</mass>
<inertia>
<ixx>0.08</ixx>
@@ -174,7 +174,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_3_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -183,7 +183,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_3_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -219,9 +219,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_4'>
<pose frame=''>0 -0 0.78 1.5708 0 0</pose>
<pose>0 -0 0.78 1.5708 0 0</pose>
<inertial>
<pose frame=''>0 0.067 0.034 0 -0 0</pose>
<pose>0 0.067 0.034 0 -0 0</pose>
<mass>2.7</mass>
<inertia>
<ixx>0.03</ixx>
@@ -233,7 +233,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_4_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -242,7 +242,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_4_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -278,9 +278,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_5'>
<pose frame=''>0 -0 0.9645 0 -0 -3.14159</pose>
<pose>0 -0 0.9645 0 -0 -3.14159</pose>
<inertial>
<pose frame=''>0.0001 0.021 0.076 0 -0 0</pose>
<pose>0.0001 0.021 0.076 0 -0 0</pose>
<mass>1.7</mass>
<inertia>
<ixx>0.02</ixx>
@@ -292,7 +292,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_5_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -301,7 +301,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_5_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -337,9 +337,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_6'>
<pose frame=''>0 0 1.18 1.5708 -0 -3.14159</pose>
<pose>0 0 1.18 1.5708 -0 -3.14159</pose>
<inertial>
<pose frame=''>0 0.0006 0.0004 0 -0 0</pose>
<pose>0 0.0006 0.0004 0 -0 0</pose>
<mass>1.8</mass>
<inertia>
<ixx>0.005</ixx>
@@ -351,7 +351,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_6_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -360,7 +360,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_6_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -396,9 +396,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_7'>
<pose frame=''>0 0 1.261 0 0 0</pose>
<pose>0 0 1.261 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.02 0 -0 0</pose>
<pose>0 0 0.02 0 -0 0</pose>
<mass>0.3</mass>
<inertia>
<ixx>0.001</ixx>
@@ -410,7 +410,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_7_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -419,7 +419,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_7_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
+65 -65
View File
@@ -2,9 +2,9 @@
<world name='default'>
<model name='lbr_iiwa'>
<link name='lbr_iiwa_link_0'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<inertial>
<pose frame=''>-0.1 0 0.07 0 -0 0</pose>
<pose>-0.1 0 0.07 0 -0 0</pose>
<mass>0</mass>
<inertia>
<ixx>0.05</ixx>
@@ -16,7 +16,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_0_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -25,7 +25,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_0_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -35,9 +35,9 @@
</visual>
</link>
<link name='lbr_iiwa_link_1'>
<pose frame=''>0 0 0.1575 0 -0 0</pose>
<pose>0 0 0.1575 0 -0 0</pose>
<inertial>
<pose frame=''>0 -0.03 0.12 0 -0 0</pose>
<pose>0 -0.03 0.12 0 -0 0</pose>
<mass>4</mass>
<inertia>
<ixx>0.1</ixx>
@@ -49,7 +49,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_1_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -58,7 +58,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_1_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -88,9 +88,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_2'>
<pose frame=''>0 0 0.36 1.5708 -0 -3.14159</pose>
<pose>0 0 0.36 1.5708 -0 -3.14159</pose>
<inertial>
<pose frame=''>0.0003 0.059 0.042 0 -0 0</pose>
<pose>0.0003 0.059 0.042 0 -0 0</pose>
<mass>4</mass>
<inertia>
<ixx>0.05</ixx>
@@ -102,7 +102,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_2_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -111,7 +111,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_2_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -141,9 +141,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_3'>
<pose frame=''>0 -0 0.5645 0 0 0</pose>
<pose>0 -0 0.5645 0 0 0</pose>
<inertial>
<pose frame=''>0 0.03 0.13 0 -0 0</pose>
<pose>0 0.03 0.13 0 -0 0</pose>
<mass>3</mass>
<inertia>
<ixx>0.08</ixx>
@@ -155,7 +155,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_3_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -164,7 +164,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_3_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -194,9 +194,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_4'>
<pose frame=''>0 -0 0.78 1.5708 0 0</pose>
<pose>0 -0 0.78 1.5708 0 0</pose>
<inertial>
<pose frame=''>0 0.067 0.034 0 -0 0</pose>
<pose>0 0.067 0.034 0 -0 0</pose>
<mass>2.7</mass>
<inertia>
<ixx>0.03</ixx>
@@ -208,7 +208,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_4_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -217,7 +217,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_4_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -247,9 +247,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_5'>
<pose frame=''>0 -0 0.9645 0 -0 -3.14159</pose>
<pose>0 -0 0.9645 0 -0 -3.14159</pose>
<inertial>
<pose frame=''>0.0001 0.021 0.076 0 -0 0</pose>
<pose>0.0001 0.021 0.076 0 -0 0</pose>
<mass>1.7</mass>
<inertia>
<ixx>0.02</ixx>
@@ -261,7 +261,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_5_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -270,7 +270,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_5_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -300,9 +300,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_6'>
<pose frame=''>0 0 1.18 1.5708 -0 -3.14159</pose>
<pose>0 0 1.18 1.5708 -0 -3.14159</pose>
<inertial>
<pose frame=''>0 0.0006 0.0004 0 -0 0</pose>
<pose>0 0.0006 0.0004 0 -0 0</pose>
<mass>1.8</mass>
<inertia>
<ixx>0.005</ixx>
@@ -314,7 +314,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_6_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -323,7 +323,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_6_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -353,9 +353,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_7'>
<pose frame=''>0 0 1.261 0 0 0</pose>
<pose>0 0 1.261 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.02 0 -0 0</pose>
<pose>0 0 0.02 0 -0 0</pose>
<mass>0.3</mass>
<inertia>
<ixx>0.001</ixx>
@@ -367,7 +367,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_7_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -376,7 +376,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_7_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -408,11 +408,11 @@
</model>
<model name='lbr_iiwa'>
<pose frame=''>2 2 0 0 -0 0</pose>
<pose>2 2 0 0 -0 0</pose>
<link name='lbr_iiwa_link_0'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<inertial>
<pose frame=''>-0.1 0 0.07 0 -0 0</pose>
<pose>-0.1 0 0.07 0 -0 0</pose>
<mass>0</mass>
<inertia>
<ixx>0.05</ixx>
@@ -424,7 +424,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_0_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -433,7 +433,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_0_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -443,9 +443,9 @@
</visual>
</link>
<link name='lbr_iiwa_link_1'>
<pose frame=''>0 0 0.1575 0 -0 0</pose>
<pose>0 0 0.1575 0 -0 0</pose>
<inertial>
<pose frame=''>0 -0.03 0.12 0 -0 0</pose>
<pose>0 -0.03 0.12 0 -0 0</pose>
<mass>4</mass>
<inertia>
<ixx>0.1</ixx>
@@ -457,7 +457,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_1_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -466,7 +466,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_1_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -496,9 +496,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_2'>
<pose frame=''>0 0 0.36 1.5708 -0 -3.14159</pose>
<pose>0 0 0.36 1.5708 -0 -3.14159</pose>
<inertial>
<pose frame=''>0.0003 0.059 0.042 0 -0 0</pose>
<pose>0.0003 0.059 0.042 0 -0 0</pose>
<mass>4</mass>
<inertia>
<ixx>0.05</ixx>
@@ -510,7 +510,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_2_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -519,7 +519,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_2_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -549,9 +549,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_3'>
<pose frame=''>0 -0 0.5645 0 0 0</pose>
<pose>0 -0 0.5645 0 0 0</pose>
<inertial>
<pose frame=''>0 0.03 0.13 0 -0 0</pose>
<pose>0 0.03 0.13 0 -0 0</pose>
<mass>3</mass>
<inertia>
<ixx>0.08</ixx>
@@ -563,7 +563,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_3_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -572,7 +572,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_3_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -602,9 +602,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_4'>
<pose frame=''>0 -0 0.78 1.5708 0 0</pose>
<pose>0 -0 0.78 1.5708 0 0</pose>
<inertial>
<pose frame=''>0 0.067 0.034 0 -0 0</pose>
<pose>0 0.067 0.034 0 -0 0</pose>
<mass>2.7</mass>
<inertia>
<ixx>0.03</ixx>
@@ -616,7 +616,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_4_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -625,7 +625,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_4_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -655,9 +655,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_5'>
<pose frame=''>0 -0 0.9645 0 -0 -3.14159</pose>
<pose>0 -0 0.9645 0 -0 -3.14159</pose>
<inertial>
<pose frame=''>0.0001 0.021 0.076 0 -0 0</pose>
<pose>0.0001 0.021 0.076 0 -0 0</pose>
<mass>1.7</mass>
<inertia>
<ixx>0.02</ixx>
@@ -669,7 +669,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_5_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -678,7 +678,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_5_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -708,9 +708,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_6'>
<pose frame=''>0 0 1.18 1.5708 -0 -3.14159</pose>
<pose>0 0 1.18 1.5708 -0 -3.14159</pose>
<inertial>
<pose frame=''>0 0.0006 0.0004 0 -0 0</pose>
<pose>0 0.0006 0.0004 0 -0 0</pose>
<mass>1.8</mass>
<inertia>
<ixx>0.005</ixx>
@@ -722,7 +722,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_6_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -731,7 +731,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_6_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -761,9 +761,9 @@
</axis>
</joint>
<link name='lbr_iiwa_link_7'>
<pose frame=''>0 0 1.261 0 0 0</pose>
<pose>0 0 1.261 0 0 0</pose>
<inertial>
<pose frame=''>0 0 0.02 0 -0 0</pose>
<pose>0 0 0.02 0 -0 0</pose>
<mass>0.3</mass>
<inertia>
<ixx>0.001</ixx>
@@ -775,7 +775,7 @@
</inertia>
</inertial>
<collision name='lbr_iiwa_link_7_collision'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
@@ -784,7 +784,7 @@
</geometry>
</collision>
<visual name='lbr_iiwa_link_7_visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<geometry>
<mesh>
<scale>1 1 1</scale>
Binary file not shown.
Binary file not shown.
Binary file not shown.
+83
View File
@@ -0,0 +1,83 @@
#vtk DataFile Version 2.0
I don't think this matters
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 28 double
-0.5000000000000000 -0.2500000000000000 -2.0000000000000000
-0.5000000000000000 0.2500000000000000 -2.0000000000000000
0.5000000000000000 -0.2500000000000000 -2.0000000000000000
0.5000000000000000 0.2500000000000000 -2.0000000000000000
-0.5000000000000000 -0.2500000000000000 2.0000000000000000
-0.5000000000000000 0.2500000000000000 2.0000000000000000
0.5000000000000000 -0.2500000000000000 2.0000000000000000
0.5000000000000000 0.2500000000000000 2.0000000000000000
-0.5000000000000000 -0.2500000000000000 1.0000000000000000
-0.5000000000000000 -0.2500000000000000 0.0000000000000000
-0.5000000000000000 -0.2500000000000000 -1.0000000000000000
0.5000000000000000 -0.2500000000000000 -1.0000000000000000
0.5000000000000000 -0.2500000000000000 0.0000000000000000
0.5000000000000000 -0.2500000000000000 1.0000000000000000
-0.5000000000000000 0.2500000000000000 1.0000000000000000
-0.5000000000000000 0.2500000000000000 0.0000000000000000
-0.5000000000000000 0.2500000000000000 -1.0000000000000000
0.5000000000000000 0.2500000000000000 1.0000000000000000
0.5000000000000000 0.2500000000000000 0.0000000000000000
0.5000000000000000 0.2500000000000000 -1.0000000000000000
0.0000000000000000 -0.2500000000000000 -1.5000000000000000
0.0000000000000000 -0.2500000000000000 -0.5000000000000000
0.0000000000000000 -0.2500000000000000 0.5000000000000000
0.0000000000000000 -0.2500000000000000 1.5000000000000000
0.0000000000000000 0.2500000000000000 1.5000000000000000
0.0000000000000000 0.2500000000000000 0.5000000000000000
0.0000000000000000 0.2500000000000000 -0.5000000000000000
0.0000000000000000 0.2500000000000000 -1.5000000000000000
CELLS 48 192
4 22 12 17 13
4 20 26 21 11
4 23 8 5 24
4 11 27 26 19
4 27 11 26 20
4 17 22 24 25
4 7 23 13 6
4 22 17 24 13
4 9 25 21 15
4 24 22 8 14
4 24 8 22 23
4 25 9 21 22
4 23 7 13 24
4 15 10 16 26
4 14 25 9 15
4 25 14 9 22
4 24 23 22 13
4 15 10 21 9
4 15 21 10 26
4 24 25 22 14
4 2 11 27 20
4 7 5 23 6
4 11 21 12 26
4 20 1 0 16
4 18 25 12 17
4 18 12 25 26
4 5 7 23 24
4 26 21 25 15
4 20 16 27 1
4 21 25 22 12
4 20 16 10 26
4 20 27 16 26
4 20 10 16 0
4 11 12 19 26
4 14 22 8 9
4 8 23 5 4
4 24 14 8 5
4 11 2 27 3
4 2 27 1 20
4 12 18 19 26
4 27 2 1 3
4 24 13 17 7
4 20 2 0 1
4 5 23 6 4
4 20 10 21 26
4 12 22 17 25
4 3 27 11 19
4 21 26 25 12
CELL_TYPES 10
+83
View File
@@ -0,0 +1,83 @@
#vtk DataFile Version 2.0
I don't think this matters
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 28 double
0.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.5000000000000000 0.0000000000000000
1.0000000000000000 0.0000000000000000 0.0000000000000000
1.0000000000000000 0.5000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 4.0000000000000000
0.0000000000000000 0.5000000000000000 4.0000000000000000
1.0000000000000000 0.0000000000000000 4.0000000000000000
1.0000000000000000 0.5000000000000000 4.0000000000000000
0.0000000000000000 0.0000000000000000 3.0000000000000000
0.0000000000000000 0.0000000000000000 2.0000000000000000
0.0000000000000000 0.0000000000000000 1.0000000000000000
1.0000000000000000 0.0000000000000000 1.0000000000000000
1.0000000000000000 0.0000000000000000 2.0000000000000000
1.0000000000000000 0.0000000000000000 3.0000000000000000
0.0000000000000000 0.5000000000000000 3.0000000000000000
0.0000000000000000 0.5000000000000000 2.0000000000000000
0.0000000000000000 0.5000000000000000 1.0000000000000000
1.0000000000000000 0.5000000000000000 3.0000000000000000
1.0000000000000000 0.5000000000000000 2.0000000000000000
1.0000000000000000 0.5000000000000000 1.0000000000000000
0.5000000000000000 0.0000000000000000 0.5000000000000000
0.5000000000000000 0.0000000000000000 1.5000000000000000
0.5000000000000000 0.0000000000000000 2.5000000000000000
0.5000000000000000 0.0000000000000000 3.5000000000000000
0.5000000000000000 0.5000000000000000 3.5000000000000000
0.5000000000000000 0.5000000000000000 2.5000000000000000
0.5000000000000000 0.5000000000000000 1.5000000000000000
0.5000000000000000 0.5000000000000000 0.5000000000000000
CELLS 48 192
4 22 12 17 13
4 20 26 21 11
4 23 8 5 24
4 11 27 26 19
4 27 11 26 20
4 17 22 24 25
4 7 23 13 6
4 22 17 24 13
4 9 25 21 15
4 24 22 8 14
4 24 8 22 23
4 25 9 21 22
4 23 7 13 24
4 15 10 16 26
4 14 25 9 15
4 25 14 9 22
4 24 23 22 13
4 15 10 21 9
4 15 21 10 26
4 24 25 22 14
4 2 11 27 20
4 7 5 23 6
4 11 21 12 26
4 20 1 0 16
4 18 25 12 17
4 18 12 25 26
4 5 7 23 24
4 26 21 25 15
4 20 16 27 1
4 21 25 22 12
4 20 16 10 26
4 20 27 16 26
4 20 10 16 0
4 11 12 19 26
4 14 22 8 9
4 8 23 5 4
4 24 14 8 5
4 11 2 27 3
4 2 27 1 20
4 12 18 19 26
4 27 2 1 3
4 24 13 17 7
4 20 2 0 1
4 5 23 6 4
4 20 10 21 26
4 12 22 17 25
4 3 27 11 19
4 21 26 25 12
CELL_TYPES 10
Binary file not shown.
Binary file not shown.
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<robot name="reduced_cube">
<reduced_deformable name="reduced_beam">
<num_modes value="20"/>
<mass value="1"/>
<stiffness_scale value="100"/>
<collision_margin value="0.01"/>
<erp value= "0.2"/>
<cfm value= "0.2"/>
<friction value= "0.5"/>
<damping_coefficient value="0.0"/>
<visual filename="beam_mesh_origin.vtk"/>
</reduced_deformable>
</robot>
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<robot name="cube">
<deformable name="cube">
<inertial>
<mass value="10" />
<inertia ixx="0.0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0" />
</inertial>
<collision_margin value="0.006"/>
<repulsion_stiffness value="800.0"/>
<friction value= "0.5"/>
<neohookean mu= "180" lambda= "600" damping= "0.01" />
<visual filename="cube_mesh.vtk"/>
</deformable>
</robot>
Binary file not shown.
Binary file not shown.
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<robot name="reduced_cube">
<reduced_deformable name="reduced_cube">
<num_modes value="20"/>
<mass value="10"/>
<stiffness_scale value="100"/>
<collision_margin value="0.01"/>
<erp value= "0.2"/>
<cfm value= "0.2"/>
<friction value= "0.5"/>
<damping_coefficient value="0.0"/>
<visual filename="cube_mesh.vtk"/>
</reduced_deformable>
</robot>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<robot name="reduced_cube">
<reduced_deformable name="reduced_cube">
<num_modes value="20"/>
<mass value="10"/>
<stiffness_scale value="10"/>
<collision_margin value="0.01"/>
<erp value= "0.2"/>
<cfm value= "0.2"/>
<friction value= "0.5"/>
<damping_coefficient value="0.00001"/>
<visual filename="torus_textured.obj"/>
<collision filename="torus_mesh.vtk"/>
</reduced_deformable>
</robot>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -3,7 +3,7 @@
<gravity>0 0 -9.8</gravity>
<model name='roboschool/models_outdoor/stadium/part0.obj'>
<static>1</static>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<link name='link_d0'>
<inertial>
<mass>0</mass>
@@ -34,7 +34,7 @@
</model>
<model name='roboschool/models_outdoor/stadium/part1.obj'>
<static>1</static>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<link name='link_d1'>
<inertial>
<mass>0</mass>
@@ -73,7 +73,7 @@
</model>
<model name='part2.obj'>
<static>1</static>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<link name='link_d2'>
<inertial>
<mass>0</mass>
+3 -3
View File
@@ -3,7 +3,7 @@
<gravity>0 0 -9.8</gravity>
<model name='part0.obj'>
<static>1</static>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<link name='link_d0'>
<inertial>
<mass>0</mass>
@@ -42,7 +42,7 @@
</model>
<model name='part1.obj'>
<static>1</static>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<link name='link_d1'>
<inertial>
<mass>0</mass>
@@ -81,7 +81,7 @@
</model>
<model name='part2.obj'>
<static>1</static>
<pose frame=''>0 0 0 0 0 0</pose>
<pose>0 0 0 0 0 0</pose>
<link name='link_d2'>
<inertial>
<mass>0</mass>
+11 -11
View File
@@ -3,7 +3,7 @@
<light name='sun' type='directional'>
<yunfei>99.2</yunfei>
<cast_shadows>1</cast_shadows>
<pose frame=''>0 0 10 0 -0 0</pose>
<pose>0 0 10 0 -0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<attenuation>
@@ -87,7 +87,7 @@
</spherical_coordinates>
<model name='unit_box_0'>
<static>1</static>
<pose frame=''>0.512455 -1.58317 0.5 0 -0 0</pose>
<pose>0.512455 -1.58317 0.5 0 -0 0</pose>
<link name='unit_box_0::link'>
<inertial>
@@ -142,7 +142,7 @@
</link>
</model>
<model name='unit_box_0_clone'>
<pose frame=''>0.105158 -4.55002 1.499995 -2.89297 -0.988287 -3.14159</pose>
<pose>0.105158 -4.55002 1.499995 -2.89297 -0.988287 -3.14159</pose>
<link name='unit_box_0::link'>
<inertial>
<mass>1</mass>
@@ -197,42 +197,42 @@
<wall_time>1462824251 956472000</wall_time>
<iterations>0</iterations>
<model name='ground_plane'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<scale>1 1 1</scale>
<link name='link'>
<pose frame=''>0 0 0 0 -0 0</pose>
<pose>0 0 0 0 -0 0</pose>
<velocity>0 0 0 0 -0 0</velocity>
<acceleration>0 0 0 0 -0 0</acceleration>
<wrench>0 0 0 0 -0 0</wrench>
</link>
</model>
<model name='unit_box_0'>
<pose frame=''>0.223196 -1.84719 0.499995 -2.89297 -0.988287 -3.14159</pose>
<pose>0.223196 -1.84719 0.499995 -2.89297 -0.988287 -3.14159</pose>
<scale>1 1 1</scale>
<link name='unit_box_0::link'>
<pose frame=''>0.223196 -1.84719 0.499995 -2.89297 -0.988287 -3.14159</pose>
<pose>0.223196 -1.84719 0.499995 -2.89297 -0.988287 -3.14159</pose>
<velocity>0.004896 3e-06 -0.004891 -6e-06 0.009793 -0</velocity>
<acceleration>0.010615 0.006191 -9.78231 -0.012424 0.021225 -1.8e-05</acceleration>
<wrench>0.010615 0.006191 -9.78231 0 -0 0</wrench>
</link>
</model>
<model name='unit_box_0_clone'>
<pose frame=''>0.105158 -4.55002 0.499995 -2.89297 -0.988287 -3.14159</pose>
<pose>0.105158 -4.55002 0.499995 -2.89297 -0.988287 -3.14159</pose>
<scale>1 1 1</scale>
<link name='unit_box_0::link'>
<pose frame=''>0.105158 -4.55002 0.499995 -2.89297 -0.988287 -3.14159</pose>
<pose>0.105158 -4.55002 0.499995 -2.89297 -0.988287 -3.14159</pose>
<velocity>0 0 0 0 -0 0</velocity>
<acceleration>0 0 0 0 -0 0</acceleration>
<wrench>0 0 0 0 -0 0</wrench>
</link>
</model>
<light name='sun'>
<pose frame=''>0 0 10 0 -0 0</pose>
<pose>0 0 10 0 -0 0</pose>
</light>
</state>
<gui fullscreen='0'>
<camera name='user_camera'>
<pose frame=''>8.0562 -8.87312 3.07529 0 0.205021 2.5208</pose>
<pose>8.0562 -8.87312 3.07529 0 0.205021 2.5208</pose>
<view_controller>orbit</view_controller>
<projection_type>perspective</projection_type>
</camera>
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
@@ -52,6 +52,8 @@ struct GUIHelperInterface
virtual int getShapeIndexFromInstance(int instanceUid) { return -1; }
virtual void replaceTexture(int shapeIndex, int textureUid) {}
virtual void removeTexture(int textureUid) {}
virtual void setBackgroundColor(const double rgbBackground[3]) {}
virtual Common2dCanvasInterface* get2dCanvasInterface() = 0;
@@ -110,6 +112,7 @@ struct GUIHelperInterface
virtual int addUserDebugText3D(const char* txt, const double positionXYZ[3], const double orientation[4], const double textColorRGB[3], double size, double lifeTime, int trackingVisualShapeIndex, int optionFlags, int replaceItemUid) { return -1; }
virtual int addUserDebugLine(const double debugLineFromXYZ[3], const double debugLineToXYZ[3], const double debugLineColorRGB[3], double lineWidth, double lifeTime, int trackingVisualShapeIndex, int replaceItemUid) { return -1; };
virtual int addUserDebugPoints(const double debugPointPositionXYZ[], const double debugPointColorRGB[3], double pointSize, double lifeTime, int trackingVisualShapeIndex, int replaceItemUid, int debugPointNum) { return -1; };
virtual int addUserDebugParameter(const char* txt, double rangeMin, double rangeMax, double startValue) { return -1; };
virtual int readUserDebugParameter(int itemUniqueId, double* value) { return 0; }
@@ -217,6 +220,10 @@ struct DummyGUIHelper : public GUIHelperInterface
{
return -1;
}
virtual int addUserDebugPoints(const double debugPointPositionXYZ[3], const double debugPointColorRGB[3], double pointSize, double lifeTime, int trackingVisualShapeIndex, int replaceItemUid, int debugPointNum)
{
return -1;
};
virtual void removeUserDebugItem(int debugItemUniqueId)
{
}
@@ -56,6 +56,8 @@ struct CommonRenderInterface
virtual void setLightPosition(const float lightPos[3]) = 0;
virtual void setLightPosition(const double lightPos[3]) = 0;
virtual void setBackgroundColor(const double rgbBackground[3]) = 0;
virtual void setShadowMapResolution(int shadowMapResolution) = 0;
virtual void setShadowMapIntensity(double shadowMapIntensity) = 0;
@@ -78,6 +80,7 @@ struct CommonRenderInterface
virtual void drawLine(const double from[4], const double to[4], const double color[4], double lineWidth) = 0;
virtual void drawPoint(const float* position, const float color[4], float pointDrawSize) = 0;
virtual void drawPoint(const double* position, const double color[4], double pointDrawSize) = 0;
virtual void drawPoints(const float* positions, const float* colors, int numPoints, int pointStrideInBytes, float pointDrawSize) = 0;
virtual void drawTexturedTriangleMesh(float worldPosition[3], float worldOrientation[4], const float* vertices, int numvertices, const unsigned int* indices, int numIndices, float color[4], int textureIndex = -1, int vertexLayout = 0) = 0;
virtual int registerShape(const float* vertices, int numvertices, const int* indices, int numIndices, int primitiveType = B3_GL_TRIANGLES, int textureIndex = -1) = 0;
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2015 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2015 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
@@ -55,7 +55,7 @@ public:
m_dynamicsWorld->stepSimulation(deltaTime, 4, internalTimeStep);
}
void addCloth(btVector3 origin);
void addCloth(const btVector3& origin);
virtual void renderScene()
{
@@ -126,7 +126,7 @@ void DeformableSelfCollision::initPhysics()
getDeformableDynamicsWorld()->setLineSearch(false);
m_guiHelper->autogenerateGraphicsObjects(m_dynamicsWorld);
}
void DeformableSelfCollision::addCloth(btVector3 origin)
void DeformableSelfCollision::addCloth(const btVector3& origin)
// create a piece of cloth
{
const btScalar s = 0.6;
+405
View File
@@ -0,0 +1,405 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2019 Google Inc. http://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "LoadDeformed.h"
///btBulletDynamicsCommon.h is the main Bullet include file, contains most common include files.
#include "btBulletDynamicsCommon.h"
#include "BulletSoftBody/btDeformableMultiBodyDynamicsWorld.h"
#include "BulletSoftBody/btSoftBody.h"
#include "BulletSoftBody/btSoftBodyHelpers.h"
#include "BulletSoftBody/btDeformableBodySolver.h"
#include "BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h"
#include "BulletDynamics/Featherstone/btMultiBodyConstraintSolver.h"
#include "../CommonInterfaces/CommonParameterInterface.h"
#include <stdio.h> //printf debugging
#include "../CommonInterfaces/CommonDeformableBodyBase.h"
#include "../Utils/b3ResourcePath.h"
#include "../Utils/b3BulletDefaultFileIO.h"
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string.h>
struct CustomSoftBodyHelper : public btSoftBodyHelpers
{
static std::string loadDeformableState(btAlignedObjectArray<btVector3>& qs, btAlignedObjectArray<btVector3>& vs, const char* filename, CommonFileIOInterface* fileIO);
};
static inline bool isSpace(const char c)
{
return (c == ' ') || (c == '\t');
}
static inline bool isNewLine(const char c)
{
return (c == '\r') || (c == '\n') || (c == '\0');
}
static inline float parseFloat(const char*& token)
{
token += strspn(token, " \t");
float f = (float)atof(token);
token += strcspn(token, " \t\r");
return f;
}
static inline void parseFloat3(
float& x, float& y, float& z,
const char*& token)
{
x = parseFloat(token);
y = parseFloat(token);
z = parseFloat(token);
}
std::string CustomSoftBodyHelper::loadDeformableState(btAlignedObjectArray<btVector3>& qs, btAlignedObjectArray<btVector3>& vs, const char* filename, CommonFileIOInterface* fileIO)
{
{
qs.clear();
vs.clear();
std::string tmp = filename;
std::stringstream err;
#ifdef USE_STREAM
std::ifstream ifs(filename);
if (!ifs)
{
err << "Cannot open file [" << filename << "]" << std::endl;
return err.str();
}
#else
int fileHandle = fileIO->fileOpen(filename, "r");
if (fileHandle < 0)
{
err << "Cannot open file [" << filename << "]" << std::endl;
return err.str();
}
#endif
std::string name;
int maxchars = 8192; // Alloc enough size.
std::vector<char> buf(maxchars); // Alloc enough size.
std::string linebuf;
linebuf.reserve(maxchars);
#ifdef USE_STREAM
while (ifs.peek() != -1)
#else
char* line = 0;
do
#endif
{
linebuf.resize(0);
#ifdef USE_STREAM
safeGetline(ifs, linebuf);
#else
char tmpBuf[1024];
line = fileIO->readLine(fileHandle, tmpBuf, 1024);
if (line)
{
linebuf = line;
}
#endif
// Trim newline '\r\n' or '\r'
if (linebuf.size() > 0)
{
if (linebuf[linebuf.size() - 1] == '\n') linebuf.erase(linebuf.size() - 1);
}
if (linebuf.size() > 0)
{
if (linebuf[linebuf.size() - 1] == '\n') linebuf.erase(linebuf.size() - 1);
}
// Skip if empty line.
if (linebuf.empty())
{
continue;
}
// Skip leading space.
const char* token = linebuf.c_str();
token += strspn(token, " \t");
btAssert(token);
if (token[0] == '\0') continue; // empty line
if (token[0] == '#') continue; // comment line
// q
if (token[0] == 'q' && isSpace((token[1])))
{
token += 2;
float x, y, z;
parseFloat3(x, y, z, token);
qs.push_back(btVector3(x, y, z));
continue;
}
// v
if (token[0] == 'v' && isSpace((token[1])))
{
token += 3;
float x, y, z;
parseFloat3(x, y, z, token);
vs.push_back(btVector3(x, y, z));
continue;
}
// Ignore unknown command.
}
#ifndef USE_STREAM
while (line)
;
#endif
if (fileHandle >= 0)
{
fileIO->fileClose(fileHandle);
}
return err.str();
}
}
class LoadDeformed : public CommonDeformableBodyBase
{
int steps;
btSoftBody* psb;
char filename;
int reset_frame;
float sim_time;
public:
LoadDeformed(struct GUIHelperInterface* helper)
: CommonDeformableBodyBase(helper)
{
steps = 0;
psb = nullptr;
reset_frame = 0;
sim_time = 0;
}
virtual ~LoadDeformed()
{
}
void initPhysics();
void exitPhysics();
void resetCamera()
{
float dist = 2;
float pitch = -45;
float yaw = 100;
float targetPos[3] = {0, 0, 0};
m_guiHelper->resetCamera(dist, yaw, pitch, targetPos[0], targetPos[1], targetPos[2]);
}
void stepSimulation(float deltaTime)
{
steps++;
sim_time += deltaTime;
//// int seconds = 1/deltaTime;
if (0)
{
// if (reset_frame==0 && steps<100){
//// printf("steps %d, seconds %d, steps/seconds %d\n", steps,seconds,steps/seconds);
char filename[100];
sprintf(filename, "%s_%d_%d.txt", "states", reset_frame, steps);
btSoftBodyHelpers::writeState(filename, psb);
}
if (sim_time + reset_frame * 0.05 >= 5) exit(0);
float internalTimeStep = 1. / 240.f;
// float internalTimeStep = 0.1f;
m_dynamicsWorld->stepSimulation(deltaTime, deltaTime / internalTimeStep, internalTimeStep);
}
void addCloth(const btVector3& origin);
virtual void renderScene()
{
CommonDeformableBodyBase::renderScene();
btDeformableMultiBodyDynamicsWorld* deformableWorld = getDeformableDynamicsWorld();
for (int i = 0; i < deformableWorld->getSoftBodyArray().size(); i++)
{
btSoftBody* psb = (btSoftBody*)deformableWorld->getSoftBodyArray()[i];
{
btSoftBodyHelpers::DrawFrame(psb, deformableWorld->getDebugDrawer());
btSoftBodyHelpers::Draw(psb, deformableWorld->getDebugDrawer(), deformableWorld->getDrawFlags());
}
}
}
};
void LoadDeformed::initPhysics()
{
m_guiHelper->setUpAxis(1);
///collision configuration contains default setup for memory, collision setup
m_collisionConfiguration = new btSoftBodyRigidBodyCollisionConfiguration();
///use the default collision dispatcher. For parallel processing you can use a diffent dispatcher (see Extras/BulletMultiThreaded)
m_dispatcher = new btCollisionDispatcher(m_collisionConfiguration);
m_broadphase = new btDbvtBroadphase();
btDeformableBodySolver* deformableBodySolver = new btDeformableBodySolver();
btDeformableMultiBodyConstraintSolver* sol = new btDeformableMultiBodyConstraintSolver();
sol->setDeformableSolver(deformableBodySolver);
m_solver = sol;
m_dynamicsWorld = new btDeformableMultiBodyDynamicsWorld(m_dispatcher, m_broadphase, sol, m_collisionConfiguration, deformableBodySolver);
btVector3 gravity = btVector3(0, -9.8, 0);
m_dynamicsWorld->setGravity(gravity);
getDeformableDynamicsWorld()->getWorldInfo().m_gravity = gravity;
getDeformableDynamicsWorld()->getWorldInfo().m_sparsesdf.setDefaultVoxelsz(0.25);
m_guiHelper->createPhysicsDebugDrawer(m_dynamicsWorld);
{
///create a ground
btCollisionShape* groundShape = new btBoxShape(btVector3(btScalar(150.), btScalar(2.5), btScalar(150.)));
groundShape->setMargin(0.02);
m_collisionShapes.push_back(groundShape);
btTransform groundTransform;
groundTransform.setIdentity();
groundTransform.setOrigin(btVector3(0, -3.5, 0));
groundTransform.setRotation(btQuaternion(btVector3(1, 0, 0), SIMD_PI * 0));
btScalar mass(0.);
//rigidbody is dynamic if and only if mass is non zero, otherwise static
bool isDynamic = (mass != 0.f);
btVector3 localInertia(0, 0, 0);
if (isDynamic)
groundShape->calculateLocalInertia(mass, localInertia);
//using motionstate is recommended, it provides interpolation capabilities, and only synchronizes 'active' objects
btDefaultMotionState* myMotionState = new btDefaultMotionState(groundTransform);
btRigidBody::btRigidBodyConstructionInfo rbInfo(mass, myMotionState, groundShape, localInertia);
btRigidBody* body = new btRigidBody(rbInfo);
body->setFriction(4);
//add the ground to the dynamics world
m_dynamicsWorld->addRigidBody(body);
}
addCloth(btVector3(0, 1, 0));
getDeformableDynamicsWorld()->setImplicit(false);
getDeformableDynamicsWorld()->setLineSearch(false);
m_guiHelper->autogenerateGraphicsObjects(m_dynamicsWorld);
}
void LoadDeformed::addCloth(const btVector3& origin)
// create a piece of cloth
{
const btScalar s = 0.6;
const btScalar h = 0;
psb = btSoftBodyHelpers::CreatePatch(getDeformableDynamicsWorld()->getWorldInfo(), btVector3(-s, h, -2 * s),
btVector3(+s, h, -2 * s),
btVector3(-s, h, +2 * s),
btVector3(+s, h, +2 * s),
15, 30,
0, true, 0.0);
psb->getCollisionShape()->setMargin(0.02);
psb->generateBendingConstraints(2);
psb->setTotalMass(.5);
psb->m_cfg.kKHR = 1; // collision hardness with kinematic objects
psb->m_cfg.kCHR = 1; // collision hardness with rigid body
psb->m_cfg.kDF = 0.1;
psb->rotate(btQuaternion(0, SIMD_PI / 2, 0));
btTransform clothTransform;
clothTransform.setIdentity();
clothTransform.setOrigin(btVector3(0, 0.2, 0) + origin);
psb->transform(clothTransform);
b3BulletDefaultFileIO fileio;
char absolute_path[1024];
char filename[100];
sprintf(filename, "/Users/fuchuyuan/Documents/mybullet/build_cmake/examples/ExampleBrowser/states_0_%d.txt", reset_frame);
fileio.findResourcePath(filename, absolute_path, 1024);
btAlignedObjectArray<btVector3> qs;
btAlignedObjectArray<btVector3> vs;
CustomSoftBodyHelper::loadDeformableState(qs, vs, absolute_path, &fileio);
if (reset_frame > 0)
psb->updateState(qs, vs);
psb->m_cfg.collisions = btSoftBody::fCollision::SDF_RD;
psb->m_cfg.collisions |= btSoftBody::fCollision::SDF_MDF;
psb->m_cfg.collisions |= btSoftBody::fCollision::SDF_RDF;
// psb->m_cfg.collisions |= btSoftBody::fCollision::SDF_RDN;
psb->setCollisionFlags(0);
psb->setCacheBarycenter(true);
getDeformableDynamicsWorld()->addSoftBody(psb);
psb->setSelfCollision(false);
btDeformableMassSpringForce* mass_spring = new btDeformableMassSpringForce(2, 0.2, true);
psb->setSpringStiffness(4);
getDeformableDynamicsWorld()->addForce(psb, mass_spring);
m_forces.push_back(mass_spring);
btVector3 gravity = btVector3(0, -9.8, 0);
btDeformableGravityForce* gravity_force = new btDeformableGravityForce(gravity);
getDeformableDynamicsWorld()->addForce(psb, gravity_force);
// getDeformableDynamicsWorld()->setUseProjection(true);
m_forces.push_back(gravity_force);
}
void LoadDeformed::exitPhysics()
{
//cleanup in the reverse order of creation/initialization
removePickingConstraint();
//remove the rigidbodies from the dynamics world and delete them
int i;
for (i = m_dynamicsWorld->getNumCollisionObjects() - 1; i >= 0; i--)
{
btCollisionObject* obj = m_dynamicsWorld->getCollisionObjectArray()[i];
btRigidBody* body = btRigidBody::upcast(obj);
if (body && body->getMotionState())
{
delete body->getMotionState();
}
m_dynamicsWorld->removeCollisionObject(obj);
delete obj;
}
// delete forces
for (int j = 0; j < m_forces.size(); j++)
{
btDeformableLagrangianForce* force = m_forces[j];
delete force;
}
m_forces.clear();
//delete collision shapes
for (int j = 0; j < m_collisionShapes.size(); j++)
{
btCollisionShape* shape = m_collisionShapes[j];
delete shape;
}
m_collisionShapes.clear();
delete m_dynamicsWorld;
delete m_solver;
delete m_broadphase;
delete m_dispatcher;
delete m_collisionConfiguration;
}
class CommonExampleInterface* LoadDeformedCreateFunc(struct CommonExampleOptions& options)
{
return new LoadDeformed(options.m_guiHelper);
}
+19
View File
@@ -0,0 +1,19 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2019 Google Inc. http://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef _LOAD_DEFORMED_H
#define _LOAD_DEFORMED_H
class CommonExampleInterface* LoadDeformedCreateFunc(struct CommonExampleOptions& options);
#endif //_LOAD_DEFORMED_H
+21 -1
View File
@@ -284,7 +284,7 @@ SET(BulletExampleBrowser_SRCS
../Benchmarks/BenchmarkDemo.cpp
../Benchmarks/BenchmarkDemo.h
../Benchmarks/landscapeData.h
../Benchmarks/TaruData
../Benchmarks/TaruData.h
../Raycast/RaytestDemo.cpp
../Importers/ImportBsp/BspConverter.h
../Importers/ImportBullet/SerializeSetup.cpp
@@ -379,6 +379,8 @@ SET(BulletExampleBrowser_SRCS
../DeformableDemo/Collide.cpp
../DeformableDemo/Collide.h
../DeformableDemo/LargeDeformation.cpp
../DeformableDemo/LoadDeformed.h
../DeformableDemo/LoadDeformed.cpp
../DeformableDemo/LargeDeformation.h
../DeformableDemo/DeformableClothAnchor.cpp
../DeformableDemo/DeformableClothAnchor.h
@@ -388,6 +390,24 @@ SET(BulletExampleBrowser_SRCS
../MultiBody/MultiDofDemo.h
../RigidBody/RigidBodySoftContact.cpp
../RigidBody/KinematicRigidBodyExample.cpp
../ReducedDeformableDemo/ConservationTest.cpp
../ReducedDeformableDemo/ConservationTest.h
../ReducedDeformableDemo/Springboard.cpp
../ReducedDeformableDemo/Springboard.h
../ReducedDeformableDemo/ModeVisualizer.cpp
../ReducedDeformableDemo/ModeVisualizer.h
../ReducedDeformableDemo/FreeFall.cpp
../ReducedDeformableDemo/FreeFall.h
../ReducedDeformableDemo/FrictionSlope.cpp
../ReducedDeformableDemo/FrictionSlope.h
../ReducedDeformableDemo/ReducedCollide.cpp
../ReducedDeformableDemo/ReducedCollide.h
../ReducedDeformableDemo/ReducedGrasp.cpp
../ReducedDeformableDemo/ReducedGrasp.h
../ReducedDeformableDemo/ReducedBenchmark.cpp
../ReducedDeformableDemo/ReducedBenchmark.h
../ReducedDeformableDemo/ReducedMotorGrasp.cpp
../ReducedDeformableDemo/ReducedMotorGrasp.h
../Constraints/TestHingeTorque.cpp
../Constraints/TestHingeTorque.h
../Constraints/ConstraintDemo.cpp
@@ -55,6 +55,7 @@
#include "../DeformableDemo/DeformableMultibody.h"
#include "../DeformableDemo/VolumetricDeformable.h"
#include "../DeformableDemo/LargeDeformation.h"
#include "../DeformableDemo/LoadDeformed.h"
#include "../DeformableDemo/Collide.h"
#include "../DeformableDemo/GraspDeformable.h"
#include "../DeformableDemo/DeformableContact.h"
@@ -72,6 +73,15 @@
#include "../RoboticsLearning/R2D2GraspExample.h"
#include "../RoboticsLearning/KukaGraspExample.h"
#include "../RoboticsLearning/GripperGraspExample.h"
#include "../ReducedDeformableDemo/ConservationTest.h"
#include "../ReducedDeformableDemo/ModeVisualizer.h"
#include "../ReducedDeformableDemo/Springboard.h"
#include "../ReducedDeformableDemo/FreeFall.h"
#include "../ReducedDeformableDemo/FrictionSlope.h"
#include "../ReducedDeformableDemo/ReducedCollide.h"
#include "../ReducedDeformableDemo/ReducedGrasp.h"
#include "../ReducedDeformableDemo/ReducedMotorGrasp.h"
#include "../ReducedDeformableDemo/ReducedBenchmark.h"
#include "../InverseKinematics/InverseKinematicsExample.h"
#ifdef B3_ENABLE_TINY_AUDIO
@@ -209,11 +219,24 @@ static ExampleEntry gDefaultExamples[] =
ExampleEntry(1, "Grasp Deformable with Motor", "Grasping test", GraspDeformableCreateFunc),
ExampleEntry(1, "Volumetric Deformable Objects", "Volumetric Deformable test", VolumetricDeformableCreateFunc),
ExampleEntry(1, "Extreme Deformation", "Recovery from extreme deformation", LargeDeformationCreateFunc),
ExampleEntry(1, "Load Deformed", "Reconstruct a deformed object", LoadDeformedCreateFunc),
ExampleEntry(1, "Colliding Test", "Volumetric deformable collide with rigid box", CollideCreateFunc),
ExampleEntry(1, "Rigid Cloth Anchor", "Deformable Rigid body Anchor test", DeformableClothAnchorCreateFunc),
ExampleEntry(1, "Multibody Cloth Anchor", "Deformable Multibody Anchor test", MultibodyClothAnchorCreateFunc),
ExampleEntry(1, "Deformable-MultiBody Contact", "MultiBody and Deformable contact", DeformableMultibodyCreateFunc),
// ExampleEntry(1, "MultiBody Baseline", "MultiBody Baseline", MultiBodyBaselineCreateFunc),
ExampleEntry(0, "Reduced Deformabe Body"),
ExampleEntry(1, "Mode Visualizer", "Visualizer the modes for reduced deformable objects", ReducedModeVisualizerCreateFunc),
ExampleEntry(1, "Reduced Conservation Test", "Momentum conservation test for the reduced deformable objects", ReducedConservationTestCreateFunc),
ExampleEntry(1, "Reduced Springboard", "Moving rigid object colliding with a fixed reduced deformable objects", ReducedSpringboardCreateFunc),
ExampleEntry(1, "Reduced Free Fall", "Free fall ground contact test for the reduced deformable model", ReducedFreeFallCreateFunc),
ExampleEntry(1, "Reduced Collision Test", "Collision between a reduced block and the a rigid block", ReducedCollideCreateFunc),
ExampleEntry(1, "Reduced Grasp", "Grasp a reduced deformable block", ReducedGraspCreateFunc),
ExampleEntry(1, "Reduced Motor Grasp", "Grasp a reduced deformable block with motor", ReducedMotorGraspCreateFunc),
ExampleEntry(1, "Reduced Friction Slope", "Grasp a reduced deformable block", FrictionSlopeCreateFunc),
ExampleEntry(1, "Reduced Benchmark", "Reduced deformable performance benchmark example", ReducedBenchmarkCreateFunc),
// ExampleEntry(1, "Simple Reduced Deformable Test", "Simple dynamics test for the reduced deformable objects", ReducedBasicTestCreateFunc),
#ifdef INCLUDE_CLOTH_DEMOS
ExampleEntry(0, "Soft Body"),
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
@@ -1,7 +1,11 @@
#include "GwenParameterInterface.h"
#include "gwenInternalData.h"
#include <cstring>
#ifdef _WIN32
#define safe_printf _snprintf
#else
#define safe_printf snprintf
#endif
struct MyButtonEventHandler : public Gwen::Event::Handler
{
Gwen::Controls::Button* m_buttonControl;
@@ -85,7 +89,7 @@ struct MySliderEventHandler : public Gwen::Event::Handler
if (m_showValue)
{
char txt[1024];
snprintf(txt, sizeof(txt), "%s : %.3f", m_variableName, val);
safe_printf(txt, sizeof(txt), "%s : %.3f", m_variableName, val);
m_label->SetText(txt);
}
}
@@ -231,7 +235,7 @@ void GwenParameterInterface::registerSliderFloatParameter(SliderParams& params)
}
pSlider->SetValue(*params.m_paramValuePointer); //dimensions[i] );
char labelName[1024];
snprintf(labelName, sizeof(labelName), "%s", params.m_name); //axisNames[0]);
safe_printf(labelName, sizeof(labelName), "%s", params.m_name); //axisNames[0]);
MySliderEventHandler<btScalar>* handler = new MySliderEventHandler<btScalar>(labelName, label, pSlider, params.m_paramValuePointer, params.m_callback, params.m_userPointer);
handler->m_showValue = params.m_showValues;
m_paramInternalData->m_sliderEventHandlers.push_back(handler);
@@ -885,6 +885,20 @@ bool OpenGLExampleBrowser::init(int argc, char* argv[])
sUseOpenGL2 = args.CheckCmdLineFlag("opengl2");
args.GetCmdLineArgument("render_device", gRenderDevice);
args.GetCmdLineArgument("window_backend", gWindowBackend);
int max_num_object_capacity = 128 * 1024;
int max_shape_capacity_in_bytes = 128 * 1024 * 1024;
if (args.CheckCmdLineFlag("max_num_object_capacity"))
{
args.GetCmdLineArgument("max_num_object_capacity", max_num_object_capacity);
}
if (args.CheckCmdLineFlag("max_shape_capacity_in_bytes"))
{
args.GetCmdLineArgument("max_shape_capacity_in_bytes", max_shape_capacity_in_bytes);
}
#else
sUseOpenGL2 = true;
#endif
@@ -914,7 +928,7 @@ bool OpenGLExampleBrowser::init(int argc, char* argv[])
{
char title[1024];
sprintf(title, "%s using OpenGL3+ %s %s", appTitle, glContext, optMode);
simpleApp = new SimpleOpenGL3App(title, width, height, gAllowRetina, gWindowBackend, gRenderDevice);
simpleApp = new SimpleOpenGL3App(title, width, height, gAllowRetina, gWindowBackend, gRenderDevice, max_num_object_capacity, max_shape_capacity_in_bytes);
s_app = simpleApp;
}
#endif
+7 -1
View File
@@ -236,13 +236,19 @@ OpenGLGuiHelper::OpenGLGuiHelper(CommonGraphicsApp* glApp, bool useOpenGL2)
m_data->m_debugDraw = 0;
}
OpenGLGuiHelper::~OpenGLGuiHelper()
OpenGLGuiHelper::~OpenGLGuiHelper()
{
delete m_data->m_debugDraw;
delete m_data;
}
void OpenGLGuiHelper::setBackgroundColor(const double rgbBackground[3])
{
this->getRenderInterface()->setBackgroundColor(rgbBackground);
}
struct CommonRenderInterface* OpenGLGuiHelper::getRenderInterface()
{
return m_data->m_glApp->m_renderer;
+1 -1
View File
@@ -36,7 +36,7 @@ struct OpenGLGuiHelper : public GUIHelperInterface
virtual int getShapeIndexFromInstance(int instanceUid);
virtual void replaceTexture(int shapeIndex, int textureUid);
virtual void updateShape(int shapeIndex, float* vertices, int numVertices);
virtual void setBackgroundColor(const double rgbBackground[3]);
virtual void createCollisionShapeGraphicsObject(btCollisionShape* collisionShape);
virtual void syncPhysicsToGraphics(const btDiscreteDynamicsWorld* rbWorld);
+1
View File
@@ -182,6 +182,7 @@ project "App_BulletExampleBrowser"
"../VoronoiFracture/*",
"../SoftDemo/*",
"../DeformableDemo/*",
"../ReducedDeformableDemo/*",
"../RollingFrictionDemo/*",
"../rbdl/*",
"../FractureDemo/*",
+1 -1
View File
@@ -101,7 +101,7 @@ void CompoundBoxesExample::initPhysics()
#else
// recompute the shift to make sure the compound shape is re-aligned
for (int i = 0; i < compoundShape->getNumChildShapes(); i++)
compound2->addChildShape(compoundShape->getChildTransform(i) * principal.inverse(),
compound2->addChildShape(principal.inverse() * compoundShape->getChildTransform(i),
compoundShape->getChildShape(i));
#endif
delete compoundShape;
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2011 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2011 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2007 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2007 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
+1 -1
View File
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
@@ -1,6 +1,6 @@
/*
Bullet Continuous Collision Detection and Physics Library
Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
@@ -2273,7 +2273,7 @@ int BulletMJCFImporter::getBodyUniqueId() const
return m_data->m_activeBodyUniqueId;
}
static btCollisionShape* MjcfCreateConvexHullFromShapes(const tinyobj::attrib_t& attribute, std::vector<tinyobj::shape_t>& shapes, const btVector3& geomScale, btScalar collisionMargin)
static btCollisionShape* MjcfCreateConvexHullFromShapes(const bt_tinyobj::attrib_t& attribute, std::vector<bt_tinyobj::shape_t>& shapes, const btVector3& geomScale, btScalar collisionMargin)
{
btCompoundShape* compound = new btCompoundShape();
compound->setMargin(collisionMargin);
@@ -2285,7 +2285,7 @@ static btCollisionShape* MjcfCreateConvexHullFromShapes(const tinyobj::attrib_t&
{
btConvexHullShape* convexHull = new btConvexHullShape();
convexHull->setMargin(collisionMargin);
tinyobj::shape_t& shape = shapes[s];
bt_tinyobj::shape_t& shape = shapes[s];
int faceCount = shape.mesh.indices.size();
@@ -2399,9 +2399,9 @@ class btCompoundShape* BulletMJCFImporter::convertLinkCollisionShapes(int linkIn
}
else
{
std::vector<tinyobj::shape_t> shapes;
tinyobj::attrib_t attribute;
std::string err = tinyobj::LoadObj(attribute, shapes, col->m_geometry.m_meshFileName.c_str(), "", m_data->m_fileIO);
std::vector<bt_tinyobj::shape_t> shapes;
bt_tinyobj::attrib_t attribute;
std::string err = bt_tinyobj::LoadObj(attribute, shapes, col->m_geometry.m_meshFileName.c_str(), "", m_data->m_fileIO);
//create a convex hull for each shape, and store it in a btCompoundShape
childShape = MjcfCreateConvexHullFromShapes(attribute, shapes, col->m_geometry.m_meshScale, m_data->m_globalDefaults.m_defaultCollisionMargin);
@@ -64,8 +64,8 @@ bool b3ImportMeshUtility::loadAndRegisterMeshFromFileInternal(const std::string&
b3FileUtils::extractPath(relativeFileName, pathPrefix, 1024);
btVector3 shift(0, 0, 0);
std::vector<tinyobj::shape_t> shapes;
tinyobj::attrib_t attribute;
std::vector<bt_tinyobj::shape_t> shapes;
bt_tinyobj::attrib_t attribute;
{
B3_PROFILE("tinyobj::LoadObj");
std::string err = LoadFromCachedOrFromObj(attribute, shapes, relativeFileName, pathPrefix, fileIO);
@@ -79,7 +79,7 @@ bool b3ImportMeshUtility::loadAndRegisterMeshFromFileInternal(const std::string&
//try to load some texture
for (int i = 0; meshData.m_textureImage1 == 0 && i < shapes.size(); i++)
{
const tinyobj::shape_t& shape = shapes[i];
const bt_tinyobj::shape_t& shape = shapes[i];
meshData.m_rgbaColor[0] = shape.material.diffuse[0];
meshData.m_rgbaColor[1] = shape.material.diffuse[1];
meshData.m_rgbaColor[2] = shape.material.diffuse[2];
@@ -11,8 +11,8 @@
struct CachedObjResult
{
std::string m_msg;
std::vector<tinyobj::shape_t> m_shapes;
tinyobj::attrib_t m_attribute;
std::vector<bt_tinyobj::shape_t> m_shapes;
bt_tinyobj::attrib_t m_attribute;
};
static b3HashMap<b3HashString, CachedObjResult> gCachedObjResults;
@@ -32,8 +32,8 @@ void b3EnableFileCaching(int enable)
}
std::string LoadFromCachedOrFromObj(
tinyobj::attrib_t& attribute,
std::vector<tinyobj::shape_t>& shapes, // [output]
bt_tinyobj::attrib_t& attribute,
std::vector<bt_tinyobj::shape_t>& shapes, // [output]
const char* filename,
const char* mtl_basepath,
struct CommonFileIOInterface* fileIO)
@@ -47,7 +47,7 @@ std::string LoadFromCachedOrFromObj(
return result.m_msg;
}
std::string err = tinyobj::LoadObj(attribute, shapes, filename, mtl_basepath, fileIO);
std::string err = bt_tinyobj::LoadObj(attribute, shapes, filename, mtl_basepath, fileIO);
CachedObjResult result;
result.m_msg = err;
result.m_shapes = shapes;
@@ -62,10 +62,10 @@ std::string LoadFromCachedOrFromObj(
GLInstanceGraphicsShape* LoadMeshFromObj(const char* relativeFileName, const char* materialPrefixPath, struct CommonFileIOInterface* fileIO)
{
B3_PROFILE("LoadMeshFromObj");
std::vector<tinyobj::shape_t> shapes;
tinyobj::attrib_t attribute;
std::vector<bt_tinyobj::shape_t> shapes;
bt_tinyobj::attrib_t attribute;
{
B3_PROFILE("tinyobj::LoadObj2");
B3_PROFILE("bt_tinyobj::LoadObj2");
std::string err = LoadFromCachedOrFromObj(attribute, shapes, relativeFileName, materialPrefixPath, fileIO);
}
@@ -9,8 +9,8 @@ int b3IsFileCachingEnabled();
void b3EnableFileCaching(int enable);
std::string LoadFromCachedOrFromObj(
tinyobj::attrib_t& attribute,
std::vector<tinyobj::shape_t>& shapes, // [output]
bt_tinyobj::attrib_t& attribute,
std::vector<bt_tinyobj::shape_t>& shapes, // [output]
const char* filename,
const char* mtl_basepath,
struct CommonFileIOInterface* fileIO);
@@ -9,7 +9,7 @@
#include "../../OpenGLWindow/GLInstancingRenderer.h"
#include "../../OpenGLWindow/GLInstanceGraphicsShape.h"
GLInstanceGraphicsShape* btgCreateGraphicsShapeFromWavefrontObj(const tinyobj::attrib_t& attribute, std::vector<tinyobj::shape_t>& shapes, bool flatShading)
GLInstanceGraphicsShape* btgCreateGraphicsShapeFromWavefrontObj(const bt_tinyobj::attrib_t& attribute, std::vector<bt_tinyobj::shape_t>& shapes, bool flatShading)
{
b3AlignedObjectArray<GLInstanceVertex>* vertices = new b3AlignedObjectArray<GLInstanceVertex>;
{
@@ -19,7 +19,7 @@ GLInstanceGraphicsShape* btgCreateGraphicsShapeFromWavefrontObj(const tinyobj::a
for (int s = 0; s < (int)shapes.size(); s++)
{
tinyobj::shape_t& shape = shapes[s];
bt_tinyobj::shape_t& shape = shapes[s];
int faceCount = shape.mesh.indices.size();
for (int f = 0; f < faceCount; f += 3)
@@ -36,7 +36,7 @@ GLInstanceGraphicsShape* btgCreateGraphicsShapeFromWavefrontObj(const tinyobj::a
}
GLInstanceVertex vtx0;
tinyobj::index_t v_0 = shape.mesh.indices[f];
bt_tinyobj::index_t v_0 = shape.mesh.indices[f];
vtx0.xyzw[0] = attribute.vertices[3 * v_0.vertex_index];
vtx0.xyzw[1] = attribute.vertices[3 * v_0.vertex_index + 1];
vtx0.xyzw[2] = attribute.vertices[3 * v_0.vertex_index + 2];
@@ -65,7 +65,7 @@ GLInstanceGraphicsShape* btgCreateGraphicsShapeFromWavefrontObj(const tinyobj::a
}
GLInstanceVertex vtx1;
tinyobj::index_t v_1 = shape.mesh.indices[f + 1];
bt_tinyobj::index_t v_1 = shape.mesh.indices[f + 1];
vtx1.xyzw[0] = attribute.vertices[3 * v_1.vertex_index];
vtx1.xyzw[1] = attribute.vertices[3 * v_1.vertex_index + 1];
vtx1.xyzw[2] = attribute.vertices[3 * v_1.vertex_index + 2];
@@ -94,7 +94,7 @@ GLInstanceGraphicsShape* btgCreateGraphicsShapeFromWavefrontObj(const tinyobj::a
}
GLInstanceVertex vtx2;
tinyobj::index_t v_2 = shape.mesh.indices[f + 2];
bt_tinyobj::index_t v_2 = shape.mesh.indices[f + 2];
vtx2.xyzw[0] = attribute.vertices[3 * v_2.vertex_index];
vtx2.xyzw[1] = attribute.vertices[3 * v_2.vertex_index + 1];
vtx2.xyzw[2] = attribute.vertices[3 * v_2.vertex_index + 2];
@@ -4,6 +4,6 @@
#include "../../ThirdPartyLibs/Wavefront/tiny_obj_loader.h"
#include <vector>
struct GLInstanceGraphicsShape* btgCreateGraphicsShapeFromWavefrontObj(const tinyobj::attrib_t& attribute, std::vector<tinyobj::shape_t>& shapes, bool flatShading = false);
struct GLInstanceGraphicsShape* btgCreateGraphicsShapeFromWavefrontObj(const bt_tinyobj::attrib_t& attribute, std::vector<bt_tinyobj::shape_t>& shapes, bool flatShading = false);
#endif //WAVEFRONT2GRAPHICS_H
@@ -483,6 +483,12 @@ void BulletURDFImporter::getMassAndInertia(int linkIndex, btScalar& mass, btVect
}
bool BulletURDFImporter::getJointInfo2(int urdfLinkIndex, btTransform& parent2joint, btTransform& linkTransformInWorld, btVector3& jointAxisInJointSpace, int& jointType, btScalar& jointLowerLimit, btScalar& jointUpperLimit, btScalar& jointDamping, btScalar& jointFriction, btScalar& jointMaxForce, btScalar& jointMaxVelocity) const
{
btScalar twistLimit;
return getJointInfo3(urdfLinkIndex, parent2joint, linkTransformInWorld, jointAxisInJointSpace, jointType, jointLowerLimit, jointUpperLimit, jointDamping, jointFriction, jointMaxForce, jointMaxVelocity, twistLimit);
}
bool BulletURDFImporter::getJointInfo3(int urdfLinkIndex, btTransform& parent2joint, btTransform& linkTransformInWorld, btVector3& jointAxisInJointSpace, int& jointType, btScalar& jointLowerLimit, btScalar& jointUpperLimit, btScalar& jointDamping, btScalar& jointFriction, btScalar& jointMaxForce, btScalar& jointMaxVelocity, btScalar& twistLimit) const
{
jointLowerLimit = 0.f;
jointUpperLimit = 0.f;
@@ -510,6 +516,7 @@ bool BulletURDFImporter::getJointInfo2(int urdfLinkIndex, btTransform& parent2jo
jointFriction = pj->m_jointFriction;
jointMaxForce = pj->m_effortLimit;
jointMaxVelocity = pj->m_velocityLimit;
twistLimit = pj->m_twistLimit;
return true;
}
else
@@ -540,7 +547,7 @@ bool BulletURDFImporter::getRootTransformInWorld(btTransform& rootTransformInWor
return true;
}
static btCollisionShape* createConvexHullFromShapes(const tinyobj::attrib_t& attribute, std::vector<tinyobj::shape_t>& shapes, const btVector3& geomScale, int flags)
static btCollisionShape* createConvexHullFromShapes(const bt_tinyobj::attrib_t& attribute, std::vector<bt_tinyobj::shape_t>& shapes, const btVector3& geomScale, int flags)
{
B3_PROFILE("createConvexHullFromShapes");
btCompoundShape* compound = new btCompoundShape();
@@ -553,7 +560,7 @@ static btCollisionShape* createConvexHullFromShapes(const tinyobj::attrib_t& att
{
btConvexHullShape* convexHull = new btConvexHullShape();
convexHull->setMargin(gUrdfDefaultCollisionMargin);
tinyobj::shape_t& shape = shapes[s];
bt_tinyobj::shape_t& shape = shapes[s];
int faceCount = shape.mesh.indices.size();
for (int f = 0; f < faceCount; f += 3)
@@ -747,9 +754,9 @@ btCollisionShape* BulletURDFImporter::convertURDFToCollisionShape(const UrdfColl
}
else
{
std::vector<tinyobj::shape_t> shapes;
tinyobj::attrib_t attribute;
std::string err = tinyobj::LoadObj(attribute, shapes, collision->m_geometry.m_meshFileName.c_str(), "", m_data->m_fileIO);
std::vector<bt_tinyobj::shape_t> shapes;
bt_tinyobj::attrib_t attribute;
std::string err = bt_tinyobj::LoadObj(attribute, shapes, collision->m_geometry.m_meshFileName.c_str(), "", m_data->m_fileIO);
//create a convex hull for each shape, and store it in a btCompoundShape
shape = createConvexHullFromShapes(attribute, shapes, collision->m_geometry.m_meshScale, m_data->m_flags);
m_data->m_bulletCollisionShape2UrdfCollision.insert(shape, *collision);
@@ -1534,3 +1541,8 @@ const struct UrdfDeformable& BulletURDFImporter::getDeformableModel() const
{
return m_data->m_urdfParser.getDeformable();
}
const struct UrdfReducedDeformable& BulletURDFImporter::getReducedDeformableModel() const
{
return m_data->m_urdfParser.getReducedDeformable();
}
@@ -60,6 +60,7 @@ public:
virtual bool getJointInfo(int urdfLinkIndex, btTransform& parent2joint, btTransform& linkTransformInWorld, btVector3& jointAxisInJointSpace, int& jointType, btScalar& jointLowerLimit, btScalar& jointUpperLimit, btScalar& jointDamping, btScalar& jointFriction) const;
virtual bool getJointInfo2(int urdfLinkIndex, btTransform& parent2joint, btTransform& linkTransformInWorld, btVector3& jointAxisInJointSpace, int& jointType, btScalar& jointLowerLimit, btScalar& jointUpperLimit, btScalar& jointDamping, btScalar& jointFriction, btScalar& jointMaxForce, btScalar& jointMaxVelocity) const;
virtual bool getJointInfo3(int urdfLinkIndex, btTransform& parent2joint, btTransform& linkTransformInWorld, btVector3& jointAxisInJointSpace, int& jointType, btScalar& jointLowerLimit, btScalar& jointUpperLimit, btScalar& jointDamping, btScalar& jointFriction, btScalar& jointMaxForce, btScalar& jointMaxVelocity, btScalar& twistLimit) const;
virtual bool getRootTransformInWorld(btTransform& rootTransformInWorld) const;
virtual void setRootTransformInWorld(const btTransform& rootTransformInWorld);
@@ -92,6 +93,7 @@ public:
virtual void setEnableTinyRenderer(bool enable);
void convertURDFToVisualShapeInternal(const struct UrdfVisual* visual, const char* urdfPathPrefix, const class btTransform& visualTransform, btAlignedObjectArray<struct GLInstanceVertex>& verticesOut, btAlignedObjectArray<int>& indicesOut, btAlignedObjectArray<struct BulletURDFTexture>& texturesOut, struct b3ImportMeshData& meshData) const;
const struct UrdfDeformable& getDeformableModel() const;
const struct UrdfReducedDeformable& getReducedDeformableModel() const;
};
#endif //BULLET_URDF_IMPORTER_H
@@ -33,6 +33,10 @@ class btRigidBody* MyMultiBodyCreator::allocateRigidBody(int urdfLinkIndex, btSc
{
btRigidBody::btRigidBodyConstructionInfo rbci(mass, 0, colShape, localInertiaDiagonal);
rbci.m_startWorldTransform = initialWorldTrans;
btScalar sleep_threshold = btScalar(0.22360679775);//sqrt(0.05) to be similar to btMultiBody (SLEEP_THRESHOLD)
rbci.m_angularSleepingThreshold = sleep_threshold;
rbci.m_linearSleepingThreshold = sleep_threshold;
btRigidBody* body = new btRigidBody(rbci);
if (m_rigidBody == 0)
{
@@ -10,6 +10,9 @@
#include "BulletDynamics/Dynamics/btRigidBody.h"
#include "BulletDynamics/Featherstone/btMultiBodyLinkCollider.h"
#include "BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.h"
#include "BulletDynamics/Featherstone/btMultiBodySphericalJointLimit.h"
#include "BulletDynamics/ConstraintSolver/btGeneric6DofSpring2Constraint.h"
#include "URDF2Bullet.h"
#include "URDFImporterInterface.h"
@@ -199,7 +202,15 @@ btScalar tmpUrdfScaling = 2;
btTransform ConvertURDF2BulletInternal(
const URDFImporterInterface& u2b, MultiBodyCreationInterface& creation,
URDF2BulletCachedData& cache, int urdfLinkIndex,
const btTransform& parentTransformInWorldSpace, btMultiBodyDynamicsWorld* world1,
const btTransform& parentTransformInWorldSpace,
#ifdef USE_DISCRETE_DYNAMICS_WORLD
btDiscreteDynamicsWorld* world1,
#else
btMultiBodyDynamicsWorld* world1,
#endif
bool createMultiBody, const char* pathPrefix,
int flags, UrdfVisualShapeCache* cachedLinkGraphicsShapesIn, UrdfVisualShapeCache* cachedLinkGraphicsShapesOut, bool recursive)
{
@@ -251,8 +262,8 @@ btTransform ConvertURDF2BulletInternal(
btScalar jointFriction;
btScalar jointMaxForce;
btScalar jointMaxVelocity;
bool hasParentJoint = u2b.getJointInfo2(urdfLinkIndex, parent2joint, linkTransformInWorldSpace, jointAxisInJointSpace, jointType, jointLowerLimit, jointUpperLimit, jointDamping, jointFriction, jointMaxForce, jointMaxVelocity);
btScalar twistLimit;
bool hasParentJoint = u2b.getJointInfo3(urdfLinkIndex, parent2joint, linkTransformInWorldSpace, jointAxisInJointSpace, jointType, jointLowerLimit, jointUpperLimit, jointDamping, jointFriction, jointMaxForce, jointMaxVelocity, twistLimit);
std::string linkName = u2b.getLinkName(urdfLinkIndex);
if (flags & CUF_USE_SDF)
@@ -414,6 +425,20 @@ btTransform ConvertURDF2BulletInternal(
cache.m_bulletMultiBody->setupSpherical(mbLinkIndex, mass, localInertiaDiagonal, mbParentIndex,
parentRotToThis, offsetInA.getOrigin(), -offsetInB.getOrigin(),
disableParentCollision);
//create a spherical joint limit, swing_x,. swing_y and twist
//jointLowerLimit <= jointUpperLimit)
if (jointUpperLimit > 0 && jointLowerLimit> 0 && twistLimit > 0 && jointMaxForce>0)
{
btMultiBodySphericalJointLimit* con = new btMultiBodySphericalJointLimit(cache.m_bulletMultiBody, mbLinkIndex,
jointLowerLimit,
jointUpperLimit,
twistLimit,
jointMaxForce);
world1->addMultiBodyConstraint(con);
}
}
else
{
@@ -505,6 +530,7 @@ btTransform ConvertURDF2BulletInternal(
creation.addLinkMapping(urdfLinkIndex, mbLinkIndex);
if (createMultiBody)
{
#ifndef USE_DISCRETE_DYNAMICS_WORLD
cache.m_bulletMultiBody->setupRevolute(mbLinkIndex, mass, localInertiaDiagonal, mbParentIndex,
parentRotToThis, quatRotate(offsetInB.getRotation(),
jointAxisInJointSpace),
@@ -519,8 +545,10 @@ btTransform ConvertURDF2BulletInternal(
btMultiBodyConstraint* con = new btMultiBodyJointLimitConstraint(cache.m_bulletMultiBody, mbLinkIndex, jointLowerLimit, jointUpperLimit);
world1->addMultiBodyConstraint(con);
}
#endif
}
else
{
btGeneric6DofSpring2Constraint* dof6 = 0;
if (jointType == URDFRevoluteJoint && jointLowerLimit <= jointUpperLimit)
@@ -560,6 +588,7 @@ btTransform ConvertURDF2BulletInternal(
if (createMultiBody)
{
#ifndef USE_DISCRETE_DYNAMICS_WORLD
cache.m_bulletMultiBody->setupPrismatic(mbLinkIndex, mass, localInertiaDiagonal, mbParentIndex,
parentRotToThis, quatRotate(offsetInB.getRotation(), jointAxisInJointSpace), offsetInA.getOrigin(), //parent2joint.getOrigin(),
-offsetInB.getOrigin(),
@@ -574,6 +603,7 @@ btTransform ConvertURDF2BulletInternal(
world1->addMultiBodyConstraint(con);
}
//printf("joint lower limit=%d, upper limit = %f\n", jointLowerLimit, jointUpperLimit);
#endif
}
else
{
@@ -775,10 +805,18 @@ bool MyIntCompareFunc(childParentIndex a, childParentIndex b)
}
void ConvertURDF2Bullet(
const URDFImporterInterface& u2b, MultiBodyCreationInterface& creation,
const btTransform& rootTransformInWorldSpace,
#ifdef USE_DISCRETE_DYNAMICS_WORLD
btDiscreteDynamicsWorld* world1,
#else
btMultiBodyDynamicsWorld* world1,
#endif
bool createMultiBody, const char* pathPrefix, int flags, UrdfVisualShapeCache* cachedLinkGraphicsShapes)
{
URDF2BulletCachedData cache;
@@ -829,7 +867,7 @@ void ConvertURDF2Bullet(
{
*cachedLinkGraphicsShapes = cachedLinkGraphicsShapesOut;
}
#ifndef USE_DISCRETE_DYNAMICS_WORLD
if (world1 && cache.m_bulletMultiBody)
{
B3_PROFILE("Post process");
@@ -855,4 +893,5 @@ void ConvertURDF2Bullet(
world1->addMultiBody(mb);
}
#endif
}
@@ -8,6 +8,7 @@
class btVector3;
class btTransform;
class btMultiBodyDynamicsWorld;
class btDiscreteDynamicsWorld;
class btTransform;
class URDFImporterInterface;
@@ -20,7 +21,18 @@ struct UrdfVisualShapeCache
btAlignedObjectArray<UrdfMaterialColor> m_cachedUrdfLinkColors;
btAlignedObjectArray<int> m_cachedUrdfLinkVisualShapeIndices;
};
//#define USE_DISCRETE_DYNAMICS_WORLD
#ifdef USE_DISCRETE_DYNAMICS_WORLD
void ConvertURDF2Bullet(const URDFImporterInterface& u2b,
MultiBodyCreationInterface& creationCallback,
const btTransform& rootTransformInWorldSpace,
btDiscreteDynamicsWorld* world,
bool createMultiBody,
const char* pathPrefix,
int flags = 0,
UrdfVisualShapeCache* cachedLinkGraphicsShapes = 0);
#else
void ConvertURDF2Bullet(const URDFImporterInterface& u2b,
MultiBodyCreationInterface& creationCallback,
const btTransform& rootTransformInWorldSpace,
@@ -29,5 +41,5 @@ void ConvertURDF2Bullet(const URDFImporterInterface& u2b,
const char* pathPrefix,
int flags = 0,
UrdfVisualShapeCache* cachedLinkGraphicsShapes = 0);
#endif
#endif //_URDF2BULLET_H
@@ -64,6 +64,13 @@ public:
return getJointInfo(urdfLinkIndex, parent2joint, linkTransformInWorld, jointAxisInJointSpace, jointType, jointLowerLimit, jointUpperLimit, jointDamping, jointFriction);
};
virtual bool getJointInfo3(int urdfLinkIndex, btTransform& parent2joint, btTransform& linkTransformInWorld, btVector3& jointAxisInJointSpace, int& jointType, btScalar& jointLowerLimit, btScalar& jointUpperLimit, btScalar& jointDamping, btScalar& jointFriction, btScalar& jointMaxForce, btScalar& jointMaxVelocity, btScalar& twistLimit) const
{
//backwards compatibility for custom file importers
twistLimit = 0;
return getJointInfo2(urdfLinkIndex, parent2joint, linkTransformInWorld, jointAxisInJointSpace, jointType, jointLowerLimit, jointUpperLimit, jointDamping, jointFriction, jointMaxForce, jointMaxVelocity);
};
virtual bool getRootTransformInWorld(btTransform& rootTransformInWorld) const = 0;
virtual void setRootTransformInWorld(const btTransform& rootTransformInWorld) {}
@@ -94,7 +94,8 @@ static void ParseUserData(const XMLElement* element, btHashMap<btHashString,
if (!key_attr) {
logger->reportError("User data tag must have a key attribute.");
}
user_data.insert(key_attr, user_data_xml->GetText());
const char* text = user_data_xml->GetText();
user_data.insert(key_attr, text ? text : "");
}
}
}
@@ -1281,6 +1282,171 @@ bool UrdfParser::parseDeformable(UrdfModel& model, tinyxml2::XMLElement* config,
return true;
}
bool UrdfParser::parseReducedDeformable(UrdfModel& model, tinyxml2::XMLElement* config, ErrorLogger* logger)
{
UrdfReducedDeformable& reduced_deformable = model.m_reducedDeformable;
const char* name = config->Attribute("name");
if (!name)
{
logger->reportError("Reduced deformable with no name");
return false;
}
reduced_deformable.m_name = name;
{
XMLElement* numModes_xml = config->FirstChildElement("num_modes");
if (numModes_xml)
{
if (!numModes_xml->Attribute("value"))
{
logger->reportError("numModes_xml element must have value attribute");
return false;
}
reduced_deformable.m_numModes = urdfLexicalCast<double>(numModes_xml->Attribute("value"));
}
}
{
XMLElement* mass_xml = config->FirstChildElement("mass");
if (mass_xml)
{
if (!mass_xml->Attribute("value"))
{
logger->reportError("mass_xml element must have value attribute");
return false;
}
reduced_deformable.m_mass = urdfLexicalCast<double>(mass_xml->Attribute("value"));
}
}
{
XMLElement* stiffnessScale_xml = config->FirstChildElement("stiffness_scale");
if (stiffnessScale_xml)
{
if (!stiffnessScale_xml->Attribute("value"))
{
logger->reportError("stiffnessScale_xml element must have value attribute");
return false;
}
reduced_deformable.m_stiffnessScale = urdfLexicalCast<double>(stiffnessScale_xml->Attribute("value"));
}
}
{
XMLElement* collisionMargin_xml = config->FirstChildElement("collision_margin");
if (collisionMargin_xml)
{
if (!collisionMargin_xml->Attribute("value"))
{
logger->reportError("collision_margin element must have value attribute");
return false;
}
reduced_deformable.m_collisionMargin = urdfLexicalCast<double>(collisionMargin_xml->Attribute("value"));
}
}
{
XMLElement* erp_xml = config->FirstChildElement("erp");
if (erp_xml)
{
if (!erp_xml->Attribute("value"))
{
logger->reportError("friction element must have value attribute");
return false;
}
reduced_deformable.m_erp = urdfLexicalCast<double>(erp_xml->Attribute("value"));
}
}
{
XMLElement* cfm_xml = config->FirstChildElement("cfm");
if (cfm_xml)
{
if (!cfm_xml->Attribute("value"))
{
logger->reportError("cfm element must have value attribute");
return false;
}
reduced_deformable.m_cfm = urdfLexicalCast<double>(cfm_xml->Attribute("value"));
}
}
{
XMLElement* damping_xml = config->FirstChildElement("damping_coefficient");
if (damping_xml)
{
if (!damping_xml->Attribute("value"))
{
logger->reportError("damping_coefficient element must have value attribute");
return false;
}
reduced_deformable.m_damping = urdfLexicalCast<double>(damping_xml->Attribute("value"));
}
}
{
XMLElement* friction_xml = config->FirstChildElement("friction");
if (friction_xml)
{
if (!friction_xml->Attribute("value"))
{
logger->reportError("friction element must have value attribute");
return false;
}
reduced_deformable.m_friction = urdfLexicalCast<double>(friction_xml->Attribute("value"));
}
}
XMLElement* vis_xml = config->FirstChildElement("visual");
if (!vis_xml)
{
logger->reportError("expected an visual element");
return false;
}
if (!vis_xml->Attribute("filename"))
{
logger->reportError("expected a filename for visual geometry");
return false;
}
std::string fn = vis_xml->Attribute("filename");
reduced_deformable.m_visualFileName = fn;
int out_type(0);
bool success = UrdfFindMeshFile(m_fileIO,
model.m_sourceFile, fn, sourceFileLocation(vis_xml),
&reduced_deformable.m_visualFileName, &out_type);
if (!success)
{
// warning already printed
return false;
}
// collision mesh is optional
XMLElement* col_xml = config->FirstChildElement("collision");
if (col_xml)
{
if (!col_xml->Attribute("filename"))
{
logger->reportError("expected a filename for collision geoemtry");
return false;
}
fn = col_xml->Attribute("filename");
success = UrdfFindMeshFile(m_fileIO,
model.m_sourceFile, fn, sourceFileLocation(col_xml),
&reduced_deformable.m_simFileName, &out_type);
if (!success)
{
// warning already printed
return false;
}
}
ParseUserData(config, reduced_deformable.m_userData, logger);
return true;
}
bool UrdfParser::parseJointLimits(UrdfJoint& joint, XMLElement* config, ErrorLogger* logger)
{
joint.m_lowerLimit = 0.f;
@@ -1289,6 +1455,7 @@ bool UrdfParser::parseJointLimits(UrdfJoint& joint, XMLElement* config, ErrorLog
joint.m_velocityLimit = 0.f;
joint.m_jointDamping = 0.f;
joint.m_jointFriction = 0.f;
joint.m_twistLimit = -1;
if (m_parseSDF)
{
@@ -1303,13 +1470,19 @@ bool UrdfParser::parseJointLimits(UrdfJoint& joint, XMLElement* config, ErrorLog
{
joint.m_upperLimit = urdfLexicalCast<double>(upper_xml->GetText());
}
XMLElement* twist_xml = config->FirstChildElement("twist");
if (twist_xml)
{
joint.m_twistLimit = urdfLexicalCast<double>(twist_xml->GetText());
}
XMLElement* effort_xml = config->FirstChildElement("effort");
if (effort_xml)
{
joint.m_effortLimit = urdfLexicalCast<double>(effort_xml->GetText());
}
XMLElement* velocity_xml = config->FirstChildElement("velocity");
if (velocity_xml)
{
@@ -1336,6 +1509,14 @@ bool UrdfParser::parseJointLimits(UrdfJoint& joint, XMLElement* config, ErrorLog
joint.m_upperLimit *= m_urdfScaling;
}
const char* twist_str = config->Attribute("twist");
if (twist_str)
{
joint.m_twistLimit = urdfLexicalCast<double>(twist_str);
}
// Get joint effort limit
const char* effort_str = config->Attribute("effort");
if (effort_str)
@@ -1343,6 +1524,7 @@ bool UrdfParser::parseJointLimits(UrdfJoint& joint, XMLElement* config, ErrorLog
joint.m_effortLimit = urdfLexicalCast<double>(effort_str);
}
// Get joint velocity limit
const char* velocity_str = config->Attribute("velocity");
if (velocity_str)
@@ -2109,9 +2291,16 @@ bool UrdfParser::loadUrdf(const char* urdfText, ErrorLogger* logger, bool forceF
// logger->printMessage(msg);
XMLElement* reduced_deformable_xml = robot_xml->FirstChildElement("reduced_deformable");
if (reduced_deformable_xml) {
return parseReducedDeformable(m_urdf2Model, reduced_deformable_xml, logger);
}
XMLElement* deformable_xml = robot_xml->FirstChildElement("deformable");
if(deformable_xml)
if (deformable_xml) {
return parseDeformable(m_urdf2Model, deformable_xml, logger);
}
for (XMLElement* link_xml = robot_xml->FirstChildElement("link"); link_xml; link_xml = link_xml->NextSiblingElement("link"))
{
+41 -2
View File
@@ -189,13 +189,15 @@ struct UrdfJoint
double m_jointDamping;
double m_jointFriction;
double m_twistLimit;
UrdfJoint()
: m_lowerLimit(0),
m_upperLimit(-1),
m_effortLimit(0),
m_velocityLimit(0),
m_jointDamping(0),
m_jointFriction(0)
m_jointFriction(0),
m_twistLimit(-1)
{
}
};
@@ -245,6 +247,37 @@ struct UrdfDeformable
}
};
struct UrdfReducedDeformable
{
std::string m_name;
int m_numModes;
double m_mass;
double m_stiffnessScale;
double m_erp;
double m_cfm;
double m_friction;
double m_collisionMargin;
double m_damping;
std::string m_visualFileName;
std::string m_simFileName;
btHashMap<btHashString, std::string> m_userData;
UrdfReducedDeformable()
: m_numModes(1),
m_mass(1),
m_stiffnessScale(100),
m_erp(0.2), // generally, 0.2 is a good value for erp and cfm
m_cfm(0.2),
m_friction(0),
m_collisionMargin(0.02),
m_damping(0),
m_visualFileName(""),
m_simFileName("")
{}
};
struct UrdfModel
{
std::string m_name;
@@ -254,6 +287,7 @@ struct UrdfModel
btHashMap<btHashString, UrdfLink*> m_links;
btHashMap<btHashString, UrdfJoint*> m_joints;
UrdfDeformable m_deformable;
UrdfReducedDeformable m_reducedDeformable;
// Maps user data keys to user data values.
btHashMap<btHashString, std::string> m_userData;
@@ -331,7 +365,7 @@ protected:
bool parseSensor(UrdfModel& model, UrdfLink& link, UrdfJoint& joint, tinyxml2::XMLElement* config, ErrorLogger* logger);
bool parseLameCoefficients(LameCoefficients& lameCoefficients, tinyxml2::XMLElement* config, ErrorLogger* logger);
bool parseDeformable(UrdfModel& model, tinyxml2::XMLElement* config, ErrorLogger* logger);
bool parseReducedDeformable(UrdfModel& model, tinyxml2::XMLElement* config, ErrorLogger* logger);
public:
UrdfParser(struct CommonFileIOInterface* fileIO);
@@ -411,6 +445,11 @@ public:
return m_urdf2Model.m_deformable;
}
const UrdfReducedDeformable& getReducedDeformable() const
{
return m_urdf2Model.m_reducedDeformable;
}
bool mergeFixedLinks(UrdfModel& model, UrdfLink* link, ErrorLogger* logger, bool forceFixedBase, int level);
bool printTree(UrdfLink* link, ErrorLogger* logger, int level);
bool recreateModel(UrdfModel& model, UrdfLink* link, ErrorLogger* logger);

Some files were not shown because too many files have changed in this diff Show More