Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hochautomatisiertes-Fahren
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Philipp Badenhoop
Hochautomatisiertes-Fahren
Commits
2e14cee3
Commit
2e14cee3
authored
6 years ago
by
Hoop77
Browse files
Options
Downloads
Patches
Plain Diff
-
parent
dc02d9f6
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/catkin_ws/src/VeloxProtocolLib/test/SpeedMeasure.cpp
+16
-3
16 additions, 3 deletions
modules/catkin_ws/src/VeloxProtocolLib/test/SpeedMeasure.cpp
with
16 additions
and
3 deletions
modules/catkin_ws/src/VeloxProtocolLib/test/SpeedMeasure.cpp
+
16
−
3
View file @
2e14cee3
...
@@ -2,12 +2,24 @@
...
@@ -2,12 +2,24 @@
// Created by philipp on 10.05.18.
// Created by philipp on 10.05.18.
//
//
#include
<iostream>
#include
"../include/VeloxProtocolLib/Connection.h"
#include
"../include/VeloxProtocolLib/Connection.h"
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
using
namespace
veloxProtocol
;
using
namespace
veloxProtocol
;
using
namespace
std
::
chrono_literals
;
using
namespace
std
::
chrono_literals
;
if
(
argc
<
4
)
{
std
::
cerr
<<
"Usage: speed angle time[s]
\n
"
;
return
-
1
;
}
float
speed
=
atof
(
argv
[
1
]);
float
angle
=
atof
(
argv
[
2
]);
int
time
=
atoi
(
argv
[
3
]);
networking
::
Networking
net
;
networking
::
Networking
net
;
std
::
atomic
<
bool
>
running
{
true
};
std
::
atomic
<
bool
>
running
{
true
};
auto
conn
=
Connection
::
create
(
net
);
auto
conn
=
Connection
::
create
(
net
);
...
@@ -18,11 +30,12 @@ int main(int argc, char ** argv)
...
@@ -18,11 +30,12 @@ int main(int argc, char ** argv)
[]
[]
{});
{});
conn
->
setSpeed
(
speed
);
conn
->
setSteeringAngle
(
angle
);
auto
timer
=
networking
::
time
::
Timer
::
create
(
net
);
auto
timer
=
networking
::
time
::
Timer
::
create
(
net
);
conn
->
setSteeringAngle
(
-
4.0
f
);
conn
->
setSpeed
(
1.0
f
);
timer
->
startTimeout
(
timer
->
startTimeout
(
10s
,
std
::
chrono
::
seconds
{
time
}
,
[
&
]
[
&
]
{
{
conn
->
setSpeed
(
0.0
f
);
conn
->
setSpeed
(
0.0
f
);
...
...
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