Skip to content

Commit acd6828

Browse files
Feature/save viz config (#69)
* start on code to save current config * move config dumping to visualizer node and add plugins * export plugin type when dumping config * export entire config * actually export layer plugin configs * add options to region growing plugin * add option to fill boundary polygons * fix linting
1 parent a708b77 commit acd6828

29 files changed

Lines changed: 302 additions & 62 deletions

hydra_visualizer/config/visualizer_config.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
11
---
2+
plugins:
3+
mesh:
4+
type: MeshPlugin
5+
coloring:
6+
type: SemanticMeshColoring
7+
places_basis_points:
8+
type: BasisPointPlugin
9+
show_voxblox_connections: false
10+
draw_basis_points: true
11+
basis_point_scale: 0.1
12+
places_node_scale: 0.1
13+
khronos_objects:
14+
type: KhronosObjectPlugin
15+
dynamic_color_mode: CONSTANT # ID, SEMANTIC, CONSTANT
16+
places_traversability:
17+
type: TraversabilityPlugin
18+
agent_poses:
19+
type: PosePlugin
20+
num_to_skip: 0
221
renderer:
322
layer_z_step: 5.5 # unit separation between layers
423
collapse_layers: false # whether or not to apply offsets to each of the layers

hydra_visualizer/config/visualizer_plugins.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

hydra_visualizer/include/hydra_visualizer/plugins/basis_point_plugin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ class BasisPointPlugin : public VisualizerPlugin {
7070

7171
void reset(const std_msgs::msg::Header& header) override;
7272

73+
YAML::Node dumpConfig() const override;
74+
7375
protected:
7476
void fillMarkers(const std_msgs::msg::Header& header,
7577
const spark_dsg::DynamicSceneGraph& graph,

hydra_visualizer/include/hydra_visualizer/plugins/footprint_plugin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ class FootprintPlugin : public VisualizerPlugin {
6666

6767
void reset(const std_msgs::msg::Header& header) override;
6868

69+
YAML::Node dumpConfig() const override;
70+
6971
protected:
7072
rclcpp::Publisher<visualization_msgs::msg::MarkerArray>::SharedPtr pub_;
7173
MarkerTracker tracker_;

hydra_visualizer/include/hydra_visualizer/plugins/khronos_object_plugin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ class KhronosObjectPlugin : public VisualizerPlugin {
135135
const spark_dsg::DynamicSceneGraph& graph) override;
136136
void reset(const std_msgs::msg::Header& header) override;
137137

138+
YAML::Node dumpConfig() const override;
139+
138140
protected:
139141
// Helper functions.
140142
void drawDynamicObjects(const Config& config,

hydra_visualizer/include/hydra_visualizer/plugins/layer_plugin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ struct LayerPlugin {
5959

6060
virtual void clearChangeFlag() { has_change_ = false; }
6161

62+
virtual YAML::Node dumpConfig() const { return YAML::Node(); }
63+
6264
protected:
6365
bool has_change_ = false;
6466
};

hydra_visualizer/include/hydra_visualizer/plugins/mesh_plugin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ class MeshPlugin : public VisualizerPlugin {
6363

6464
void reset(const std_msgs::msg::Header& header) override;
6565

66+
YAML::Node dumpConfig() const override;
67+
6668
protected:
6769
config::DynamicConfig<Config> config_;
6870

hydra_visualizer/include/hydra_visualizer/plugins/mesh_point_plugin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ class MeshPointPlugin : public LayerPlugin {
6767
visualization_msgs::msg::MarkerArray& msg,
6868
MarkerTracker& tracker) override;
6969

70+
YAML::Node dumpConfig() const override;
71+
7072
private:
7173
std::string ns_;
7274
config::DynamicConfig<Config> config_;

hydra_visualizer/include/hydra_visualizer/plugins/places_freespace_plugin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ class PlacesFreespacePlugin : public VisualizerPlugin {
6464

6565
void reset(const std_msgs::msg::Header& header) override;
6666

67+
YAML::Node dumpConfig() const override;
68+
6769
protected:
6870
void fillMarkers(const std_msgs::msg::Header& header,
6971
const spark_dsg::DynamicSceneGraph& graph,

hydra_visualizer/include/hydra_visualizer/plugins/pose_plugin.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ class PosePlugin : public VisualizerPlugin {
6060

6161
void reset(const std_msgs::msg::Header& header) override;
6262

63+
YAML::Node dumpConfig() const override;
64+
6365
protected:
6466
size_t num_received_;
6567
rclcpp::Publisher<geometry_msgs::msg::PoseArray>::SharedPtr pub_;

0 commit comments

Comments
 (0)