Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
darwin_robot_driver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
humanoides
darwin
darwin_robot_driver
Commits
cf267bb4
Commit
cf267bb4
authored
5 years ago
by
Sergi Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Updated the IMU example to show gyro data.
parent
e7492a99
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
src/examples/darwin_imu_test.cpp
+3
-3
3 additions, 3 deletions
src/examples/darwin_imu_test.cpp
with
3 additions
and
3 deletions
src/examples/darwin_imu_test.cpp
+
3
−
3
View file @
cf267bb4
...
...
@@ -10,7 +10,7 @@ std::string robot_device="/tmp/darwin_driver";
int
main
(
int
argc
,
char
*
argv
[])
{
int
i
=
0
;
double
accel_x
,
accel_y
,
accel
_z
;
double
gyro_x
,
gyro_y
,
gyro
_z
;
try
{
CDarwinRobot
darwin
(
"Darwin"
,
robot_device
,
1000000
,
0x01
,
true
);
...
...
@@ -19,8 +19,8 @@ int main(int argc, char *argv[])
darwin
.
imu_start
();
for
(
i
=
0
;
i
<
50
;
i
++
)
{
darwin
.
imu_get_
accel
_data
(
&
accel_x
,
&
accel_y
,
&
accel
_z
);
std
::
cout
<<
"
Accel
: x:"
<<
accel
_x
<<
", y: "
<<
accel
_y
<<
", z: "
<<
accel
_z
<<
std
::
endl
;
darwin
.
imu_get_
gyro
_data
(
&
gyro_x
,
&
gyro_y
,
&
gyro
_z
);
std
::
cout
<<
"
Gyro
: x:"
<<
gyro
_x
<<
", y: "
<<
gyro
_y
<<
", z: "
<<
gyro
_z
<<
std
::
endl
;
usleep
(
100000
);
}
darwin
.
imu_stop
();
...
...
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