Jason Klein, Myles Pasetsky (Spring 2024)
URDF model of the rc cars for use in simulators. Exported from Fusion360 CAD model using fusion2urdf, with additional post-processing tweaks to get the Ackermann linkage lined up correctly. More detail on these steps is in Modification.
Make sure you have Gazebo installed (the model has only been tested in Gazebo Classic). Globally install the necessary packages with
sudo apt install ros-noetic-gazebo-ros-pkgs
In order to use mimic
joint constraints in Gazebo, you'll need to clone this repo into your src/
directory, install ros-noetic-control-toolbox
, and then build with catkin_make
.
You might also need
ros-noetic-joint-state-publisher
ros-noetic-robot-state-publisher
ros-noetic-controller-manager
ros-noetic-gazebo-ros-control
ros-noetic-joint-state-controller
ros-noetic-effort-controllers
To preview the URDF in RViz and expose a joint publisher, run the display.launch
file from the rc_model
package using
roslaunch rc_model display.launch
Run both the Gazebo simulator and the controller with
roslaunch rc_model gazebo.launch
roslaunch rc_model controller.launch
This will expose a couple topics with names ending in command
. Publish to those or use rqt_gui
for convenience.
Note
Very little experimentation has been done with Gazebo integration so far, but that will be documented here once we know more about it.
The original CAD file is here. In order to make the URDF export process easier, that file was heavily modified, and all of the bodies were joined together into a minimal set of components with extraneous holes removed. The modified CAD file is here.
In order to get the Ackermann linkage working properly in ROS/Gazebo, it has to be faked, because URDF doesn't support four-bar linkages. Fortunately, the servo horn and left/right wheel mounts always share the same rotation, so a couple mimic joints allow it to be simulated properly.
There's also an issue with the exporter in that joint offset transforms don't get saved, so the second CAD file was particular with the order of joints and transforms.