Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
model_car_drivers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
mobile_robotics
ADC
libraries
model_car_drivers
Commits
07579cd8
Commit
07579cd8
authored
4 years ago
by
Sergi Hernandez
Browse files
Options
Downloads
Patches
Plain Diff
Checked the operation of the emergency stop.
parent
1d508a0e
No related branches found
No related tags found
1 merge request
!1
Sergi
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/model_car_actuators.h
+1
-1
1 addition, 1 deletion
include/model_car_actuators.h
src/examples/model_car_actuators_test.cpp
+1
-22
1 addition, 22 deletions
src/examples/model_car_actuators_test.cpp
src/model_car_actuators.cpp
+7
-2
7 additions, 2 deletions
src/model_car_actuators.cpp
with
9 additions
and
25 deletions
include/model_car_actuators.h
+
1
−
1
View file @
07579cd8
...
@@ -20,7 +20,7 @@ class CModelCarActuators: public CModelCarDriverBase
...
@@ -20,7 +20,7 @@ class CModelCarActuators: public CModelCarDriverBase
public:
public:
CModelCarActuators
(
std
::
string
name
);
CModelCarActuators
(
std
::
string
name
);
void
send_command
(
double
speed
,
double
steering
);
void
send_command
(
double
speed
,
double
steering
);
void
emergency_stop
(
void
);
void
emergency_stop
(
bool
active
);
void
enable_ultrasounds
(
void
);
void
enable_ultrasounds
(
void
);
void
disable_ultrasounds
(
void
);
void
disable_ultrasounds
(
void
);
~
CModelCarActuators
(
void
);
~
CModelCarActuators
(
void
);
...
...
This diff is collapsed.
Click to expand it.
src/examples/model_car_actuators_test.cpp
+
1
−
22
View file @
07579cd8
...
@@ -34,28 +34,7 @@ int main(int argc, char *argv[])
...
@@ -34,28 +34,7 @@ int main(int argc, char *argv[])
act_driver
->
send_command
(
vx
,
steer
);
act_driver
->
send_command
(
vx
,
steer
);
}
}
act_driver
->
send_command
(
0.0
,
0.0
);
act_driver
->
send_command
(
0.0
,
0.0
);
/*
if(test_watchdog)
{
std::cout << "model_car_actuators_test::main: sending watchdog" << std::endl;
act_driver->send_watchdog();
}
if(test_emergency_stop)
{
std::cout << "model_car_actuators_test::main: sending emergency stop" << std::endl;
act_driver->send_emergency_stop();
}
if(test_enable_disable_uss)
{
std::cout << "model_car_actuators_test::main: sending enable uss" << std::endl;
act_driver->send_enable_uss();
std::cout << "model_car_actuators_test::main: sending disable uss" << std::endl;
act_driver->send_disable_uss();
}
*/
act_driver
->
close
();
act_driver
->
close
();
delete
act_driver
;
delete
act_driver
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/model_car_actuators.cpp
+
7
−
2
View file @
07579cd8
...
@@ -43,9 +43,14 @@ void CModelCarActuators::send_command(double speed,double steering)
...
@@ -43,9 +43,14 @@ void CModelCarActuators::send_command(double speed,double steering)
this
->
send_request
(
ID_ARD_ACT_STEER_SERVO
,
1
,
&
cmd
);
this
->
send_request
(
ID_ARD_ACT_STEER_SERVO
,
1
,
&
cmd
);
}
}
void
CModelCarActuators
::
emergency_stop
(
void
)
void
CModelCarActuators
::
emergency_stop
(
bool
active
)
{
{
uint8_t
cmd
=
1
;
uint8_t
cmd
;
if
(
active
)
cmd
=
1
;
else
cmd
=
0
;
this
->
send_request
(
ID_ARD_ACT_EMERGENCY_STOP
,
1
,
&
cmd
);
this
->
send_request
(
ID_ARD_ACT_EMERGENCY_STOP
,
1
,
&
cmd
);
}
}
...
...
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