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
f3d17270
Commit
f3d17270
authored
3 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
added problem/node_rate in YAMLS params
parent
f39a0c81
No related branches found
No related tags found
2 merge requests
!11
new release
,
!10
new release
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/node.h
+3
-1
3 additions, 1 deletion
include/node.h
src/node.cpp
+6
-3
6 additions, 3 deletions
src/node.cpp
with
9 additions
and
4 deletions
include/node.h
+
3
−
1
View file @
f3d17270
...
@@ -95,8 +95,10 @@ class WolfRosNode
...
@@ -95,8 +95,10 @@ class WolfRosNode
int
print_depth_
;
int
print_depth_
;
bool
print_constr_by_
,
print_metric_
,
print_state_blocks_
;
bool
print_constr_by_
,
print_metric_
,
print_state_blocks_
;
public:
public:
double
node_rate_
;
WolfRosNode
();
WolfRosNode
();
virtual
~
WolfRosNode
(){};
virtual
~
WolfRosNode
(){};
...
...
This diff is collapsed.
Click to expand it.
src/node.cpp
+
6
−
3
View file @
f3d17270
...
@@ -56,7 +56,10 @@ WolfRosNode::WolfRosNode()
...
@@ -56,7 +56,10 @@ WolfRosNode::WolfRosNode()
ROS_INFO
(
"Creating solver..."
);
ROS_INFO
(
"Creating solver..."
);
solver_
=
FactorySolver
::
create
(
"SolverCeres"
,
problem_ptr_
,
server
);
solver_
=
FactorySolver
::
create
(
"SolverCeres"
,
problem_ptr_
,
server
);
// ROS SUBSCRIBERS
// ROS
node_rate_
=
server
.
getParam
<
double
>
(
"problem/node_rate"
);
// SUBSCRIBERS
ROS_INFO
(
"Creating subscribers..."
);
ROS_INFO
(
"Creating subscribers..."
);
for
(
auto
it
:
server
.
getParam
<
std
::
vector
<
std
::
map
<
std
::
string
,
std
::
string
>>>
(
"ROS subscriber"
))
for
(
auto
it
:
server
.
getParam
<
std
::
vector
<
std
::
map
<
std
::
string
,
std
::
string
>>>
(
"ROS subscriber"
))
{
{
...
@@ -67,7 +70,7 @@ WolfRosNode::WolfRosNode()
...
@@ -67,7 +70,7 @@ WolfRosNode::WolfRosNode()
subscribers_
.
push_back
(
FactorySubscriber
::
create
(
subscriber
,
subscriber
+
" - "
+
topic
,
server
,
problem_ptr_
->
getSensor
(
sensor
),
nh_
));
subscribers_
.
push_back
(
FactorySubscriber
::
create
(
subscriber
,
subscriber
+
" - "
+
topic
,
server
,
problem_ptr_
->
getSensor
(
sensor
),
nh_
));
}
}
//
ROS
PUBLISHERS
// PUBLISHERS
ROS_INFO
(
"Creating publishers..."
);
ROS_INFO
(
"Creating publishers..."
);
for
(
auto
it
:
server
.
getParam
<
std
::
vector
<
std
::
map
<
std
::
string
,
std
::
string
>>>
(
"ROS publisher"
))
for
(
auto
it
:
server
.
getParam
<
std
::
vector
<
std
::
map
<
std
::
string
,
std
::
string
>>>
(
"ROS publisher"
))
{
{
...
@@ -208,7 +211,7 @@ int main(int argc, char **argv)
...
@@ -208,7 +211,7 @@ int main(int argc, char **argv)
// Wolf node
// Wolf node
WolfRosNode
wolf_node
;
WolfRosNode
wolf_node
;
ros
::
Rate
loopRate
(
100
);
ros
::
Rate
loopRate
(
wolf_node
.
node_rate_
);
// periodic stuff
// periodic stuff
ros
::
Time
last_check
=
ros
::
Time
::
now
();
ros
::
Time
last_check
=
ros
::
Time
::
now
();
...
...
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