Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lrs_util_del
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lrs
lrs_util_del
Commits
281f7c74
Commit
281f7c74
authored
5 years ago
by
Tommy Persson
Browse files
Options
Downloads
Patches
Plain Diff
Work on costs.
parent
927c3c3a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/delutil.cc
+9
-8
9 additions, 8 deletions
src/delutil.cc
src/delutil.h
+1
-1
1 addition, 1 deletion
src/delutil.h
with
10 additions
and
9 deletions
src/delutil.cc
+
9
−
8
View file @
281f7c74
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#include
"lrs_srvs_del/PrioritizeUnits.h"
#include
"lrs_srvs_del/PrioritizeUnits.h"
#include
"lrs_srvs_del/PrioritizeUnitsResult.h"
#include
"lrs_srvs_del/PrioritizeUnitsResult.h"
#include
"lrs_
srvs_del
/GetBid.h"
#include
"lrs_
msgs_common
/GetBid.h"
#include
"lrs_srvs_del/FIPADelegate.h"
#include
"lrs_srvs_del/FIPADelegate.h"
#include
"lrs_srvs_del/FIPACnpStatus.h"
#include
"lrs_srvs_del/FIPACnpStatus.h"
#include
"lrs_srvs_del/FIPASetAcceptProposal.h"
#include
"lrs_srvs_del/FIPASetAcceptProposal.h"
...
@@ -56,21 +56,22 @@ bool unit_prioritize_result (int request_id, int & n_bids, std::vector<std::stri
...
@@ -56,21 +56,22 @@ bool unit_prioritize_result (int request_id, int & n_bids, std::vector<std::stri
}
}
int
get_bid
(
std
::
string
ns
,
std
::
string
json
)
{
int
get_bid
(
std
::
string
ns
,
std
::
string
unit
,
std
::
string
json
)
{
ROS_INFO
(
"get_bid: %s - %s
"
,
ns
.
c_str
(),
json
.
c_str
());
ROS_INFO
(
"get_bid: %s - %s
- %s"
,
ns
.
c_str
(),
unit
.
c_str
(),
json
.
c_str
());
int
res
=
-
1
;
int
res
=
-
1
;
ros
::
NodeHandle
n
;
ros
::
NodeHandle
n
;
ostringstream
os
;
ostringstream
os
;
os
<<
ns
<<
"/
bidder/
"
<<
"get_bid"
;
os
<<
ns
<<
"/"
<<
"get_bid"
;
ros
::
ServiceClient
client
=
n
.
serviceClient
<
lrs_
srvs_del
::
GetBid
>
(
os
.
str
());
ros
::
ServiceClient
client
=
n
.
serviceClient
<
lrs_
msgs_common
::
GetBid
>
(
os
.
str
());
lrs_srvs_del
::
GetBid
srv
;
lrs_msgs_common
::
GetBid
srv
;
srv
.
request
.
json
=
json
;
srv
.
request
.
ns
=
unit
;
srv
.
request
.
json_tst
=
json
;
if
(
client
.
call
(
srv
))
{
if
(
client
.
call
(
srv
))
{
res
=
srv
.
response
.
cost
;
res
=
srv
.
response
.
bid
;
}
else
{
}
else
{
ROS_ERROR
(
"delutil.cc get_bid: Failed to call get_bid: %s"
,
os
.
str
().
c_str
());
ROS_ERROR
(
"delutil.cc get_bid: Failed to call get_bid: %s"
,
os
.
str
().
c_str
());
res
=
-
1
;
res
=
-
1
;
...
...
This diff is collapsed.
Click to expand it.
src/delutil.h
+
1
−
1
View file @
281f7c74
...
@@ -13,7 +13,7 @@ int unit_prioritize (std::vector<std::string> units, std::string ns, int id);
...
@@ -13,7 +13,7 @@ int unit_prioritize (std::vector<std::string> units, std::string ns, int id);
bool
unit_prioritize_result
(
int
request_id
,
int
&
n_bids
,
std
::
vector
<
std
::
string
>
&
units
);
bool
unit_prioritize_result
(
int
request_id
,
int
&
n_bids
,
std
::
vector
<
std
::
string
>
&
units
);
int
get_bid
(
std
::
string
ns
,
std
::
string
tstns
,
int
id
);
int
get_bid
(
std
::
string
ns
,
std
::
string
unit
,
std
::
string
json
);
std
::
string
delegate
(
std
::
string
ns
,
std
::
string
tstns
,
int
tstid
,
lrs_msgs_del
::
DelArgs
delargs
);
std
::
string
delegate
(
std
::
string
ns
,
std
::
string
tstns
,
int
tstid
,
lrs_msgs_del
::
DelArgs
delargs
);
std
::
string
delegate
(
std
::
string
ns
,
std
::
string
tstns
,
int
tstid
,
lrs_msgs_del
::
DelArgs
delargs
,
std
::
string
delegate
(
std
::
string
ns
,
std
::
string
tstns
,
int
tstid
,
lrs_msgs_del
::
DelArgs
delargs
,
...
...
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