I thought I'd share a project I've recently done with Bittle in case anyone is interested in exploring simulation with Bittle in a non reinforcement learning application, although one could also use Mujoco for reinforcement learning also.
I used the URDF created for Bittle here. AIWintermuteAI made the URDF files for Bittle a while back, which was a great starting point to get a model of Bittle into the Mujoco simulator made by google deepmind.
My project aimed to use model predictive control (MPC) to generate optimal gait patterns to run open loop on the Bittle robot. The first step was to get a model into the simulator. To do this, I converted the URDF model to XML format for the simulator. Then I created the environment and configuration to use Mujoco Model Predictive Control (MJPC) with Bittle. MJPC was also developed by google deepmind.
MJPC effectively performs forward rollout in the simulation environment as the state estimation to perform model predictive control. One implements residual functions based on stability, gait phase adherence, distance to goal location, etc. to develop the cost function to optimize over. A nice feature in MJPC is the ability to tune residual weights and parameters in real time, so you can visualize how tuning impacts the dynamics in real time.
Once the weights are tuned, one can save the joint angle histories from the simulation to extract a sequence of joint angles to run open loop on the robot. Here is a screenshot of the MJPC environment:
And here is a plot of the joint angle histories from a simulation run:
I've made a fork of the MJPC environment, and if you follow the build instructions, then you can select the Bittle environment from the drop down in the MJPC GUI. There is certainly more improvement that can be done on my implementation, but I think it is a good starting place for those interested in experimenting with Bittle in a simulation environment, and I've personally found Mujoco to be more user friendly than the Isaac Gym and Isaac Sim environments. Here is the repo with the fork of MJPC with the Bittle implementation: https://github.com/gravesreid/mujoco_mpc_bittle.git
Looks like a good tool to explore gait modeling / optimization. Thanks for sharing!
Cool! Have you tried the model at: https://github.com/PetoiCamp/ros_opencat/tree/ros1/petoi_ROS_model_docs/bittle_ros/bittle_description?