Skip to content

Commit a46e4bb

Browse files
Updating STVL topic parsing and namespacing to match Obstacle and Voxel layer updates (#310)
* Updating STVL topic parsing to match Obstacle and Voxel layer updates Signed-off-by: Steve Macenski <[email protected]> * fix other build warnings Signed-off-by: Steve Macenski <[email protected]> --------- Signed-off-by: Steve Macenski <[email protected]>
1 parent 61fcb47 commit a46e4bb

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

spatio_temporal_voxel_layer/include/spatio_temporal_voxel_layer/measurement_buffer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
#include "rclcpp_lifecycle/lifecycle_node.hpp"
5858
// TF
5959
#include "tf2_ros/buffer.h"
60-
#include "message_filters/subscriber.h"
60+
#include "message_filters/subscriber.hpp"
6161
// msgs
6262
#include "sensor_msgs/msg/point_cloud2.hpp"
6363
#include "geometry_msgs/msg/quaternion.hpp"

spatio_temporal_voxel_layer/include/spatio_temporal_voxel_layer/spatio_temporal_voxel_layer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
// tf
7474
#include "tf2_ros/transform_listener.h"
7575
#include "tf2_ros/message_filter.h"
76-
#include "message_filters/subscriber.h"
76+
#include "message_filters/subscriber.hpp"
7777
#include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"
7878
#include "tf2/buffer_core.h"
7979

spatio_temporal_voxel_layer/src/spatio_temporal_voxel_grid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ void SpatioTemporalVoxelGrid::ResetGridArea(
401401
boost::unique_lock<boost::mutex> lock(_grid_lock);
402402

403403
openvdb::DoubleGrid::ValueOnCIter cit_grid = _grid->cbeginValueOn();
404-
for (cit_grid; cit_grid.test(); ++cit_grid)
404+
for (; cit_grid.test(); ++cit_grid)
405405
{
406406
const openvdb::Coord pt_index(cit_grid.getCoord());
407407
const openvdb::Vec3d pose_world = this->IndexToWorld(pt_index);

spatio_temporal_voxel_layer/src/spatio_temporal_voxel_layer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ void SpatioTemporalVoxelLayer::onInitialize(void)
152152
auto save_grid_callback = std::bind(
153153
&SpatioTemporalVoxelLayer::SaveGridCallback, this, _1, _2, _3);
154154
_grid_saver = node->create_service<spatio_temporal_voxel_layer::srv::SaveGrid>(
155-
"save_grid", save_grid_callback, rmw_qos_profile_services_default, callback_group_);
155+
"save_grid", save_grid_callback, rclcpp::SystemDefaultsQoS(), callback_group_);
156156

157157
_voxel_grid = std::make_unique<volume_grid::SpatioTemporalVoxelGrid>(
158158
node->get_clock(), _voxel_size, static_cast<double>(default_value_), _decay_model,
@@ -258,6 +258,8 @@ void SpatioTemporalVoxelLayer::onInitialize(void)
258258
"Only topics that use pointclouds or laser scans are supported.");
259259
}
260260

261+
topic = joinWithParentNamespace(topic);
262+
261263
// create an observation buffer
262264
_observation_buffers.push_back(
263265
std::shared_ptr<buffer::MeasurementBuffer>(
@@ -342,7 +344,7 @@ void SpatioTemporalVoxelLayer::onInitialize(void)
342344
_observation_subscribers.back());
343345
std::string toggle_topic = source + "/toggle_enabled";
344346
auto server = node->create_service<std_srvs::srv::SetBool>(
345-
toggle_topic, toggle_srv_callback, rmw_qos_profile_services_default, callback_group_);
347+
toggle_topic, toggle_srv_callback, rclcpp::SystemDefaultsQoS(), callback_group_);
346348

347349
_buffer_enabler_servers.push_back(server);
348350

0 commit comments

Comments
 (0)