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
c51fd54d
Commit
c51fd54d
authored
4 years ago
by
Charles Javerliat
Committed by
Charles JAVERLIAT
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add brake for n seconds method
parent
55b50107
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
coordinator/nodes/match.py
+11
-3
11 additions, 3 deletions
coordinator/nodes/match.py
with
11 additions
and
3 deletions
coordinator/nodes/match.py
+
11
−
3
View file @
c51fd54d
...
...
@@ -155,6 +155,14 @@ class CoordinatorNode():
last_theta
=
self
.
theta
time
.
sleep
(
send_interval
)
def
brake_for_n_seconds
(
self
,
secs
):
start
=
rospy
.
get_rostime
().
secs
while
rospy
.
get_rostime
().
secs
-
start
<
secs
:
self
.
set_speed
(
0
,
0
)
time
.
sleep
(
send_interval
)
def
run
(
self
):
self
.
change_pwm
(
True
)
...
...
@@ -169,11 +177,11 @@ class CoordinatorNode():
# self.move(0.8, forward=True)
self
.
turn
(
radians
(
45
))
rospy
.
sleep
(
5
)
self
.
brake_for_n_seconds
(
5
)
self
.
turn
(
radians
(
-
45
))
rospy
.
sleep
(
5
)
self
.
brake_for_n_seconds
(
5
)
self
.
turn
(
radians
(
0
))
rospy
.
sleep
(
5
)
self
.
brake_for_n_seconds
(
5
)
self
.
turn
(
radians
(
180
))
# self.move(0.4, forward=False)
# self.turn(radians(-90))
...
...
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