Comments (4)
Hi,
I use this to attach the body to the cable:
<body name="payload" pos="0 0.015 0.02">
<geom type="sphere" size=".001 .001" density="100" rgba=".5 .2 .8 1" mass="0.01"/>
<freejoint/>
</body>
<composite type="cable" count="50 1 1" curve="s 0 0" offset="0 0 0" initial="ball" size="0.39 1 1">
<joint kind="main" damping="0.01" armature="0.001"/>
<geom type="capsule" size=".0005 .001 0.3" rgba=".8 .2 .1 1"/>
</composite>
<equality>
<weld body1="payload" body2="B_last" active="true" anchor="0 0 0" torquescale="0"/>
</equality>
Your cable is defined with many small bodies, and if you want to refer to a specific one, you can use B_0 for the first segment, B_N for the Nth segment, or B_last for the last segment.
I hope this helps
from mujoco.
If you look the code I attached, I do use the equality constraint with B_last. The issue is that there is a gap between the position of the payload and the end of the cable, and if I lengthen the cable, it does not seem to reduce this gap (essentially the payload is suspended in free space below the end of the cable"
from mujoco.
If I understand it correctly, it's because constraints are soft in mujoco. You can use solref
and solimp
in the constraint parameters to make it stiffer.
https://mujoco.readthedocs.io/en/latest/XMLreference.html#equality
from mujoco.
I think this is because the connect constraint assumes it is satisfied in the starting position (and keeps any starting offset constant). Move the payload to the end of the cable in your xml, and it will get rid of the offset! (e.g. pos="0.2 0 0.2")
Beyond that, there will be some small stretching as well from soft constraints like Alessio described as well, which you can stiffen up if needed.
from mujoco.
Related Issues (20)
- Simulate Tactile Sensor Arrays with Touch Grid Plugin
- `mjpython` bug when installed with `uv` package manager HOT 1
- constant speed slider actuator
- I am having gladLoadGL error when I trying to use offscreen = mujoco.MjrContext(self.model, mujoco.mjtFontScale.mjFONTSCALE_150)
- build error from source HOT 3
- Wrong HField vertical scaling in unity plugin HOT 2
- Unity, Mujoco and mujoco_menegeria install guide HOT 1
- gripper simulation enviornment modeling
- How to Solve the Issue of Continuous Control in a Robotic Hand with MuJoCo HOT 1
- A question about the way of avoiding penetration between different geoms in mujoco HOT 4
- How to get bodys' linear and angular velocity(data.cvel?) HOT 2
- Converting mjx.Model into mujoco.MjModel HOT 1
- MJX implementation of mj_jacSubtreeCom HOT 1
- Improving the flexibility of the python passive simulator callbacks.
- Error: engine error: mj_copyData: attempting to copy mjData while stack is in use HOT 1
- Instantiating a freejoint
- Threading issue reported by TSAN when `usethread=1` HOT 4
- Mujoco Python to Unity HOT 3
- ASAN build failure from mj_markStack/mj_freeStack HOT 2
- mujoco.FatalError: gladLoadGL error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mujoco.