diamondback:Only showing information from the released package extracted on Unknown. No API documentation available. Please see this page for information on how to submit your repository to our index.
electric:Documentation generated on March 01, 2013 at 04:01 PM
fuerte:Documentation generated on January 03, 2014 at 11:27 AM
groovy:Documentation generated on October 06, 2014 at 01:47 AM
hydro:Documentation generated on August 26, 2015 at 12:22 PM (doc job).
indigo:Documentation generated on July 03, 2019 at 04:00 AM (doc job).
jade:Documentation generated on July 24, 2017 at 10:30 AM (doc job).
kinetic:Documentation generated on February 07, 2021 at 11:07 AM (doc job).
lunar:Documentation generated on July 03, 2019 at 03:06 AM (doc job).
melodic:Documentation generated on August 21, 2022 at 10:51 AM (doc job).
noetic:Documentation generated on August 22, 2022 at 10:25 AM (doc job).
This package contains a class for converting from a 2D laser scan as defined by
sensor_msgs/LaserScan into a point cloud as defined by sensor_msgs/PointCloud
or sensor_msgs/PointCloud2. In particular, it contains functionality to account
for the skew resulting from moving robots or tilting laser scanners.
This package contains a class for converting from a 2D laser scan as defined by
sensor_msgs/LaserScan into a point cloud as defined by sensor_msgs/PointCloud
or sensor_msgs/PointCloud2. In particular, it contains functionality to account
for the skew resulting from moving robots or tilting laser scanners.
This package contains a class for converting from a 2D laser scan as defined by
sensor_msgs/LaserScan into a point cloud as defined by sensor_msgs/PointCloud
or sensor_msgs/PointCloud2. In particular, it contains functionality to account
for the skew resulting from moving robots or tilting laser scanners.
This package contains a class for converting from a 2D laser scan as defined by
sensor_msgs/LaserScan into a point cloud as defined by sensor_msgs/PointCloud
or sensor_msgs/PointCloud2. In particular, it contains functionality to account
for the skew resulting from moving robots or tilting laser scanners.
Maintainer: Dave Hershberger <hersh AT willowgarage DOT com>
This package contains a class for converting from a 2D laser scan as defined by
sensor_msgs/LaserScan into a point cloud as defined by sensor_msgs/PointCloud
or sensor_msgs/PointCloud2. In particular, it contains functionality to account
for the skew resulting from moving robots or tilting laser scanners.
Maintainer: Dave Hershberger <hersh AT willowgarage DOT com>
This package contains a class for converting from a 2D laser scan as defined by
sensor_msgs/LaserScan into a point cloud as defined by sensor_msgs/PointCloud
or sensor_msgs/PointCloud2. In particular, it contains functionality to account
for the skew resulting from moving robots or tilting laser scanners.
Maintainer status: maintained
Maintainer: Dave Hershberger <dave.hershberger AT sri DOT com>, William Woodall <william AT osrfoundation DOT org>
This package contains a class for converting from a 2D laser scan as defined by
sensor_msgs/LaserScan into a point cloud as defined by sensor_msgs/PointCloud
or sensor_msgs/PointCloud2. In particular, it contains functionality to account
for the skew resulting from moving robots or tilting laser scanners.
Maintainer status: maintained
Maintainer: Dave Hershberger <dave.hershberger AT sri DOT com>, William Woodall <william AT osrfoundation DOT org>
This package contains a class for converting from a 2D laser scan as defined by
sensor_msgs/LaserScan into a point cloud as defined by sensor_msgs/PointCloud
or sensor_msgs/PointCloud2. In particular, it contains functionality to account
for the skew resulting from moving robots or tilting laser scanners.
Maintainer status: maintained
Maintainer: Dave Hershberger <dave.hershberger AT sri DOT com>, Mabel Zhang <mabel AT openrobotics DOT org>
Author: Tully Foote, Radu Bogdan Rusu, William Woodall <william AT osrfoundation DOT org>
This package contains a class for converting from a 2D laser scan as defined by
sensor_msgs/LaserScan into a point cloud as defined by sensor_msgs/PointCloud
or sensor_msgs/PointCloud2. In particular, it contains functionality to account
for the skew resulting from moving robots or tilting laser scanners.
Maintainer status: maintained
Maintainer: Dave Hershberger <dave.hershberger AT sri DOT com>, William Woodall <william AT osrfoundation DOT org>
This package contains a class for converting from a 2D laser scan as defined by
sensor_msgs/LaserScan into a point cloud as defined by sensor_msgs/PointCloud
or sensor_msgs/PointCloud2. In particular, it contains functionality to account
for the skew resulting from moving robots or tilting laser scanners.
Maintainer status: maintained
Maintainer: Dave Hershberger <dave.hershberger AT sri DOT com>, Mabel Zhang <mabel AT openrobotics DOT org>
Author: Tully Foote, Radu Bogdan Rusu, William Woodall <william AT osrfoundation DOT org>
This package contains a class for converting from a 2D laser scan as defined by
sensor_msgs/LaserScan into a point cloud as defined by sensor_msgs/PointCloud
or sensor_msgs/PointCloud2. In particular, it contains functionality to account
for the skew resulting from moving robots or tilting laser scanners.
Maintainer status: maintained
Maintainer: Dave Hershberger <dave.hershberger AT sri DOT com>, Mabel Zhang <mabel AT openrobotics DOT org>
Author: Tully Foote, Radu Bogdan Rusu, William Woodall <william AT osrfoundation DOT org>
projectLaser() is simple and fast. It does not change the frame of your data.
transformLaserScanToPointCloud() is slower but more precise. It makes uses of tf and the sensor_msgs/LaserScan time increment to transform each individual ray appropriately. This is the recommended means of transformation for tilting laser scanners or moving robots.
Both of these functions have a final optional argument that augments the sensor_msgs/PointCloud which is created to include extra channels. These channels may include intensities, distances, timestamps, the index or thew viewpoint from the original laser array.
The method projectLaser() does the simplest possible projection of the laser. Each ray is simply projected out along the appropriate angle according to:
The appropriate sine and cosine values are cached, making this a very efficient operation. However, the generated sensor_msgs/PointCloud is in the same frame as the original sensor_msgs/LaserScan. While this has the advantage that it does not require an instance of a tf::transformer or message notifier, it does not hold up in situations where the laser is moving and skew needs to be accounted for.
1laser_geometry::LaserProjectionprojector_; 2 3voidscanCallback (constsensor_msgs::LaserScan::ConstPtr& scan_in) 4{ 5sensor_msgs::PointCloudcloud; 6projector_.projectLaser(*scan_in, cloud); 7 8// Do something with cloud. 9}
High fidelity projection
The transformLaserScanToPointCloud() method does a more advanced projection, but requires that you have set up a tf transform listener. (If you are unfamiliar with tf, it is recommended you go through the tf/Tutorials first.)
Since we are gathering data across the time of the scan, it is often important that the chosen target_frame is actually a fixed frame.
Because the stamp of a sensor_msgs/LaserScan is the time of the first measurement, one cannot simply wait for a transform to target_frame at this stamp. Instead one also has to wait for a transform at the last measurement of the scan.
The method projectLaser() projects a single laser scan from a linear array into a 3D sensor_msgs/PointCloud2. The generated cloud will be in the same frame as the original laser scan.
1importsensor_msgs.point_cloud2aspc2 2importrospy 3fromsensor_msgs.msgimportPointCloud2, LaserScan 4importlaser_geometry.laser_geometryaslg 5importmath 6 7rospy.init_node("laserscan_to_pointcloud") 8 9lp = lg.LaserProjection() 10 11pc_pub = rospy.Publisher("converted_pc", PointCloud2, queue_size=1) 12 13defscan_cb(msg): 14# convert the message of type LaserScan to a PointCloud2 15pc2_msg = lp.projectLaser(msg) 16 17# now we can do something with the PointCloud2 for example: 18# publish it 19pc_pub.publish(pc2_msg) 20 21# convert it to a generator of the individual points 22point_generator = pc2.read_points(pc2_msg) 23 24 25# we can access a generator in a loop 26sum = 0.0 27num = 0 28forpointinpoint_generator: 29ifnotmath.isnan(point[2]) 30sum += point[2] 31num += 1 32# we can calculate the average z value for example 33print(str(sum/num)) 34 35# or a list of the individual points which is less efficient 36point_list = pc2.read_points_list(pc2_msg) 37 38# we can access the point list with an index, each element is a namedtuple 39# we can access the elements by name, the generator does not yield namedtuples! 40# if we convert it to a list and back this possibility is lost 41print(point_list[len(point_list)/2].x) 42 43 44 45rospy.Subscriber("/scan", LaserScan, scan_cb, queue_size=1) 46rospy.spin()
High fidelity projection
Currently there is no Python version of the high fidelity projection