35 #ifndef GAZEBO_ROS_VELODYNE_LASER_H_ 36 #define GAZEBO_ROS_VELODYNE_LASER_H_ 43 #include <sdf/Param.hh> 44 #include <gazebo/physics/physics.hh> 45 #include <gazebo/transport/TransportTypes.hh> 46 #include <gazebo/msgs/MessageTypes.hh> 47 #include <gazebo/common/Time.hh> 48 #include <gazebo/common/Plugin.hh> 49 #include <gazebo/sensors/SensorTypes.hh> 50 #include <gazebo/plugins/RayPlugin.hh> 52 #include <boost/bind.hpp> 53 #include <boost/thread.hpp> 54 #include <boost/thread/mutex.hpp> 70 public:
void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf);
115 double U = (double)rand() / (double)RAND_MAX;
116 double V = (double)rand() / (double)RAND_MAX;
117 return sigma * (sqrt(-2.0 * ::log(U)) * cos(2.0 * M_PI * V)) + mu;
ros::NodeHandle * rosnode_
pointer to ros node
int laser_connect_count_
Keep track of number of connections.
std::string topic_name_
topic name
sensors::RaySensorPtr parent_ray_sensor_
GazeboRosVelodyneLaser()
Constructor.
static double gaussianKernel(double mu, double sigma)
Gaussian noise generator.
void putLaserData(common::Time &_updateTime)
Put laser data to the ROS topic.
void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf)
Load the plugin.
sensors::SensorPtr parent_sensor_
The parent sensor.
double gaussian_noise_
Gaussian noise.
boost::thread callback_laser_queue_thread_
double min_range_
Minimum range to publish.
~GazeboRosVelodyneLaser()
Destructor.
ros::CallbackQueue laser_queue_
std::string robot_namespace_
for setting ROS name space
common::Time last_update_time_
double max_range_
Maximum range to publish.
void onStats(const boost::shared_ptr< msgs::WorldStatistics const > &_msg)
std::string frame_name_
frame transform name, should match link name
boost::mutex lock_
A mutex to lock access to fields that are used in message callbacks.
virtual void OnNewLaserScans()
Update the controller.