Integrated to UI

This commit is contained in:
matlabbe
2024-08-18 21:04:08 -07:00
parent 0de0fe3ec6
commit 7253450251
16 changed files with 606 additions and 47 deletions

View File

@@ -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,

View File

@@ -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) {

View File

@@ -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;