Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Motor_Controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
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
Spring
WP6_Robot_Behavior
Motor_Controller
Commits
876a7725
"README.md" did not exist on "d28fe73fee53c2e65a16544af3728d3e78cebc4b"
Commit
876a7725
authored
2 years ago
by
AUTERNAUD Alex
Browse files
Options
Downloads
Patches
Plain Diff
closing controller issue
parent
7aadb872
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
social_mpc/controller.py
+7
-2
7 additions, 2 deletions
social_mpc/controller.py
with
7 additions
and
2 deletions
social_mpc/controller.py
+
7
−
2
View file @
876a7725
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
from
multiprocessing
import
Process
,
Lock
from
multiprocessing
import
Process
,
Lock
from
multiprocessing.managers
import
SharedMemoryManager
from
multiprocessing.managers
import
SharedMemoryManager
from
multiprocessing
import
active_children
import
atexit
import
atexit
import
rospy
import
rospy
import
time
import
time
...
@@ -268,7 +269,7 @@ class RobotController():
...
@@ -268,7 +269,7 @@ class RobotController():
self
.
flags
,
self
.
flags
,
self
.
lock
))
self
.
lock
))
self
.
path_planner_process
.
start
()
self
.
path_planner_process
.
start
()
atexit
.
register
(
lambda
x
:
self
.
on_subprocess_exit
(
"
Path planner
"
),
self
.
path_planner_process
)
#
atexit.register(lambda x: self.on_subprocess_exit("Path planner"), self.path_planner_process)
def
update_shared_memory
(
self
,
state
):
def
update_shared_memory
(
self
,
state
):
if
self
.
shared_global_map
is
None
:
if
self
.
shared_global_map
is
None
:
...
@@ -464,7 +465,7 @@ class RobotController():
...
@@ -464,7 +465,7 @@ class RobotController():
self
.
flags
,
self
.
flags
,
self
.
lock
))
self
.
lock
))
self
.
goal_finder_process
.
start
()
self
.
goal_finder_process
.
start
()
atexit
.
register
(
lambda
x
:
self
.
on_subprocess_exit
(
"
Goal finder
"
),
self
.
goal_finder_process
)
#
atexit.register(lambda x: self.on_subprocess_exit("Goal finder"), self.goal_finder_process)
def
get_static_cost_map
(
self
,
state
):
def
get_static_cost_map
(
self
,
state
):
tic
=
time
.
time
()
tic
=
time
.
time
()
...
@@ -747,6 +748,8 @@ class RobotController():
...
@@ -747,6 +748,8 @@ class RobotController():
self
.
actions
=
np
.
copy
(
self
.
initial_action
)
self
.
actions
=
np
.
copy
(
self
.
initial_action
)
def
close
(
self
):
def
close
(
self
):
active
=
active_children
()
rospy
.
loginfo
(
f
'
Active Children before closing:
{
len
(
active
)
}
'
)
with
self
.
lock
:
with
self
.
lock
:
self
.
flags
[
0
]
=
0
self
.
flags
[
0
]
=
0
if
self
.
path_planner_enabled
:
if
self
.
path_planner_enabled
:
...
@@ -756,4 +759,6 @@ class RobotController():
...
@@ -756,4 +759,6 @@ class RobotController():
if
self
.
smm_enabled
:
if
self
.
smm_enabled
:
self
.
smm
.
shutdown
()
self
.
smm
.
shutdown
()
self
.
is_init
=
False
self
.
is_init
=
False
active
=
active_children
()
rospy
.
loginfo
(
f
'
Active Children at the end of closing:
{
len
(
active
)
}
'
)
rospy
.
loginfo
(
'
RobotController closed
'
)
rospy
.
loginfo
(
'
RobotController closed
'
)
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