Comments (4)
In case any body need this, I managed to change the pos with:
env.sim.model.geom_pos[env.sim.model.geom_name2id("cube")] = <new pose>
from robosuite.
We do not provide functionalities to remove/add/modify objects on the fly because the xml for the environment is fixed. What you could do is to add all objects, and just "teleport" them away somewhere (because you can change their location) when you don't need them.
from robosuite.
Thanks for the immediate response. Can you give an example of how you would change the position of the objects? I have tried to do that by modifying "env.sim.data.body_xpos[env.cube_body_id]" in the Sawyer-Lift env but that does not seem to work for me.
from robosuite.
Thanks, Yuchen! In case it's helpful for anyone else, another way to change or set positions of objects is:
env.sim.data.set_joint_qpos(<obj>, <pos_quat_array>)
e.g. env.sim.data.set_joint_qpos(env.model.mujoco_objects[0].joints[0], np.concatenate([np.ones(3)*j/100, np.array([1, 0, 0, 0])]))
from robosuite.
Related Issues (20)
- AttributeError: module 'OpenGL.EGL' has no attribute 'EGLDeviceEXT' HOT 1
- Offset of Object Observables
- ValueError: Error: body mass is too small, cannot compute center of mass
- can't import shadowhand.xml into robosuite HOT 1
- Errors in playback for sample demonstrations HOT 2
- Remove Aligning tool when collecting demonstrations HOT 1
- Release v1.4.1? HOT 2
- EGLerror while converting demonstrations with state obs to images
- How do you add the trajectory of the end of the arm to the environment? HOT 1
- How can I use mujoco GUI to visualize? HOT 1
- How can I find the dh parameters for the two arms of baxter robot? HOT 4
- How to create your own device? HOT 5
- using robosuite without opengl on linux server HOT 1
- Wipe task
- `flush_freq` in `data_collect_wrapper.py` affecting deterministic episode playback
- Robot is not subjected to gravity and friction
- Confusion about linear_interpolator and control frequency
- How add an impedance controller in teleoperation HOT 1
- Issue importing deformable cloth object
- OpenGL.raw.EGL._errors.EGLError HOT 4
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 robosuite.