Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ros-coordination-card
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CdF
CdF 2020-2021
modules
coordination-card
ros-coordination-card
Commits
4883fbe8
Commit
4883fbe8
authored
4 years ago
by
Charles Javerliat
Committed by
Charles JAVERLIAT
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add delay to actuators publish
parent
41a37d23
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
coordinator/nodes/match.py
+9
-6
9 additions, 6 deletions
coordinator/nodes/match.py
with
9 additions
and
6 deletions
coordinator/nodes/match.py
+
9
−
6
View file @
4883fbe8
...
...
@@ -97,17 +97,17 @@ class CoordinatorNode():
t0
=
+
2.0
*
(
w
*
x
+
y
*
z
)
t1
=
+
1.0
-
2.0
*
(
x
*
x
+
y
*
y
)
roll_x
=
math
.
atan2
(
t0
,
t1
)
t2
=
+
2.0
*
(
w
*
y
-
z
*
x
)
t2
=
+
1.0
if
t2
>
+
1.0
else
t2
t2
=
-
1.0
if
t2
<
-
1.0
else
t2
pitch_y
=
math
.
asin
(
t2
)
t3
=
+
2.0
*
(
w
*
z
+
x
*
y
)
t4
=
+
1.0
-
2.0
*
(
y
*
y
+
z
*
z
)
yaw_z
=
math
.
atan2
(
t3
,
t4
)
return
roll_x
,
pitch_y
,
yaw_z
# in radians
return
roll_x
,
pitch_y
,
yaw_z
# in radians
def
aruco_cb
(
self
,
data
):
#if self.enable_aruco_check:
...
...
@@ -120,14 +120,13 @@ class CoordinatorNode():
for
aruco
in
data
.
transforms
:
if
(
aruco
.
fiducial_id
==
17
):
rot
=
aruco
.
transform
.
rotation
euler
=
self
.
euler_from_quaternion
(
rot
.
x
,
rot
.
y
,
rot
.
z
,
rot
.
w
)
euler
=
self
.
euler_from_quaternion
(
rot
.
x
,
rot
.
y
,
rot
.
z
,
rot
.
w
)
print
(
euler
)
if
(
euler
.
x
>
50
):
pass
self
.
weathercock_info
=
None
def
colors_cb
(
self
,
data
):
...
...
@@ -280,24 +279,28 @@ class CoordinatorNode():
msg
=
Bool
()
msg
.
data
=
False
self
.
flag_state_pub
.
publish
(
msg
)
time
.
sleep
(
0.01
)
self
.
flag_state_pub
.
publish
(
msg
)
def
raise_flag
(
self
):
msg
=
Bool
()
msg
.
data
=
True
self
.
flag_state_pub
.
publish
(
msg
)
time
.
sleep
(
0.01
)
self
.
flag_state_pub
.
publish
(
msg
)
def
lower_arm
(
self
):
msg
=
Bool
()
msg
.
data
=
True
self
.
arm_state_pub
.
publish
(
msg
)
time
.
sleep
(
0.01
)
self
.
arm_state_pub
.
publish
(
msg
)
def
raise_arm
(
self
):
msg
=
Bool
()
msg
.
data
=
False
self
.
arm_state_pub
.
publish
(
msg
)
time
.
sleep
(
0.01
)
self
.
arm_state_pub
.
publish
(
msg
)
def
hit_wall
(
self
,
forward
=
True
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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