Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
autonomy-payload
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
Model registry
Operate
Environments
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Squires, Eric
autonomy-payload
Commits
1b32f53a
Commit
1b32f53a
authored
8 years ago
by
Squires, Eric
Browse files
Options
Downloads
Patches
Plain Diff
PATH_PLANNING: check param server for id prior to using input
parent
37d810c0
No related branches found
No related tags found
1 merge request
!1
Smart Shooter
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ap_lib/src/ap_lib/distributed_algorithms.py
+6
-5
6 additions, 5 deletions
ap_lib/src/ap_lib/distributed_algorithms.py
with
6 additions
and
5 deletions
ap_lib/src/ap_lib/distributed_algorithms.py
+
6
−
5
View file @
1b32f53a
...
...
@@ -17,7 +17,7 @@ import rospy
# ACS imports
import
ap_msgs.msg
as
apmsg
import
ap_lib.bitmapped_bytes
as
bytes
import
socket
class
LossyDataExchange
(
object
):
'''
Abstract class used in support of reliable information exchange
...
...
@@ -55,13 +55,14 @@ class LossyDataExchange(object):
@param msg_publisher: ROS publisher to the swarm_data_msg topic
@param lock: reentrant lock that will be used to enforce thread safety
'''
if
own_id
is
None
:
try
:
if
rospy
.
has_param
(
"
aircraft_id
"
):
self
.
_own_id
=
int
(
rospy
.
get_param
(
"
aircraft_id
"
))
else
:
except
socket
.
error
:
if
own_id
is
not
None
:
self
.
_own_id
=
own_id
else
:
rospy
.
logerr
(
"
cannot retrieve aircraft_id from parameter server
"
)
else
:
self
.
_own_id
=
own_id
self
.
_short_list_parser
=
bytes
.
UShortListParser
()
self
.
_short_list_parser
.
source_id
=
self
.
_own_id
...
...
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