Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EPSA Pae AI Self Driving
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EPSA Personnal Git
EPSA Pae AI Self Driving
Commits
a7c9e66a
Commit
a7c9e66a
authored
2 years ago
by
Ouhouuhu
Browse files
Options
Downloads
Patches
Plain Diff
fix method orientation_voiture
parent
0536d353
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/MCL.py
+8
-2
8 additions, 2 deletions
PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/MCL.py
with
8 additions
and
2 deletions
PAR 152/Yolo V3/TensorFlow-2.x-YOLOv3-master/MCL.py
+
8
−
2
View file @
a7c9e66a
...
...
@@ -99,15 +99,20 @@ def distance_Chamfer(A_x, A_y, B_x, B_y):
def
orientation_voiture
(
x
,
y
):
x1
,
y1
=
x
-
centre_x
,
y
-
centre_y
x1
,
y1
=
x
,
y
#x1,y1 = x-centre_x, y-centre_y
#print(f"1: x: {x1}, y: {y1}")
if
x
<
0
:
x2
,
y2
=
x1
+
diametre
/
2
,
y1
#print(f"2: x: {x2}, y: {y2}")
theta
=
atan
(
y2
/
x2
)
return
theta
-
3.1415
/
2
else
:
x2
,
y2
=
x1
-
diametre
/
2
,
y1
#print(f"2: x: {x2}, y: {y2}")
theta
=
atan
(
y2
/
x2
)
return
theta
-
3.1415
/
2
return
theta
+
3.1415
/
2
def
motion_update
(
commande
,
position
):
...
...
@@ -134,6 +139,7 @@ def motion_update(commande, position):
new_x
,
new_y
=
rotation
((
x
,
y
),(
centre_rotation_x
,
centre_rotation_y
),
angle_rotation
)
new_theta
=
orientation_voiture
(
new_x
,
new_y
)
#print(new_theta)
new_x
+=
rd
.
gauss
(
0
,
sigma_position
)
new_y
+=
rd
.
gauss
(
0
,
sigma_position
)
...
...
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