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
Stack Of Tasks
roscontrol_sot
Commits
7b24969d
Commit
7b24969d
authored
Dec 07, 2021
by
Guilhem Saurel
Browse files
fix for ROS < NOETIC
parent
8d909c00
Pipeline
#17059
passed with stage
in 3 minutes and 18 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
7b24969d
...
...
@@ -56,10 +56,13 @@ ADD_PROJECT_DEPENDENCY(control_toolbox REQUIRED)
# Detect the controller interface version to switch code
if
(
controller_interface_FOUND
)
if
(
${
controller_interface_VERSION
}
VERSION_GREATER
"0.2.5"
)
if
(
${
controller_interface_VERSION
}
VERSION_GREATER
"0.2.5"
)
add_definitions
(
-DCONTROLLER_INTERFACE_KINETIC
)
endif
(
${
controller_interface_VERSION
}
VERSION_GREATER
"0.2.5"
)
endif
(
controller_interface_FOUND
)
if
(
${
controller_interface_VERSION
}
VERSION_GREATER
"0.19.0"
)
add_definitions
(
-DCONTROLLER_INTERFACE_NOETIC
)
endif
()
endif
()
endif
()
# Detect if temperature sensor controller package is found
# if yes then it is a PAL Robotics Forked code.
...
...
@@ -77,7 +80,7 @@ target_link_libraries(rcsot_controller
sot-core::sot-core
dynamic_graph_bridge::sot_loader
${
control_toolbox_LIBRARIES
}
)
if
(
temperature_sensor_controller_FOUND
)
if
(
temperature_sensor_controller_FOUND
)
target_compile_definitions
(
rcsot_controller PUBLIC TEMPERATURE_SENSOR_CONTROLLER
)
message
(
"temperature_sensor_controller_LIBRARIES:
${
temperature_sensor_controller_LIBRARIES
}
"
)
target_include_directories
(
rcsot_controller SYSTEM PUBLIC
${
temperature_sensor_controller_INCLUDE_DIRS
}
)
...
...
src/roscontrol-sot-controller.cpp
View file @
7b24969d
...
...
@@ -172,7 +172,11 @@ bool RCSotController::initInterfaces(lhi::RobotHW *robot_hw, ros::NodeHandle &,
lns
=
"hardware_interface"
;
// Check if construction finished cleanly
#ifdef CONTROLLER_INTERFACE_NOETIC
if
(
state_
!=
ControllerState
::
CONSTRUCTED
)
{
#else
if
(
state_
!=
CONSTRUCTED
)
{
#endif
ROS_ERROR
(
"Cannot initialize this controller because it "
"failed to be constructed"
);
}
...
...
@@ -319,8 +323,11 @@ bool RCSotController::initInterfaces(lhi::RobotHW *robot_hw, ros::NodeHandle &,
if
(
verbosity_level_
>
0
)
ROS_INFO_STREAM
(
"Initialization of sot-controller Ok !"
);
// success
#ifdef CONTROLLER_INTERFACE_NOETIC
state_
=
ControllerState
::
INITIALIZED
;
#else
state_
=
INITIALIZED
;
#endif
return
true
;
}
...
...
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