Comments (7)
@xf-zhao See this pull request
This adds impact sounds for robot joints. Please run the test and let me know if it works for you.
In the near future, we plan to simplify the code in the example controller to make it easier to enable impact sounds.
And another question is can we implement (or alternatively) friction sound in TDW?
We're working on this, but it hasn't been implemented yet.
from tdw.
@xf-zhao To follow on from what @alters-mit said above....
We are working on implementing both object scraping and rolling synthesis, to complement the existing impact sound synthesis. These new models will be included in an upcoming release, in the near future.
from tdw.
Thank you very much for the update. I checked your example code, it works fine. Still a minor issue remains for my personal use:
If I set collision_types
to ["obj", "env"]
,
{
"$type": "send_collisions",
"enter": True,
"stay": False,
"exit": True,
"collision_types": ["obj", "env"],
},
the following error occured when a robot gripper contacts the env (like floor):
File "main.py", line 187, in wait_execution
audio_commands = p.get_audio_commands(resp=resp, floor=floor, wall=wall)
File "~/Cloud/Codes/tdw/Python/tdw/py_impact.py", line 464, in get_audio_commands
speeds[target] < 0.01 or target in colliders or target in stays_and_exits:
KeyError: -1794863089
- I checked that in my case the key
-1794863089
is thejoint_id
of thegripper_link
, and it crashes when the gripper touches the floor. - If I set
collision_types
to["obj"]
, everything works fine with no errors. - Anyway, I can avoid such error by limit the gripper's y position to greater than 0, i.e. above floor.
BTW, the impact sound effect looks overall great. But I am still curious about if there any methods to control the threshold of impact sound? (to something like even minor contact will produce sound instead of being quite, maybe there are already small waves if I recorded it to a .wav file but I cannot hear on the fly?).
from tdw.
Anyway, I can avoid such error by limit the gripper's y position to greater than 0, i.e. above floor.
This is a known issue and the upcoming TDW 1.9.0 release will make it easier to manage. Basically, the build crashes if collision detection is enable while the end effector is slightly intersecting with the floor. The update will make it much easier to move the robot to an "initial position" before enabling collision detection.
But I am still curious about if there any methods to control the threshold of impact sound?
PyImpact has an initial_amp
parameter that should help with this. Typically, I just use a frame
counter-- if there is sound for over n frames, I assume that it's really quiet and stop recording.
from tdw.
Also, there is an amp parameter set for every audio-enabled object, in the objects.csv spreadsheet. You can always increase the amp value for a specific object to control the amplitude of the impact sound generated for that object.
from tdw.
This is a known issue and the upcoming TDW 1.9.0 release will make it easier to manage.
Thank you again for your help. Hope to see the new version soon. :)
from tdw.
We just released TDW v1.9.0
This document explains the new robotics API.
This document explains collision detection with robots.
This document explains the new PyImpact API.
This is the v1.8 to v1.9 upgrade guide.
from tdw.
Related Issues (20)
- Lighting is broken in tdw_room if scenes are loaded before it HOT 2
- Incomplete code example
- screen position documentation, missing link
- send_local_transforms actually sent global transforms HOT 3
- rotate_object_by "is_world" doesn't seem to cause any differences HOT 3
- saved images are upsidedown after updating to v1.12.9
- Teleop/Manual Control Example HOT 2
- TDW not compatible with Jupyter Notebook on VSCode HOT 4
- About nav_mesh.py example with magnebot HOT 3
- Invisible Rigid Body Object
- Occupancy Maps with rectangular layouts
- Some object's pivot is not its bottom-center
- send_occlusion and Occlusion is not working properly
- adding `use_centroid` in `teleport_object` api?
- Error when creating asset bundles from .fbx models, .obj file fails to be created
- How to customize build HOT 1
- How are interior_walls treated as mesh obstacles? HOT 2
- Add force in the middle HOT 1
- GPU not in use Error HOT 4
- Plan for releasing non-free models? HOT 1
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 tdw.