Probably we are following the Gazebo SIM tutorial “Moving the robot” and added this plugin config to your XML file:


And you received this error message:

[Err] [] DiffDrive plugin should be attached to a model entity. Failed to initialize.

Initially you could think that DiffDrive plugin wasn’t found, but that is not the case.

This error happens because you put the plugin inside the “<world ” section! In fact the plugin should be put inside your vehicle “<model ” section.