This package contains the xacro/urdf/sdf model description of the sjtu drone and the corresponding plugin for Gazebo 11 and ROS 2 Humble.
- models: Gazebo sdf model and model meshes
- include: Header files for the PID controller and drone plugin
- src: Source code for the drone plugin and PID controller
- urdf: Xacro and urdf model description files
- worlds: Contains one playground world
To fully load the world you need to donwload the gazebo models first:
curl -L https://github.com/osrf/gazebo_models/archive/refs/heads/master.zip -o /tmp/gazebo_models.zip \
&& unzip /tmp/gazebo_models.zip -d /tmp && mkdir -p ~/.gazebo/models/ && mv /tmp/gazebo_models-master/* ~/.gazebo/models/ \
&& rm -r /tmp/gazebo_models.zip
To generate the urdf file run the following command:
ros2 run xacro xacro -o ./urdf/sjtu_drone.urdf ./urdf/sjtu_drone.urdf.xacro params_path:="$(ros2 pkg prefix sjtu_drone_bringup)/share/sjtu_drone_bringup/config/drone.yaml" # Generate urdf file, you need to change the mesh path to the gazebo model
To generate the sdf file run the following command:
gz sdf -p ./urdf/sjtu_drone.urdf > ./models/sjtu_drone/model.sdf # Generate sdf file, you need to change the mesh path to the gazebo model