RobotCAD is a workbench in FreeCAD - a free CAD. RobotCAD is free software.
RobotCAD is also known as FreeCAD OVERCROSS.
Now the development of the basic code for a robot or multicopter to run in a simulation has become instant!
To do this, you only need to press a few buttons. Instead of dozens of hours of reading manuals, writing ROS2 code, Docker code, various configs, trying to make libraries work together and debugging.
The external code generator creates:
The basic code generator creates:
In FreeCAD, you create or import robot parts, then use the RobotCAD workbench tools to define the robot structure (links and joints) and attach your parts (as visuals, collisions, and real parts) to the links, select the materials for the links or the entire robot, set the types of joints and their positions. Click the button to automatically calculate the mass and inertia of the links (based on the selected materials). This data will later be used by the simulation for realistic interaction of the robot with the world.
That's it! All that's left is to click the code generation button.
After the code generation, you can run the startup script, dependencies will be pulled in, the Docker image will be built, and the container will be launched. For simplicity, all this is wrapped in one command.
Next, in the container, using the commands from the README.md file, we launch the ROS2 launcher with our multicopter. Gazebo and RViz will open. Then we launch PX4, it will automatically connect to our multicopter in the simulation and will be ready to accept the command - "take off".
For non-specialized robots, the launch process is the same, but without launching PX4.
As a result, we have a ready-made infrastructure for the robot, packed in Docker. All this is generated with a few clicks of buttons from the workbench for creating robots - RobotCAD.
We created a robot in RobotCAD and immediately launched it in the simulation.
Congratulations! You have a project with infrastructure, now you can write business logic.
The project also creates all the necessary files for launch: airframe, SDF, ROS2 launchers, URDF, etc.
In the airframe, the multicopters have the motor positions relative to the center of mass (as it should be according to the documentation), and not the center of the frame. This makes the drone more stable if the center of mass is shifted.
Tested on Ubuntu 22.04 as host PC.
You can use the usual ROS2 and PX4 guides to further program the logic required by your project.
There are plans to expand the capabilities of the code generator, and over time, more will be available through the generator.
If you are not familiar with the presented stack of technologies wrapped in Docker, then this is all open source and is one of the most popular solutions for developing robots in the world.