47 #include <flatland_plugins/update_timer.h> 48 #include <flatland_server/model_plugin.h> 49 #include <flatland_server/timekeeper.h> 50 #include <flatland_server/types.h> 52 #include <sensor_msgs/LaserScan.h> 53 #include <tf/transform_broadcaster.h> 54 #include <visualization_msgs/Marker.h> 55 #include <Eigen/Dense> 57 #ifndef FLATLAND_PLUGINS_LASER_H 58 #define FLATLAND_PLUGINS_LASER_H 87 uint16_t reflectance_layers_bits_;
89 std::default_random_engine
rng_;
96 Eigen::MatrixXf m_world_laser_points_;
117 float ReportFixture(b2Fixture *fixture,
const b2Vec2 &point,
118 const b2Vec2 &normal,
float fraction)
override;
124 void OnInitialize(
const YAML::Node &config)
override;
130 void BeforePhysicsStep(
const Timekeeper &timekeeper)
override;
135 void ComputeLaserRanges();
141 void ParseParameters(
const YAML::Node &config);
std::normal_distribution< double > noise_gen_
gaussian noise generator
Definition: laser.h:90
Eigen::Vector3f v_world_laser_origin_
(0,0) in the laser frame
Definition: laser.h:98
bool broadcast_tf_
whether to broadcast laser origin w.r.t body
Definition: laser.h:80
double noise_std_dev_
noise std deviation
Definition: laser.h:74
Eigen::Matrix3f m_body_to_laser_
tf from body to laser
Definition: laser.h:92
Definition: dummy_model_plugin.h:59
Pose origin_
laser frame w.r.t the body
Definition: laser.h:72
std::string frame_id_
laser frame id name
Definition: laser.h:79
double increment_
laser angle increment
Definition: laser.h:77
std::default_random_engine rng_
random generator
Definition: laser.h:89
float fraction_
Box2D ray trace fraction.
Definition: laser.h:101
Eigen::Matrix3f m_world_to_body_
tf from world to body
Definition: laser.h:93
float intensity_
Intensity of raytrace collision.
Definition: laser.h:102
sensor_msgs::LaserScan laser_scan_
for publishing laser scan
Definition: laser.h:99
std::string topic_
topic name to publish the laser scan
Definition: laser.h:70
double range_
laser max range
Definition: laser.h:73
double min_angle_
< laser max angle
Definition: laser.h:76
bool did_hit_
Box2D ray trace checking if ray hits anything.
Definition: laser.h:100
ros::Publisher scan_publisher_
ros laser topic publisher
Definition: laser.h:104
Eigen::Vector3f v_zero_point_
laser point in the world frame
Definition: laser.h:97
Eigen::Matrix3f m_world_to_laser_
tf from world to laser
Definition: laser.h:94
uint16_t layers_bits_
for setting the layers where laser will function
Definition: laser.h:81
UpdateTimer update_timer_
for controlling update rate
Definition: laser.h:107
Definition: timekeeper.h:55
Eigen::MatrixXf m_laser_points_
laser points in the laser' frame
Definition: laser.h:95
double update_rate_
the rate laser scan will be published
Definition: laser.h:78
Definition: model_plugin.h:64
Body * body_
body the laser frame attaches to
Definition: laser.h:71
Definition: update_timer.h:55
tf::TransformBroadcaster tf_broadcaster_
broadcast laser frame
Definition: laser.h:105
geometry_msgs::TransformStamped laser_tf_
tf from body to laser frame
Definition: laser.h:106