Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iri_base_algorithm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
labrobotica
ros
iri_core
iri_base_algorithm
Commits
7cc4da0d
Commit
7cc4da0d
authored
5 years ago
by
Alejandro Lopez Gestoso
Browse files
Options
Downloads
Patches
Plain Diff
Made loop_rate_ attribute private; Added setRate and getRate protected functions
parent
ea264ee4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/iri_base_algorithm/iri_base_algorithm.h
+37
-10
37 additions, 10 deletions
include/iri_base_algorithm/iri_base_algorithm.h
with
37 additions
and
10 deletions
include/iri_base_algorithm/iri_base_algorithm.h
+
37
−
10
View file @
7cc4da0d
...
...
@@ -110,16 +110,6 @@ class IriBaseAlgorithm
*/
ros
::
NodeHandle
private_node_handle_
;
/**
* \brief main thread loop rate
*
* This value determines the loop frequency of the node main thread function
* mainThread() in HZ. It is initialized at construction time. This variable
* may be modified in the node implementation constructor if a desired
* frequency is required.
*/
ros
::
Rate
loop_rate_
;
/**
* \brief default main thread frequency
*
...
...
@@ -179,7 +169,31 @@ class IriBaseAlgorithm
*/
dynamic_reconfigure
::
Server
<
Config
>
dsrv_
;
/**
* \brief main thread loop rate
*
* This value determines the loop frequency of the node main thread function
* mainThread() in HZ. It is initialized at construction time. This variable
* may be modified in the node implementation constructor if a desired
* frequency is required.
*/
ros
::
Rate
loop_rate_
;
protected:
/**
* \brief
*
*/
void
setRate
(
double
rate_hz
);
/**
* \brief
*
*/
double
getRate
(
void
);
/**
* \brief dynamic reconfigure server callback
*
...
...
@@ -273,6 +287,19 @@ IriBaseAlgorithm<Algorithm>::~IriBaseAlgorithm()
pthread_join
(
this
->
thread
,
NULL
);
}
template
<
class
Algorithm
>
void
IriBaseAlgorithm
<
Algorithm
>::
setRate
(
double
rate_hz
)
{
this
->
loop_rate_
=
rate_hz
;
}
template
<
class
Algorithm
>
double
IriBaseAlgorithm
<
Algorithm
>::
getRate
(
void
)
{
return
this
->
loop_rate_
;
}
template
<
class
Algorithm
>
void
IriBaseAlgorithm
<
Algorithm
>::
reconfigureCallback
(
Config
&
config
,
uint32_t
level
)
{
...
...
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