google-deepmind / google-deepmind/dm_control

[Question] canonical way to implement synchronous actions?

オープン
#361 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
4.7k
フォーク
764
PR マージ指標
30日以内にマージされた PR はありません

説明

I'm interested in using `mujoco` and `dm_control` to simulate a robot that can execute a trajectory for each step in the environment (e.g. for simulating a motion primitive with spatial actions).

In pybullet (or mujoco w/o the dm_control framework) in `environment.step` you would do IK, set the joint targets and call `p.stepSimulation()` untill the target pose is reached according to some criterion or just teleoport the joints to this state, collect the observations and return. But in dm_control, you cannot do this as the callbacks should be executed in time (so that other entities could also update their state based on the physics state or the action).

The number of physics steps required to execute this trajectory can vary quite a bit (nearby pose vs far away, or even teleporting the robot if it is not interacting with objects at that moment), so just running the worst case number of physics steps for each environment step seems very inefficient.

I'm wondering if this kind of synchronous (= "runtime-validated stop condition and hence variable number of physics steps") actions can be realised more efficiently in the `dm_control` framework, and what the canonical way is to do so.

One way I can think of, is an 'early termination' in the inner loop in the `environment.step` method, if the task signals this to the environment (the task itself can query its entities if needed), but that is not facilitated by the current Environment and I feel like I can't be the first person with this question so I wanted to hear if anyone knows a way to do this within the current framework?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。