MCPcopy Create free account
hub / github.com/RoboMaster/RoboRTS / LaserScanCallback

Method LaserScanCallback

roborts_costmap/src/obstacle_layer.cpp:132–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132void ObstacleLayer::LaserScanCallback(const sensor_msgs::LaserScanConstPtr &message,
133 const std::shared_ptr<ObservationBuffer> &buffer) {
134 sensor_msgs::PointCloud2 temp_cloud;
135 temp_cloud.header = message->header;
136 try {
137 projector_.transformLaserScanToPointCloud(temp_cloud.header.frame_id, *message, temp_cloud, *tf_);
138 }
139 catch (tf::TransformException &ex) {
140 projector_.projectLaser(*message, temp_cloud);
141 }
142 buffer->Lock();
143 buffer->BufferCloud(temp_cloud);
144 buffer->Unlock();
145}
146
147void ObstacleLayer::LaserScanValidInfoCallback(const sensor_msgs::LaserScanConstPtr &raw_message,
148 const std::shared_ptr<ObservationBuffer> &buffer) {

Callers

nothing calls this directly

Calls 3

LockMethod · 0.80
BufferCloudMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected