-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rename irobot_create_toolbox into irobot_create_nodes Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com> * move common utilities to irobot_create_toolbox Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com> * register irobot_create_nodes as rclcpp_components Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com> * update readme Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com> * use new node names in parameter files Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com> * remove declare parameter utility and fix linter tests Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
- Loading branch information
Showing
78 changed files
with
834 additions
and
787 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
irobot_create_common/irobot_create_common_bringup/config/hazard_vector_params.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
irobot_create_common/irobot_create_common_bringup/config/ir_intensity_vector_params.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
irobot_create_common/irobot_create_common_bringup/config/kidnap_estimator_params.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
--- | ||
kidnap_estimator: | ||
kidnap_estimator_publisher: | ||
ros__parameters: | ||
# Kidnap status publisher topic | ||
kidnap_status_topic: /kidnap_status | ||
# Publishers rate | ||
kidnap_status_publish_rate: 1.0 | ||
# Subscription topics | ||
hazard_topic: /hazard_detection |
2 changes: 1 addition & 1 deletion
2
irobot_create_common/irobot_create_common_bringup/config/mock_params.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
irobot_create_common/irobot_create_common_bringup/config/wheel_status_params.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
wheel_status_publisher_node: | ||
wheel_status_publisher: | ||
ros__parameters: | ||
# Publish rate | ||
publish_rate: 62.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
195 changes: 195 additions & 0 deletions
195
irobot_create_common/irobot_create_nodes/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
project(irobot_create_nodes) | ||
|
||
# Default to C++14 | ||
if(NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 14) | ||
endif() | ||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif() | ||
|
||
find_package(ament_cmake REQUIRED) | ||
find_package(angles REQUIRED) | ||
find_package(control_msgs REQUIRED) | ||
find_package(geometry_msgs REQUIRED) | ||
find_package(sensor_msgs REQUIRED) | ||
find_package(nav_msgs REQUIRED) | ||
find_package(irobot_create_msgs REQUIRED) | ||
find_package(irobot_create_toolbox REQUIRED) | ||
find_package(nav_msgs REQUIRED) | ||
find_package(rclcpp REQUIRED) | ||
find_package(rclcpp_action REQUIRED) | ||
find_package(rclcpp_components REQUIRED) | ||
find_package(tf2 REQUIRED) | ||
find_package(tf2_geometry_msgs REQUIRED) | ||
find_package(tf2_ros REQUIRED) | ||
|
||
#### Libraries | ||
|
||
set(dependencies | ||
angles | ||
control_msgs | ||
geometry_msgs | ||
sensor_msgs | ||
nav_msgs | ||
irobot_create_msgs | ||
irobot_create_toolbox | ||
nav_msgs | ||
rclcpp | ||
rclcpp_action | ||
tf2 | ||
tf2_geometry_msgs | ||
tf2_ros | ||
) | ||
|
||
# Hazards vector publisher | ||
add_library(hazard_publisher_lib SHARED) | ||
target_sources( | ||
hazard_publisher_lib | ||
PRIVATE | ||
src/hazards_vector_publisher.cpp | ||
) | ||
target_include_directories(hazard_publisher_lib PUBLIC include) | ||
ament_target_dependencies(hazard_publisher_lib | ||
${dependencies} | ||
) | ||
|
||
rclcpp_components_register_node(hazard_publisher_lib | ||
PLUGIN "irobot_create_nodes::HazardsVectorPublisher" | ||
EXECUTABLE hazards_vector_publisher) | ||
|
||
# IR intensity vector publisher | ||
add_library(ir_intensity_publisher_lib SHARED) | ||
target_sources( | ||
ir_intensity_publisher_lib | ||
PRIVATE | ||
src/ir_intensity_vector_publisher.cpp | ||
) | ||
target_include_directories(ir_intensity_publisher_lib PUBLIC include) | ||
ament_target_dependencies(ir_intensity_publisher_lib | ||
${dependencies} | ||
) | ||
|
||
rclcpp_components_register_node(ir_intensity_publisher_lib | ||
PLUGIN "irobot_create_nodes::IrIntensityVectorPublisher" | ||
EXECUTABLE ir_intensity_vector_publisher) | ||
|
||
# Motion control node | ||
add_library(motion_control_lib SHARED) | ||
target_sources( | ||
motion_control_lib | ||
PRIVATE | ||
src/motion_control_node.cpp | ||
src/motion_control/docking_behavior.cpp | ||
src/motion_control/drive_goal_behaviors.cpp | ||
src/motion_control/reflex_behavior.cpp | ||
src/motion_control/wall_follow_behavior.cpp | ||
src/motion_control/wall_follow_states.cpp | ||
) | ||
target_include_directories(motion_control_lib PUBLIC include) | ||
ament_target_dependencies(motion_control_lib | ||
${dependencies} | ||
) | ||
|
||
rclcpp_components_register_node(motion_control_lib | ||
PLUGIN "irobot_create_nodes::MotionControlNode" | ||
EXECUTABLE motion_control) | ||
|
||
# Wheel status publisher | ||
add_library(wheel_status_publisher_lib SHARED) | ||
target_sources( | ||
wheel_status_publisher_lib | ||
PRIVATE | ||
src/wheels_publisher.cpp | ||
) | ||
target_include_directories(wheel_status_publisher_lib PUBLIC include) | ||
ament_target_dependencies(wheel_status_publisher_lib | ||
${dependencies} | ||
) | ||
|
||
rclcpp_components_register_node(wheel_status_publisher_lib | ||
PLUGIN "irobot_create_nodes::WheelsPublisher" | ||
EXECUTABLE wheel_status_publisher) | ||
|
||
# Robot status publisher | ||
add_library(robot_state_lib SHARED) | ||
target_sources( | ||
robot_state_lib | ||
PRIVATE | ||
src/robot_state.cpp | ||
) | ||
target_include_directories(robot_state_lib PUBLIC include) | ||
ament_target_dependencies(robot_state_lib | ||
${dependencies} | ||
) | ||
|
||
rclcpp_components_register_node(robot_state_lib | ||
PLUGIN "irobot_create_nodes::RobotState" | ||
EXECUTABLE robot_state) | ||
|
||
# Mock publisher | ||
add_library(mock_publisher_lib SHARED) | ||
target_sources( | ||
mock_publisher_lib | ||
PRIVATE | ||
src/mock_publisher.cpp | ||
) | ||
target_include_directories(mock_publisher_lib PUBLIC include) | ||
ament_target_dependencies(mock_publisher_lib | ||
${dependencies} | ||
) | ||
|
||
rclcpp_components_register_node(mock_publisher_lib | ||
PLUGIN "irobot_create_nodes::MockPublisher" | ||
EXECUTABLE mock_publisher) | ||
|
||
# Kidnap estimator publisher | ||
add_library(kidnap_estimator_publisher_lib SHARED) | ||
target_sources( | ||
kidnap_estimator_publisher_lib | ||
PRIVATE | ||
src/kidnap_estimator_publisher.cpp | ||
) | ||
target_include_directories(kidnap_estimator_publisher_lib PUBLIC include) | ||
ament_target_dependencies(kidnap_estimator_publisher_lib | ||
${dependencies} | ||
) | ||
|
||
rclcpp_components_register_node(kidnap_estimator_publisher_lib | ||
PLUGIN "irobot_create_nodes::KidnapEstimator" | ||
EXECUTABLE kidnap_estimator_publisher) | ||
|
||
set(libraries_names | ||
hazard_publisher_lib | ||
ir_intensity_publisher_lib | ||
motion_control_lib | ||
wheel_status_publisher_lib | ||
robot_state_lib | ||
mock_publisher_lib | ||
kidnap_estimator_publisher_lib | ||
) | ||
|
||
#### Install | ||
|
||
install(TARGETS ${libraries_names} | ||
ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib | ||
RUNTIME DESTINATION bin | ||
) | ||
|
||
install(DIRECTORY include/ | ||
DESTINATION include | ||
) | ||
|
||
ament_export_include_directories(include) | ||
ament_export_libraries(${libraries_names}) | ||
ament_export_dependencies(${dependencies}) | ||
|
||
if(BUILD_TESTING) | ||
find_package(ament_lint_auto REQUIRED) | ||
ament_lint_auto_find_test_dependencies() | ||
endif() | ||
|
||
ament_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# iRobot® Create® 3 Nodes | ||
|
||
This package contains a set of nodes used for simulating a iRobot® Create® 3 robot. | ||
Each node is defined in its own shared library and registered using `rclcpp_components` to allow run-time composition in applications. |
Oops, something went wrong.