how to get the states of other objects in model plugin
I am learning how to write a model plugin to control an object and interact with other objects in Gazebo. In the model plugin tutorial, I see we can get update from "void OnUpdate(const common::UpdateInfo & /_info/)". However, the updateInfo does not seem to contain the poses and motion characteristics of other objects. Could anyone point me to any sample code to do that?
Also, how do I know if my object has a collision with other objects? Are there any events to listen to?
btw: I'm using the direct Gazebo plugins, not the ROS interface yet.
Thank you!