Added new flag and param, fixed underscore on other params.
This commit is contained in:
Родитель
23868216ce
Коммит
e196b9de97
|
@ -113,13 +113,17 @@ class AsaRosNode {
|
||||||
// A flag indicating that the node will use an approximate time synchronization
|
// A flag indicating that the node will use an approximate time synchronization
|
||||||
// policy to synchronize the images with the camera_info messages instead of the
|
// policy to synchronize the images with the camera_info messages instead of the
|
||||||
// exact synchronizer
|
// exact synchronizer
|
||||||
bool use_approx_sync_policy;
|
bool use_approx_sync_policy_;
|
||||||
|
|
||||||
// The queue size of the subscribers used for the image and camera_info topic
|
// The queue size of the subscribers used for the image and camera_info topic
|
||||||
int queue_size;
|
int queue_size_;
|
||||||
|
|
||||||
// A flag that tells the asa interface to log debug logs
|
// A flag that tells the asa interface to log debug logs
|
||||||
bool activate_interface_level_logging;
|
bool activate_interface_level_logging_;
|
||||||
|
|
||||||
|
// Flag to select whether to query the last anchor that was created and read
|
||||||
|
// the anchor id from a cache file, or to manually provide one.
|
||||||
|
bool query_last_anchor_id_from_cache_;
|
||||||
|
|
||||||
// Cache of which anchors are currently being queried. This will be only used
|
// Cache of which anchors are currently being queried. This will be only used
|
||||||
// when reset() (but not resetCompletely() is called, to restart any
|
// when reset() (but not resetCompletely() is called, to restart any
|
||||||
|
|
|
@ -27,20 +27,21 @@ AsaRosNode::~AsaRosNode() {}
|
||||||
|
|
||||||
void AsaRosNode::initFromRosParams() {
|
void AsaRosNode::initFromRosParams() {
|
||||||
|
|
||||||
nh_private_.param("subscriber_queue_size", queue_size, 1);
|
nh_private_.param("subscriber_queue_size", queue_size_, 1);
|
||||||
nh_private_.param("use_approx_sync_policy", use_approx_sync_policy, false);
|
nh_private_.param("use_approx_sync_policy", use_approx_sync_policy_, false);
|
||||||
nh_private_.param("activate_interface_level_logging", activate_interface_level_logging, false);
|
nh_private_.param("activate_interface_level_logging", activate_interface_level_logging_, false);
|
||||||
|
nh_private_.param("query_last_anchor_id_from_cache", query_last_anchor_id_from_cache_, false);
|
||||||
|
|
||||||
if(queue_size > 1 || use_approx_sync_policy) {
|
if(queue_size_ > 1 || use_approx_sync_policy_) {
|
||||||
ROS_INFO_STREAM("Starting image and info subscribers with approximate time sync, where que-size is " << queue_size);
|
ROS_INFO_STREAM("Starting image and info subscribers with approximate time sync, where queue size is " << queue_size_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Subscribe to the camera images.
|
// Subscribe to the camera images.
|
||||||
image_sub_.subscribe(nh_, "image", queue_size);
|
image_sub_.subscribe(nh_, "image", queue_size_);
|
||||||
info_sub_.subscribe(nh_, "camera_info", queue_size);
|
info_sub_.subscribe(nh_, "camera_info", queue_size_);
|
||||||
|
|
||||||
if(use_approx_sync_policy) {
|
if(use_approx_sync_policy_) {
|
||||||
image_info_approx_sync_.reset(new message_filters::Synchronizer<CameraSyncPolicy>(CameraSyncPolicy(queue_size), image_sub_, info_sub_));
|
image_info_approx_sync_.reset(new message_filters::Synchronizer<CameraSyncPolicy>(CameraSyncPolicy(queue_size_), image_sub_, info_sub_));
|
||||||
image_info_approx_sync_->registerCallback(boost::bind(&AsaRosNode::imageAndInfoCallback, this, _1, _2));
|
image_info_approx_sync_->registerCallback(boost::bind(&AsaRosNode::imageAndInfoCallback, this, _1, _2));
|
||||||
} else {
|
} else {
|
||||||
image_info_sync_.reset(
|
image_info_sync_.reset(
|
||||||
|
@ -99,7 +100,7 @@ void AsaRosNode::initFromRosParams() {
|
||||||
|
|
||||||
interface_.reset(new AzureSpatialAnchorsInterface(asa_config));
|
interface_.reset(new AzureSpatialAnchorsInterface(asa_config));
|
||||||
|
|
||||||
if(activate_interface_level_logging){
|
if(activate_interface_level_logging_){
|
||||||
interface_->ActivateInterfaceLevelLogging();
|
interface_->ActivateInterfaceLevelLogging();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче