Repository navigation
Conversation
|
Hi man, thanks for the PR. I think making the IMU and etc are made as topics which is really nice, but Im not sure about putting a policy inside of NUSim itself. For example, in the NUbots_K1 repo we have different roles that set the walk mode. Here we just load NUSim without a game mode, just with a field and a ball and run Were there any problems with code interfacing with NUSim? If so I can help. Would love people's thoughts here as well |
|
Hi! I'm trying to make the sim interfaces match as close as to the real robot sdk as possible, so that the gameplay code can interface with it seamlessly as possible( without an "translation" layer in between to distinguish sim vs real robot). Some of our code does set the robot into walk mode through dds and then use the python sdk to set the speed. At the moment in Nusim I think we have to interface at thr joint actuator level by rt/joint_ctrl. Later we are going to deploy our own policy and use "custom" mode most of the time so the changes here( for walk) will less likely to be used anyway. The rt/imu and joint_states are still crucial though since our code interface with them directly rather then low state. Let me know what you thinking, I can remove the policy in the PR but keep the ones for imu and joints. Then in our codebase we can have an adapter layer to sim alongside with adapter layer to robot. |
Nice man, I think the topic publishing should definitely go in and the policies should stay outside of the code base but if your code uses the SDK to talk to the robot already, then that same code should work seamlessly with NUSim as was intended by design so an adapter layer should be unnecessary. If something is forcing you to write an adapter please let us know, since that would be something that was missed unintentionally and it should be fixed in here The idea is that your policies and gameplay live in your own codebase and talk to NUSim exactly the way they talk to the real robot by reading the state from the DDS topics, send LowCmd on rt/joint_ctrl in CUSTOM mode. If this is not the case then please ignore what I said lol If there is anything I can help with please don't hesitate to message |
Add joint_states and imu/data as seperate topic, they are still contained in low_state as well. but this matches the robot OS closer.
Now the default walk goes to walk with the amp we trained rather than go to prep with a warning.