Date: Fri, 29 Mar 2024 20:25:56 +0800 (CST) Message-ID: <951700436.7181.1711715156884@2ec0c82278c4> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_7180_1411699240.1711715156884" ------=_Part_7180_1411699240.1711715156884 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This document introduces the demo project of "go_laser_scan", in= cluding how to get the original data of laser scanning.
Content
Sample Code:&= nbsp;
&nbs= p; =EF=BC=88Either one of following=EF=BC=89
Right= click on " get_laser_scan ", then " Properties"=EF=BC=8Cconfigure "include= " and "lib" directories to the corresponding folder path of Slamware SDK.= strong>
It's not necessary to copy files to the pr= oject directory, user will only need to configure the path of SDK.
Get the origi= nal data of laser scanning
=09=09SlamwareCorePlatform sdp =3D SlamwareCorePlatform::connect(argv= [1], 1445); std::cout <<"SDK Version: " << sdp.getSDKVersion() <= < std::endl; std::cout <<"SDP Version: " << sdp.getSDPVersion() <= < std::endl; =09=09rpos::features::system_resource::LaserScan laser_scan =3D sdp.getLase= rScan(); =09 std::vector<rpos::core::LaserPoint> laser_points =3Dlaser_scan= .getLaserPoints();=09=09 =09=09for (std::vector<rpos::core::LaserPoint>::iterator it =3D laser= _points.begin(); it!=3D laser_points.end(); ++it)=20 =09=09=09std::cout << "Angle: " << it->angle() << "; D= istance: " <<=20 =09=09=09it->distance() << "; is Valid: " << it->valid() = << std::endl;=09