Exercise in writing Gazebo plugins, the brains behind simulated robot behavior :)
- Create plugin catkin package with the following requirements:
catkin_create_pkg writing_plugins gazebo gazebo_ros gazebo_plugins roscpp
- After compilation, add the path to the plugin library (in this case
~/catkin_ws/devel/lib
) to the Gazebo plugin path:export GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:~/catkin_ws/devel/lib
- Resetting the Gazebo simulation time does not reset any counter in the plugin code.
- Initializing a
std::array
without with an implicit constructor requres "extra" braces in the init list:const std::array<std::pair<int, int>, 4> dir = {{{1, 0}, {0, 1}, {-1, 0}, {0, -1}}};
- Strange problem with almost identical code blocks either crashing Gazebo or not in a_model_plugin.cc.
- Gazebo API
SetLinearVel()
. - Gazebo API Reference.
- Gazebo Model Class Reference.
- SDF Format Custom elements and attributes.