Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Paul Rouanet
ros2_control_bolt
Commits
c269092c
Commit
c269092c
authored
Jul 19, 2021
by
Paul Rouanet
Browse files
Trying to use system_bolt.cpp function to test them on Bolt
parent
3eea12ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
ros2_control_bolt/test/demo_config.cpp
View file @
c269092c
...
...
@@ -3,17 +3,20 @@
#include
<
system_bolt.hpp
>
#include
"
system_bolt.hpp
"
#include
<odri_control_interface/utils.hpp>
#include
<odri_control_interface/imu.hpp>
using
namespace
odri_control_interface
;
using
namespace
ros2_control_bolt
;
#include
<iostream>
#include
<stdexcept>
const
hardware_interface
::
HardwareInfo
info_test
;
std
::
shared_ptr
<
odri_control_interface
::
Robot
>
robot
;
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -26,10 +29,13 @@ int main(int argc, char **argv)
nice
(
-
20
);
// Give the process a high priority.
//configure()
SystemBoltHardware
::
init_robot
(
info_test
,
robot
);
SystemBoltHardware
::
configure
(
info_test
);
// Start the robot.
robot
->
S
tart
();
SystemBoltHardware
::
s
tart
();
int
c
=
0
;
...
...
@@ -42,7 +48,7 @@ int main(int argc, char **argv)
last
=
std
::
chrono
::
system_clock
::
now
();
// last+dt would be better
robot
->
ParseSensorData
();
c
++
;
/*
c++;
if (c % 1000 == 0)
{
std::cout << "Count : " << c << "\n";
...
...
@@ -81,7 +87,7 @@ int main(int argc, char **argv)
std::cout << "\n";
std::cout << std::endl;
}
}
*/
}
else
{
...
...
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment