Public Member Functions | Private Member Functions | Private Attributes
gazebo::GazeboRosKobuki Class Reference

#include <gazebo_ros_kobuki.h>

List of all members.

Public Member Functions

 GazeboRosKobuki ()
 Constructor.
void Load (physics::ModelPtr parent, sdf::ElementPtr sdf)
 Called when plugin is loaded.
void OnUpdate ()
 Called by the world update start event.
 ~GazeboRosKobuki ()
 Destructor.

Private Member Functions

void cmdVelCB (const geometry_msgs::TwistConstPtr &msg)
 Callback for incoming velocity commands.
void motorPowerCB (const kobuki_msgs::MotorPowerPtr &msg)
 Callback for incoming velocity commands.
void resetOdomCB (const std_msgs::EmptyConstPtr &msg)
 Callback for resetting the odometry data.
void spin ()
 Spin method for the spinner thread.

Private Attributes

sensors::ContactSensorPtr bumper_
 Pointer to bumper sensor simulating Kobuki's left, centre and right bumper sensors.
bool bumper_center_is_pressed_
 Flag for left bumper's current state.
bool bumper_center_was_pressed_
 Flag for center bumper's last state.
kobuki_msgs::BumperEvent bumper_event_
 Kobuki ROS message for bumper event.
ros::Publisher bumper_event_pub_
 ROS publisher for bumper events.
bool bumper_left_is_pressed_
 Flag for left bumper's current state.
bool bumper_left_was_pressed_
 Flag for left bumper's last state.
bool bumper_right_is_pressed_
 Flag for left bumper's current state.
bool bumper_right_was_pressed_
 Flag for right bumper's last state.
bool cliff_detected_center_
 Cliff flag for the center sensor.
bool cliff_detected_left_
 Cliff flag for the left sensor.
bool cliff_detected_right_
 Cliff flag for the right sensor.
float cliff_detection_threshold_
 measured distance in meter for detecting a cliff
kobuki_msgs::CliffEvent cliff_event_
 Kobuki ROS message for cliff event.
ros::Publisher cliff_event_pub_
 ROS publisher for cliff detection events.
sensors::RaySensorPtr cliff_sensor_center_
 Pointer to frontal cliff sensor.
sensors::RaySensorPtr cliff_sensor_left_
 Pointer to left cliff sensor.
sensors::RaySensorPtr cliff_sensor_right_
 Pointer to left right sensor.
ros::Subscriber cmd_vel_sub_
 ROS subscriber for velocity commands.
double cmd_vel_timeout_
 Time out for velocity commands in seconds.
int floot_dist_
 Maximum distance to floor.
sensors::ImuSensorPtr imu_
 Pointer to IMU sensor model.
sensor_msgs::Imu imu_msg_
 ROS message for publishing IMU data.
ros::Publisher imu_pub_
 ROS publisher for IMU data.
sensor_msgs::JointState joint_state_
 ROS message for joint sates.
ros::Publisher joint_state_pub_
 ROS publisher for joint state messages.
physics::JointPtr joints_ [2]
 Pointers to Gazebo's joints.
common::Time last_cmd_vel_time_
 Simulation time of the last velocity command (used for time out)
std::string left_wheel_joint_name_
 Left wheel's joint name.
physics::ModelPtr model_
 pointer to the model
ros::Subscriber motor_power_sub_
 ROS subscriber for motor power commands.
bool motors_enabled_
 Flag indicating if the motors are turned on or not.
ros::NodeHandle nh_
 ROS node handles (relative & private)
ros::NodeHandle nh_priv_
std::string node_name_
 node name
nav_msgs::Odometry odom_
 ROS message for odometry data.
double odom_pose_ [3]
 Vector for pose.
ros::Publisher odom_pub_
 ROS publisher for odometry messages.
ros::Subscriber odom_reset_sub_
 ROS subscriber for reseting the odometry data.
geometry_msgs::TransformStamped odom_tf_
 TF transform for the odom frame.
double odom_vel_ [3]
 Vector for velocity.
double * pose_cov_ [36]
 Pointer to pose covariance matrix.
common::Time prev_update_time_
 Simulation time on previous update.
bool publish_tf_
 Flag for (not) publish tf transform for odom -> robot.
std::string right_wheel_joint_name_
 Right wheel's joint name.
bool shutdown_requested_
 extra thread for triggering ROS callbacks
tf::TransformBroadcaster tf_broadcaster_
 TF transform publisher for the odom frame.
double torque_
 Max. torque applied to the wheels.
double * twist_cov_ [36]
 Pointer to twist covariance matrix.
event::ConnectionPtr update_connection_
 pointer to the update event connection (triggers the OnUpdate callback when event update event is received)
math::Vector3 vel_angular_
 Storage for the angular velocity reported by the IMU.
double wheel_diam_
 Diameter of the wheels.
double wheel_sep_
 Separation between the wheels.
double wheel_speed_cmd_ [2]
 Speeds of the wheels.
physics::WorldPtr world_
 pointer to simulated world

Detailed Description

Definition at line 63 of file gazebo_ros_kobuki.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 49 of file gazebo_ros_kobuki.cpp.

Destructor.

Definition at line 67 of file gazebo_ros_kobuki.cpp.


Member Function Documentation

void gazebo::GazeboRosKobuki::cmdVelCB ( const geometry_msgs::TwistConstPtr &  msg) [private]

Callback for incoming velocity commands.

Definition at line 354 of file gazebo_ros_kobuki.cpp.

void gazebo::GazeboRosKobuki::Load ( physics::ModelPtr  parent,
sdf::ElementPtr  sdf 
)

Called when plugin is loaded.

Definition at line 78 of file gazebo_ros_kobuki.cpp.

void gazebo::GazeboRosKobuki::motorPowerCB ( const kobuki_msgs::MotorPowerPtr &  msg) [private]

Callback for incoming velocity commands.

Definition at line 340 of file gazebo_ros_kobuki.cpp.

Called by the world update start event.

Definition at line 368 of file gazebo_ros_kobuki.cpp.

void gazebo::GazeboRosKobuki::resetOdomCB ( const std_msgs::EmptyConstPtr &  msg) [private]

Callback for resetting the odometry data.

Definition at line 361 of file gazebo_ros_kobuki.cpp.

void gazebo::GazeboRosKobuki::spin ( ) [private]

Spin method for the spinner thread.

Definition at line 669 of file gazebo_ros_kobuki.cpp.


Member Data Documentation

sensors::ContactSensorPtr gazebo::GazeboRosKobuki::bumper_ [private]

Pointer to bumper sensor simulating Kobuki's left, centre and right bumper sensors.

Definition at line 175 of file gazebo_ros_kobuki.h.

Flag for left bumper's current state.

Definition at line 189 of file gazebo_ros_kobuki.h.

Flag for center bumper's last state.

Definition at line 183 of file gazebo_ros_kobuki.h.

kobuki_msgs::BumperEvent gazebo::GazeboRosKobuki::bumper_event_ [private]

Kobuki ROS message for bumper event.

Definition at line 179 of file gazebo_ros_kobuki.h.

ROS publisher for bumper events.

Definition at line 177 of file gazebo_ros_kobuki.h.

Flag for left bumper's current state.

Definition at line 187 of file gazebo_ros_kobuki.h.

Flag for left bumper's last state.

Definition at line 181 of file gazebo_ros_kobuki.h.

Flag for left bumper's current state.

Definition at line 191 of file gazebo_ros_kobuki.h.

Flag for right bumper's last state.

Definition at line 185 of file gazebo_ros_kobuki.h.

Cliff flag for the center sensor.

Definition at line 167 of file gazebo_ros_kobuki.h.

Cliff flag for the left sensor.

Definition at line 165 of file gazebo_ros_kobuki.h.

Cliff flag for the right sensor.

Definition at line 169 of file gazebo_ros_kobuki.h.

measured distance in meter for detecting a cliff

Definition at line 171 of file gazebo_ros_kobuki.h.

kobuki_msgs::CliffEvent gazebo::GazeboRosKobuki::cliff_event_ [private]

Kobuki ROS message for cliff event.

Definition at line 163 of file gazebo_ros_kobuki.h.

ROS publisher for cliff detection events.

Definition at line 161 of file gazebo_ros_kobuki.h.

sensors::RaySensorPtr gazebo::GazeboRosKobuki::cliff_sensor_center_ [private]

Pointer to frontal cliff sensor.

Definition at line 157 of file gazebo_ros_kobuki.h.

sensors::RaySensorPtr gazebo::GazeboRosKobuki::cliff_sensor_left_ [private]

Pointer to left cliff sensor.

Definition at line 155 of file gazebo_ros_kobuki.h.

sensors::RaySensorPtr gazebo::GazeboRosKobuki::cliff_sensor_right_ [private]

Pointer to left right sensor.

Definition at line 159 of file gazebo_ros_kobuki.h.

ROS subscriber for velocity commands.

Definition at line 123 of file gazebo_ros_kobuki.h.

Time out for velocity commands in seconds.

Definition at line 127 of file gazebo_ros_kobuki.h.

Maximum distance to floor.

Definition at line 173 of file gazebo_ros_kobuki.h.

sensors::ImuSensorPtr gazebo::GazeboRosKobuki::imu_ [private]

Pointer to IMU sensor model.

Definition at line 193 of file gazebo_ros_kobuki.h.

sensor_msgs::Imu gazebo::GazeboRosKobuki::imu_msg_ [private]

ROS message for publishing IMU data.

Definition at line 199 of file gazebo_ros_kobuki.h.

ROS publisher for IMU data.

Definition at line 197 of file gazebo_ros_kobuki.h.

sensor_msgs::JointState gazebo::GazeboRosKobuki::joint_state_ [private]

ROS message for joint sates.

Definition at line 121 of file gazebo_ros_kobuki.h.

ROS publisher for joint state messages.

Definition at line 119 of file gazebo_ros_kobuki.h.

physics::JointPtr gazebo::GazeboRosKobuki::joints_[2] [private]

Pointers to Gazebo's joints.

Definition at line 113 of file gazebo_ros_kobuki.h.

Simulation time of the last velocity command (used for time out)

Definition at line 125 of file gazebo_ros_kobuki.h.

Left wheel's joint name.

Definition at line 115 of file gazebo_ros_kobuki.h.

physics::ModelPtr gazebo::GazeboRosKobuki::model_ [private]

pointer to the model

Definition at line 101 of file gazebo_ros_kobuki.h.

ROS subscriber for motor power commands.

Definition at line 109 of file gazebo_ros_kobuki.h.

Flag indicating if the motors are turned on or not.

Definition at line 111 of file gazebo_ros_kobuki.h.

ROS node handles (relative & private)

Definition at line 93 of file gazebo_ros_kobuki.h.

Definition at line 93 of file gazebo_ros_kobuki.h.

std::string gazebo::GazeboRosKobuki::node_name_ [private]

node name

Definition at line 95 of file gazebo_ros_kobuki.h.

nav_msgs::Odometry gazebo::GazeboRosKobuki::odom_ [private]

ROS message for odometry data.

Definition at line 147 of file gazebo_ros_kobuki.h.

Vector for pose.

Definition at line 137 of file gazebo_ros_kobuki.h.

ROS publisher for odometry messages.

Definition at line 145 of file gazebo_ros_kobuki.h.

ROS subscriber for reseting the odometry data.

Definition at line 201 of file gazebo_ros_kobuki.h.

geometry_msgs::TransformStamped gazebo::GazeboRosKobuki::odom_tf_ [private]

TF transform for the odom frame.

Definition at line 153 of file gazebo_ros_kobuki.h.

Vector for velocity.

Definition at line 139 of file gazebo_ros_kobuki.h.

double* gazebo::GazeboRosKobuki::pose_cov_[36] [private]

Pointer to pose covariance matrix.

Definition at line 141 of file gazebo_ros_kobuki.h.

Simulation time on previous update.

Definition at line 107 of file gazebo_ros_kobuki.h.

Flag for (not) publish tf transform for odom -> robot.

Definition at line 149 of file gazebo_ros_kobuki.h.

Right wheel's joint name.

Definition at line 117 of file gazebo_ros_kobuki.h.

extra thread for triggering ROS callbacks

flag for shutting down the spinner thread

Definition at line 99 of file gazebo_ros_kobuki.h.

TF transform publisher for the odom frame.

Definition at line 151 of file gazebo_ros_kobuki.h.

Max. torque applied to the wheels.

Definition at line 131 of file gazebo_ros_kobuki.h.

double* gazebo::GazeboRosKobuki::twist_cov_[36] [private]

Pointer to twist covariance matrix.

Definition at line 143 of file gazebo_ros_kobuki.h.

pointer to the update event connection (triggers the OnUpdate callback when event update event is received)

Definition at line 105 of file gazebo_ros_kobuki.h.

math::Vector3 gazebo::GazeboRosKobuki::vel_angular_ [private]

Storage for the angular velocity reported by the IMU.

Definition at line 195 of file gazebo_ros_kobuki.h.

Diameter of the wheels.

Definition at line 135 of file gazebo_ros_kobuki.h.

Separation between the wheels.

Definition at line 133 of file gazebo_ros_kobuki.h.

Speeds of the wheels.

Definition at line 129 of file gazebo_ros_kobuki.h.

physics::WorldPtr gazebo::GazeboRosKobuki::world_ [private]

pointer to simulated world

Definition at line 103 of file gazebo_ros_kobuki.h.


The documentation for this class was generated from the following files:


kobuki_gazebo_plugins
Author(s): Marcus Liebhardt
autogenerated on Wed Aug 26 2015 12:18:28