This plugin simulates the thrust force and the torque generated by the propeller without aero-dynamic environments. In general, it gives a approximate thrust force and torque function in following format:
Mention: This plugin does not actuates the propeller but only simulate the behavior of propeller. To drive the propeller, please use gazebo_ros2_control plugin.
This plugin uses colcon tools
to build, and before you compiling the code, make sure you have following dependencies:
- ROS2 colcon tools
- Gazebo v11+
- libgazebo-dev
sudo apt install libgazebo-dev
To build this plugin, please first create a ros2 workspace,
mkdir ros2_ws
cd ros2_ws/
mkdir src
cd src
Then clone this project into the src
folder,
git clone [email protected]:UoN-Hari/gz_propeller_plugins.git gz_propeller_plugins
Build this project,
cd ..
colcon build
Add the plugin to your GAZEBO_PLUGIN_PATH
,
echo "export GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:${pwd}/build/gz_propeller_plugins" >> ~/.bashrc
To use this plugin in your gazebo, add the following context in your urdf file:
<gazebo>
<plugin name="PropellerPlugin" filename="libgz_propeller_plugins.so">
<!--
param:
name = "your joint name"
direction = "cw" or "ccw"
torque_constant = "a double value"
force_constant = "a double value"
-->
<joint name="" direction="" torque_constant="" force_constant="" />
...
</plugin>
</gazebo>
- Add more parameters of the propeller to get a more accurate performance with the real world.
- Remove the building depend
colcon tool
.