Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iri_adc_jury_server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
mobile_robotics
ADC
ADC_2021
iri_adc_jury_server
Commits
8ae67d89
Commit
8ae67d89
authored
3 years ago
by
Fernando Herrero
Browse files
Options
Downloads
Patches
Plain Diff
Add cfg params
parent
0b05090a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cfg/AdcJuryServer.cfg
+5
-1
5 additions, 1 deletion
cfg/AdcJuryServer.cfg
src/adc_jury_server_alg_node.cpp
+17
-1
17 additions, 1 deletion
src/adc_jury_server_alg_node.cpp
with
22 additions
and
2 deletions
cfg/AdcJuryServer.cfg
+
5
−
1
View file @
8ae67d89
...
...
@@ -39,5 +39,9 @@ gen = ParameterGenerator()
# Name
Type Reconf.level Description Default Min Max
gen.add("rate",
double_t, 0, "Main loop rate (Hz)", 10.0, 0.1, 1000.0)
gen.add("feedback_status_text",
str_t, 0, "Feedback text", "feedback text example")
gen.add("finish_action_with_success",
bool_t, 0, "End action with success", False)
gen.add("finish_action_with_failure",
bool_t, 0, "End action with failure", False)
exit(gen.generate(PACKAGE,
"AdcJuryServerAlgorithm", "AdcJuryServer"))
\ No newline at end of file
exit(gen.generate(PACKAGE,
"AdcJuryServerAlgorithm", "AdcJuryServer"))
This diff is collapsed.
Click to expand it.
src/adc_jury_server_alg_node.cpp
+
17
−
1
View file @
8ae67d89
...
...
@@ -164,8 +164,9 @@ void AdcJuryServerAlgNode::adc_juryGetFeedbackCallback(iri_adc_msgs::adc_juryFee
{
this
->
alg_
.
lock
();
//update feedback data to be sent to client
feedback
->
status
=
"test"
;
feedback
->
status
=
this
->
config_
.
feedback_status_text
;
//ROS_INFO("feedback: %s", feedback->data.c_str());
//ROS_INFO("AdcJuryServerAlgNode::adc_juryGetFeedbackCallback feedback.status='%s'", feedback->status.c_str());
this
->
alg_
.
unlock
();
}
...
...
@@ -177,6 +178,21 @@ void AdcJuryServerAlgNode::node_config_update(Config &config, uint32_t level)
this
->
alg_
.
lock
();
if
(
config
.
rate
!=
this
->
getRate
())
this
->
setRate
(
config
.
rate
);
if
(
config
.
finish_action_with_success
)
{
this
->
adc_jury_finished
=
true
;
this
->
adc_jury_succeeded
=
true
;
config
.
finish_action_with_success
=
false
;
}
if
(
config
.
finish_action_with_failure
)
{
this
->
adc_jury_finished
=
true
;
this
->
adc_jury_succeeded
=
false
;
config
.
finish_action_with_failure
=
false
;
}
this
->
config_
=
config
;
this
->
alg_
.
unlock
();
}
...
...
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