1 minute read

During these three weeks, I continued improving the code in two main areas.

The first one was understanding how the neural network is used. I have now confirmed that it takes 99 inputs, and the heading of the twist command was actually the extra value that should not be included. Once this was clarified, I continued working on fixing the way the network is integrated into the simulation.

I discovered that the network output does not directly represent the final joint values. Instead, it produces values between -1 and 1, which are multiplied by a scale factor to obtain an offset. This offset is then applied to the default joint positions to determine the final pose.

Although I found several arrays that seem to correspond to the scaling factors and default joint positions, the network is still not working correctly. This suggests that there may still be an issue either in these arrays or in the way the inputs are being computed.

At the same time, I also changed the way the simulation loop is structured.

Previously, inference was performed during every simulation iteration before updating the simulator. Now, the process has been divided into three separate threads:

  • Simulation thread: runs the MuJoCo simulation as fast as possible.
  • Network thread: performs inference at 50 Hz.
  • Control thread: generates the movement commands used by the network at 10 Hz.

This new structure should improve performance and make the execution flow more realistic by separating simulation, control, and inference tasks.

Summary

  • Improved understanding of the network inputs
  • Updated how the network outputs are interpreted
  • Reworked the simulation architecture using three threads

Categories:

Updated: