Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic demo coverage #538

Open
wants to merge 1 commit into
base: humble
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13,072 changes: 13,072 additions & 0 deletions smacc2_sm_reference_library/sm_dance_bot_coverage/CHANGELOG.rst

Large diffs are not rendered by default.

85 changes: 85 additions & 0 deletions smacc2_sm_reference_library/sm_dance_bot_coverage/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
cmake_minimum_required(VERSION 3.5)
project(sm_dance_bot_coverage)

# Default to C++17
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(ament_cmake_python REQUIRED)
find_package(Boost COMPONENTS thread REQUIRED)

find_package(smacc2 REQUIRED)
find_package(std_msgs REQUIRED)
find_package(nav2z_client REQUIRED)

find_package(ros_publisher_client REQUIRED)
find_package(multirole_sensor_client REQUIRED)

find_package(sr_all_events_go REQUIRED)
find_package(sr_event_countdown REQUIRED)
find_package(sr_conditional REQUIRED)
find_package(ros_timer_client REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(visualization_msgs REQUIRED)
find_package(opennav_coverage_msgs REQUIRED)

set(dependencies
smacc2
std_msgs
sensor_msgs
nav2z_client
ros_publisher_client
multirole_sensor_client
sr_all_events_go
sr_event_countdown
sr_conditional
ros_timer_client
visualization_msgs
opennav_coverage_msgs
)

include_directories(include
${Boost_INCLUDE_DIRS})

add_executable(${PROJECT_NAME}_node
src/${PROJECT_NAME}/sm_dance_bot_coverage.cpp
src/${PROJECT_NAME}/clients/cl_navigation_coverage/cl_navigate_coverage.cpp
src/${PROJECT_NAME}/clients/cl_navigation_coverage/client_behaviors/cb_navigate_coverage.cpp

)

ament_target_dependencies(${PROJECT_NAME}_node ${dependencies})
target_link_libraries(${PROJECT_NAME}_node ${Boost_LIBS})

ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
ament_export_dependencies(${dependencies})

ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/sm_dance_bot_coverage.dsv.in")

if(BUILD_TESTING)
endif()

install(TARGETS
${PROJECT_NAME}_node

ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib/${PROJECT_NAME}
)

install(DIRECTORY launch DESTINATION share/${PROJECT_NAME})
install(DIRECTORY worlds DESTINATION share/${PROJECT_NAME})
install(DIRECTORY rviz DESTINATION share/${PROJECT_NAME})
install(DIRECTORY params DESTINATION share/${PROJECT_NAME})
install(DIRECTORY urdf DESTINATION share/${PROJECT_NAME})
install(DIRECTORY models DESTINATION share/${PROJECT_NAME})

ament_package()
53 changes: 53 additions & 0 deletions smacc2_sm_reference_library/sm_dance_bot_coverage/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<h2>State Machine Diagram</h2>

![sm_dance_bot_coverage](docs/SmDanceBot_2023-5-26_151817.svg)

<h2>Description</h2> A full-featured state machine example, that highlights the capabilities of SMACC2 & the ROS2 Navigation Stack via the MoveBaseZ Client.
.<br></br>
<a href="https://robosoft-ai.github.io/smacc2_doxygen/master/html/namespacesm__dance__bot.html">Doxygen Namespace & Class Reference</a>

<h2>Build Instructions</h2>

First, source your ros2 installation.

```
source /opt/ros/humble/setup.bash
```

Before you build, make sure you've installed all the dependencies...

```
rosdep install --ignore-src --from-paths src -y -r
```

Then build with colcon build...

```
colcon build
```
<h2>Operating Instructions</h2>
After you build, remember to source the proper install folder...

```
source ~/workspace/humble_ws/install/setup.sh
```

And then run the launch file...

```
ros2 launch sm_dance_bot_coverage sm_dance_bot_launch.py
```
<h2>Headless launch</h2>

Alternatively, you can also launch the gazebo simulator in headless mode:
```
ros2 launch sm_dance_bot_coverage sm_dance_bot_launch.py headless:=True
```
<h2>Viewer Instructions</h2>
If you have the SMACC2 Runtime Analyzer installed then type...

```
ros2 run smacc2_rta smacc2_rta
```

If you don't have the SMACC2 Runtime Analyzer click <a href="https://robosoft.ai/product-category/smacc2-runtime-analyzer/">here</a>.
Loading
Loading