mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 17:40:23 +08:00
Integrated to UI
This commit is contained in:
@@ -43,6 +43,8 @@ struct PointXYZIT {
|
||||
};
|
||||
|
||||
class RTABMAP_CORE_EXPORT LidarVLP16 :public Lidar, public pcl::VLPGrabber {
|
||||
public:
|
||||
static bool available();
|
||||
public:
|
||||
LidarVLP16(
|
||||
const std::string& pcapFile,
|
||||
|
||||
@@ -474,7 +474,7 @@ LidarOuster::LidarOuster(
|
||||
pcapFile_(pcapFile),
|
||||
jsonFile_(jsonFile)
|
||||
{
|
||||
UASSERT(!pcapFile.empty() && !jsonFile.empty());
|
||||
UASSERT(!pcapFile.empty());
|
||||
UDEBUG("Using PCAP file \"%s\" and JSON file \"%s\"", pcapFile.c_str(), jsonFile.c_str());
|
||||
}
|
||||
LidarOuster::~LidarOuster()
|
||||
@@ -525,7 +525,7 @@ bool LidarOuster::init(const std::string &, const std::string &)
|
||||
(ouster::sensor::timestamp_mode)timestampMode_);
|
||||
|
||||
if(!clientHandle) {
|
||||
UERROR("Failed to connect to sensor!");
|
||||
UERROR("Failed to connect to sensor! Verify that the Ouster can be reached on the network at this address \"%s\".", sensorHostname_.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -540,6 +540,11 @@ bool LidarOuster::init(const std::string &, const std::string &)
|
||||
}
|
||||
else if(!pcapFile_.empty())
|
||||
{
|
||||
if(jsonFile_.empty())
|
||||
{
|
||||
UERROR("A JSON path should be provided when a PCAP path is used.");
|
||||
return false;
|
||||
}
|
||||
UDEBUG("");
|
||||
auto pcapHandle = ouster::sensor_utils::replay_initialize(pcapFile_);
|
||||
if(!pcapHandle) {
|
||||
|
||||
@@ -124,6 +124,15 @@ LidarVLP16::~LidarVLP16()
|
||||
UDEBUG("Stopped lidar!");
|
||||
}
|
||||
|
||||
bool LidarVLP16::available()
|
||||
{
|
||||
#if PCL_VERSION_COMPARE(>=, 1, 8, 0)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void LidarVLP16::setOrganized(bool enable)
|
||||
{
|
||||
organized_ = true;
|
||||
|
||||
Reference in New Issue
Block a user