Repository navigation
Replies: 4 comments 3 replies
|
What does "same topics as real sensors" mean? Would MujocoSimModule publish directly to /go2_a/color_image, /go2_b/color_image, etc. (If so, there are some problems with doing it that way.) Love the sequence diagram for startup. I think one important one would be do describe how communication from the connection module ends up on the simulator. For example, let's say the simulator has a liedown policy implemented. Let's say someone calls the rpc method GO2Connection.liedown. That calls MujocoConnection.liedown. Currently that does nothing. But how would you talk to the Mujoco sim to do it for that robot? |
It can't be a bool cause 1 robot can have many sims |
|
What is the shape of Same question applies for Common useful operations in sims:
Something that evals do is take a pre-made scene, such as an apartment, and spawn an object such as a chair, and then the chair will be used in the eval case. Common APIs that I've ran into that satisfies most needs for consumers: class Actor:
transform: (vector3, quaternion)
# I forget how physics is stored but probably a property for velocity and angular torque
def set_world_transform(transform):
def get_world_transform():
def on_collision(OnCollisionHandler):
OnCollisionHandler(physics_info) # the thing it collided with, point of impact, force of impact, etc
class SimInstance: # this is equivalent to SimulationModule and would handle the actual life cycle of the child process
def load_world(World): # load scene
class World: # this is the scene and responsible for all objects as well as ticking physics
def spawn_actor(ActorClass, transform): # this would either take a callback to allow the caller to tweak specific params of the actor or it can take a config value that would achieve the same
def delete_actor(ActorReference): |
Uh oh!
There was an error while loading. Please reload this page.
Refactor: sim2, a standard Sim interface for DimOS
Builds on Pim's sim2 (
pim/feat/sim2-core)Goals
--simulationchanges.Overview
Connection module: Every connection module also provides a SimAdapter
Go2 already works this way:
make_connection()picks WebRTC, replay, MuJoCo or DimSim (go2/connection.py:143). Its MuJoCo and DimSim backends become oneGo2SimConnectiononSimRobotClient.SimRobotClient: This is what translates between the SimModule and the robot ConnectionModule
Startup: robots are collected from the blueprint
The engine can't add robots after it starts, so every robot is known before the sim starts.
SimulationModule: many robots, one world
flowchart LR subgraph BP["Blueprint: fleet"] A["Go2Connection<br/>go2_a"] B["Go2Connection<br/>go2_b"] X["XArmConnection<br/>arm"] end subgraph SIM["MujocoSimModule: one world"] W["kitchen scene<br/>go2_a, go2_b, arm"] end A -- "SimRobotClient go2_a" --> W B -- "SimRobotClient go2_b" --> W X -- "SimRobotClient arm" --> W W -- "world_state" --> SEN["Sensor workers<br/>cameras of all three robots"]One subclass per engine :
Only real engines get a subclass. RoboCasa and LIBERO run on MuJoCo, so they are scenes for
MujocoSimModule.Transport
world_state,sim_truthand robot state are normal Zenoh traffic.sim2/ipc/. Default to Zenoh as it supports Shm naturally.Rules
sit_down).All reactions