Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wolf_ros_node
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_ros
wolf_ros_node
Commits
7d07728f
Commit
7d07728f
authored
4 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
only advertising publishers if params viz_XX true
parent
80654cc8
No related branches found
No related tags found
3 merge requests
!11
new release
,
!10
new release
,
!4
Gauss
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/visualizer.cpp
+8
-5
8 additions, 5 deletions
src/visualizer.cpp
with
8 additions
and
5 deletions
src/visualizer.cpp
+
8
−
5
View file @
7d07728f
...
@@ -11,11 +11,6 @@ Visualizer::Visualizer() :
...
@@ -11,11 +11,6 @@ Visualizer::Visualizer() :
void
Visualizer
::
initialize
(
ros
::
NodeHandle
&
nh
)
void
Visualizer
::
initialize
(
ros
::
NodeHandle
&
nh
)
{
{
// init publishers ---------------------------------------------------
factors_publisher_
=
nh
.
advertise
<
visualization_msgs
::
MarkerArray
>
(
"factors"
,
1
);
landmarks_publisher_
=
nh
.
advertise
<
visualization_msgs
::
MarkerArray
>
(
"landmarks"
,
1
);
trajectory_publisher_
=
nh
.
advertise
<
visualization_msgs
::
MarkerArray
>
(
"trajectory"
,
1
);
// Load options ---------------------------------------------------
// Load options ---------------------------------------------------
nh
.
param
<
bool
>
(
"viz_factors"
,
viz_factors_
,
true
);
nh
.
param
<
bool
>
(
"viz_factors"
,
viz_factors_
,
true
);
nh
.
param
<
bool
>
(
"viz_overlapped_factors"
,
viz_overlapped_factors_
,
false
);
nh
.
param
<
bool
>
(
"viz_overlapped_factors"
,
viz_overlapped_factors_
,
false
);
...
@@ -61,6 +56,14 @@ void Visualizer::initialize(ros::NodeHandle& nh)
...
@@ -61,6 +56,14 @@ void Visualizer::initialize(ros::NodeHandle& nh)
nh
.
param
<
float
>
(
"factor_geom_color_b"
,
factor_geom_color_
.
b
,
1.0
);
nh
.
param
<
float
>
(
"factor_geom_color_b"
,
factor_geom_color_
.
b
,
1.0
);
nh
.
param
<
float
>
(
"factor_geom_color_a"
,
factor_geom_color_
.
a
,
1
);
nh
.
param
<
float
>
(
"factor_geom_color_a"
,
factor_geom_color_
.
a
,
1
);
// init publishers ---------------------------------------------------
if
(
viz_factors_
)
factors_publisher_
=
nh
.
advertise
<
visualization_msgs
::
MarkerArray
>
(
"factors"
,
1
);
if
(
viz_landmarks_
)
landmarks_publisher_
=
nh
.
advertise
<
visualization_msgs
::
MarkerArray
>
(
"landmarks"
,
1
);
if
(
viz_trajectory_
)
trajectory_publisher_
=
nh
.
advertise
<
visualization_msgs
::
MarkerArray
>
(
"trajectory"
,
1
);
// init markers ---------------------------------------------------
// init markers ---------------------------------------------------
// factor markers message
// factor markers message
factor_marker_
.
type
=
visualization_msgs
::
Marker
::
LINE_LIST
;
factor_marker_
.
type
=
visualization_msgs
::
Marker
::
LINE_LIST
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment