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
43e71290
Commit
43e71290
authored
3 years ago
by
AUTERNAUD Alex
Browse files
Options
Downloads
Patches
Plain Diff
if can not find a path issue
parent
af77249d
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/path.py
+10
-6
10 additions, 6 deletions
social_mpc/path.py
with
10 additions
and
6 deletions
social_mpc/path.py
+
10
−
6
View file @
43e71290
...
@@ -69,6 +69,9 @@ class PathPlanner():
...
@@ -69,6 +69,9 @@ class PathPlanner():
dx
=
dx
,
dx
=
dx
,
coords
=
(
x
,
y
),
coords
=
(
x
,
y
),
max_distance
=
self
.
max_d
)
max_distance
=
self
.
max_d
)
if
len
(
xl
)
==
0
or
len
(
yl
)
==
0
or
len
(
vxl
)
==
0
or
len
(
vyl
)
==
0
:
return
[]
d_angle
=
np
.
arctan2
(
vxl
[
0
],
-
vyl
[
0
])
-
pos
[
2
]
d_angle
=
np
.
arctan2
(
vxl
[
0
],
-
vyl
[
0
])
-
pos
[
2
]
if
dl
[
0
]
<
self
.
max_d_orientation
:
# if within range, set waypoint = target
if
dl
[
0
]
<
self
.
max_d_orientation
:
# if within range, set waypoint = target
wpt_pos
=
[
self
.
target
[
0
],
self
.
target
[
1
],
self
.
target
[
2
]]
wpt_pos
=
[
self
.
target
[
0
],
self
.
target
[
1
],
self
.
target
[
2
]]
...
@@ -142,9 +145,10 @@ class PathPlanner():
...
@@ -142,9 +145,10 @@ class PathPlanner():
continue
continue
wpt
=
self
.
get_next_waypoint
(
robot_pose
)
wpt
=
self
.
get_next_waypoint
(
robot_pose
)
with
lock
:
if
wpt
:
shared_waypoint
[
0
]
=
True
with
lock
:
shared_waypoint
[
1
]
=
float
(
wpt
[
0
])
shared_waypoint
[
0
]
=
True
shared_waypoint
[
2
]
=
float
(
wpt
[
1
])
shared_waypoint
[
1
]
=
float
(
wpt
[
0
])
shared_waypoint
[
3
]
=
float
(
wpt
[
2
])
shared_waypoint
[
2
]
=
float
(
wpt
[
1
])
shared_waypoint
[
3
]
=
float
(
wpt
[
2
])
\ No newline at end of file
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