This plugin is used to create rosbag files from within gazebo. More...
#include <gazebo_bag_plugin.h>
Public Member Functions | |
GazeboBagPlugin () | |
virtual | ~GazeboBagPlugin () |
Protected Member Functions | |
void | ActuatorsCallback (const mav_msgs::ActuatorsConstPtr &control_msg) |
Called when a Actuators message is received. More... | |
void | AttitudeThrustCallback (const mav_msgs::AttitudeThrustConstPtr &control_msg) |
Called when a AttitudeThrust message is received. More... | |
void | CommandPoseCallback (const geometry_msgs::PoseStampedConstPtr &pose_msg) |
Called when a PoseStamped message is received. More... | |
void | ExternalForceCallback (const geometry_msgs::WrenchStampedConstPtr &force_msg) |
Called when an WrenchStamped message is received. More... | |
void | ImuCallback (const sensor_msgs::ImuConstPtr &imu_msg) |
Called when an IMU message is received. More... | |
void | Load (physics::ModelPtr _model, sdf::ElementPtr _sdf) |
Load the plugin. More... | |
void | LogGroundTruth (const common::Time now) |
Log the ground truth pose and twist. More... | |
void | LogMotorVelocities (const common::Time now) |
Log all the motor velocities. More... | |
void | LogWrenches (const common::Time now) |
Log all the wrenches. More... | |
void | OnUpdate (const common::UpdateInfo &) |
Called when the world is updated. More... | |
void | RateThrustCallback (const mav_msgs::RateThrustConstPtr &control_msg) |
Called when a RateThrust message is received. More... | |
bool | RecordingServiceCallback (rotors_comm::RecordRosbag::Request &req, rotors_comm::RecordRosbag::Response &res) |
Called when a request to start or stop recording is received. More... | |
void | StartRecording () |
Starting recording the rosbag. More... | |
void | StopRecording () |
Stop recording the rosbag. More... | |
void | WaypointCallback (const trajectory_msgs::MultiDOFJointTrajectoryConstPtr &trajectory_msg) |
Called when a MultiDOFJointTrajectoryPoint message is received. More... | |
void | WindSpeedCallback (const rotors_comm::WindSpeedConstPtr &wind_speed_msg) |
Called when a WindSpeed message is received. More... | |
Private Types | |
typedef std::map< const unsigned int, const physics::JointPtr > | MotorNumberToJointMap |
typedef std::pair< const unsigned int, const physics::JointPtr > | MotorNumberToJointPair |
Private Member Functions | |
template<class T > | |
void | writeBag (const std::string &topic, const ros::Time &time, const T &msg) |
template<class T > | |
void | writeBag (const std::string &topic, const ros::Time &time, boost::shared_ptr< T const > const &msg) |
This plugin is used to create rosbag files from within gazebo.
This plugin is ROS dependent, and is not built if NO_ROS=TRUE is provided to CMakeLists.txt (as in the case of a PX4/Firmware build).
Definition at line 64 of file gazebo_bag_plugin.h.
|
private |
Definition at line 65 of file gazebo_bag_plugin.h.
|
private |
Definition at line 66 of file gazebo_bag_plugin.h.
|
inline |
Definition at line 68 of file gazebo_bag_plugin.h.
|
virtual |
Definition at line 30 of file gazebo_bag_plugin.cpp.
|
protected |
Called when a Actuators message is received.
Definition at line 293 of file gazebo_bag_plugin.cpp.
|
protected |
Called when a AttitudeThrust message is received.
Definition at line 285 of file gazebo_bag_plugin.cpp.
|
protected |
Called when a PoseStamped message is received.
[in] | pose_msg | A PoseStamped message from geometry_msgs. |
Definition at line 278 of file gazebo_bag_plugin.cpp.
|
protected |
Called when an WrenchStamped message is received.
[in] | force_msg | A WrenchStamped message from geometry_msgs. |
Definition at line 264 of file gazebo_bag_plugin.cpp.
|
protected |
Called when an IMU message is received.
[in] | imu_msg | A IMU message from sensor_msgs. |
Definition at line 258 of file gazebo_bag_plugin.cpp.
|
protected |
Load the plugin.
[in] | _model | Pointer to the model that loaded this plugin. |
[in] | _sdf | SDF element that describes the plugin. |
Definition at line 39 of file gazebo_bag_plugin.cpp.
|
protected |
Log the ground truth pose and twist.
[in] | now | The current gazebo common::Time |
Definition at line 332 of file gazebo_bag_plugin.cpp.
|
protected |
Log all the motor velocities.
[in] | now | The current gazebo common::Time |
Definition at line 314 of file gazebo_bag_plugin.cpp.
|
protected |
Log all the wrenches.
[in] | now | The current gazebo common::Time |
Definition at line 369 of file gazebo_bag_plugin.cpp.
|
protected |
Called when the world is updated.
[in] | _info | Update timing information. |
Definition at line 154 of file gazebo_bag_plugin.cpp.
|
protected |
Called when a RateThrust message is received.
Definition at line 300 of file gazebo_bag_plugin.cpp.
|
protected |
Called when a request to start or stop recording is received.
[in] | req | The request to start or stop recording. |
[out] | res | The response to be sent back to the client. |
Definition at line 398 of file gazebo_bag_plugin.cpp.
|
protected |
Starting recording the rosbag.
Definition at line 166 of file gazebo_bag_plugin.cpp.
|
protected |
Stop recording the rosbag.
Definition at line 235 of file gazebo_bag_plugin.cpp.
|
protected |
Called when a MultiDOFJointTrajectoryPoint message is received.
[in] | trajectory_msg | A MultiDOFJointTrajectoryPoint message from trajectory_msgs. |
Definition at line 271 of file gazebo_bag_plugin.cpp.
|
protected |
Called when a WindSpeed message is received.
[in] | wind_speed_msg | A WindSpeed message from rotors_comm. |
Definition at line 307 of file gazebo_bag_plugin.cpp.
|
inlineprivate |
Definition at line 226 of file gazebo_bag_plugin.h.
|
inlineprivate |
Definition at line 245 of file gazebo_bag_plugin.h.
|
private |
Definition at line 207 of file gazebo_bag_plugin.h.
|
private |
Definition at line 194 of file gazebo_bag_plugin.h.
|
private |
Definition at line 171 of file gazebo_bag_plugin.h.
|
private |
Definition at line 218 of file gazebo_bag_plugin.h.
|
private |
Definition at line 185 of file gazebo_bag_plugin.h.
|
private |
Pointer to the ContactManager to get all collisions of this link and its children.
Definition at line 177 of file gazebo_bag_plugin.h.
|
private |
Definition at line 214 of file gazebo_bag_plugin.h.
|
private |
Definition at line 186 of file gazebo_bag_plugin.h.
|
private |
Definition at line 215 of file gazebo_bag_plugin.h.
|
private |
Definition at line 187 of file gazebo_bag_plugin.h.
|
private |
Definition at line 216 of file gazebo_bag_plugin.h.
|
private |
Definition at line 188 of file gazebo_bag_plugin.h.
|
private |
Definition at line 223 of file gazebo_bag_plugin.h.
|
private |
Definition at line 212 of file gazebo_bag_plugin.h.
|
private |
Definition at line 183 of file gazebo_bag_plugin.h.
|
private |
Definition at line 192 of file gazebo_bag_plugin.h.
|
private |
Definition at line 180 of file gazebo_bag_plugin.h.
|
private |
Definition at line 181 of file gazebo_bag_plugin.h.
|
private |
Definition at line 211 of file gazebo_bag_plugin.h.
|
private |
Definition at line 182 of file gazebo_bag_plugin.h.
|
private |
Whether the plugin is currenly recording a rosbag.
Definition at line 205 of file gazebo_bag_plugin.h.
|
private |
Definition at line 169 of file gazebo_bag_plugin.h.
|
private |
Definition at line 193 of file gazebo_bag_plugin.h.
|
private |
Definition at line 168 of file gazebo_bag_plugin.h.
|
private |
Definition at line 173 of file gazebo_bag_plugin.h.
|
private |
Definition at line 191 of file gazebo_bag_plugin.h.
|
private |
Mutex lock for thread safety of writing bag files.
Definition at line 199 of file gazebo_bag_plugin.h.
|
private |
Definition at line 179 of file gazebo_bag_plugin.h.
|
private |
Definition at line 208 of file gazebo_bag_plugin.h.
|
private |
Definition at line 221 of file gazebo_bag_plugin.h.
|
private |
Definition at line 195 of file gazebo_bag_plugin.h.
|
private |
Definition at line 196 of file gazebo_bag_plugin.h.
|
private |
Pointer to the update event connection.
Definition at line 165 of file gazebo_bag_plugin.h.
|
private |
Whether the plugin should wait for user command to start recording.
Definition at line 202 of file gazebo_bag_plugin.h.
|
private |
Definition at line 213 of file gazebo_bag_plugin.h.
|
private |
Definition at line 184 of file gazebo_bag_plugin.h.
|
private |
Definition at line 217 of file gazebo_bag_plugin.h.
|
private |
Definition at line 189 of file gazebo_bag_plugin.h.
|
private |
Definition at line 167 of file gazebo_bag_plugin.h.
|
private |
Definition at line 190 of file gazebo_bag_plugin.h.