A simple rigid body dynamics simulator based on microblx, for the UR5 robot.
This repository may serve as a starting point to develop a more generic simulation/control system for articulated robots, based on the microblx framework.
-
microblx, the framework with which the application in this repository is built.
-
Eigen and the iit-rbd library. These are required to build the C++ dynamics engine of the robot, which is included in this repository.
-
odeint, which is used for the integration of the forward dynamics of the robot.
-
meshcat, the application providing the 3D visualization of the robot meshes.
-
msgpack C++, used to serialize the commands for Meshcat
-
The robot-model-tools, required to load the robot model into Meshcat.
Please switch to the branchmeshcat-viewer
.
-
After cloning this repository, use
cmake
to build and install thelibmeshcatcpp
included with the robot-model-tools (inetc/libmeshcat
).
This library enables communication (via ZMQ) between a C++ client and the Meshcat application. -
Use
cmake
to build and install the UR5 dynamics library, whose sources are underrcgen/cpp/
. This is C++ code that was generated using RobCoGen -
Install microblx according to its documentation
-
Install the microblx blocks provided in this repository:
cd microblx/ ./bootstrap.sh
-
Download here the meshes for the UR5 robot, and copy them in the
meshes/
subdirectory.
-
From the root, please execute
./meshcat.sh
. The robot-model-tools and Meshcat itself must be in the current Python path (you may want to use a virtual environment).
Open the browser at the specified URL. You should be able to see the robot. -
Launch the actual microblx application
cd microblx/ ubx-launch -c ur5-sim.usc,ur5-sim__mix-ptrig.usc
The robot should now start to move.