Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Martin Karlsson
turtlerob1
Commits
66d649c6
Commit
66d649c6
authored
Sep 25, 2015
by
Fredrik Bagge Carlson
Browse files
update state_machine
parent
e01ab7e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
state_machine.m
View file @
66d649c6
d2r
=
180
/
pi
;
th_az
=
5
;
% Degrees
step_distance
=
0.1
;
% meters
% sendPosition.moveRelativePosition('map', moveFront, moveLeft, rotateClockwise);
while
(
true
)
...
...
@@ -12,14 +13,14 @@ while(true)
az
=
binauloc
.
Azimuths
()
*
d2r
;
if
~
abs
(
az
)
<
th_az
turn
(
az
);
% Relative, otherwise get current az and calc rel. value
sendPosition
.
moveRelativePosition
(
'map'
,
0
,
0
,
az
);
continue
end
% The angle to the source is small enough, take a step forward
if
~
there
()
s
tep_forward
(
step_distance
);
s
endPosition
.
moveRelativePosition
(
'map'
,
step_distance
,
0
,
0
);
continue
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment