diff --git a/build_run_copy.sh b/build_run_copy.sh index 5a6d7bc..fceb04e 100755 --- a/build_run_copy.sh +++ b/build_run_copy.sh @@ -37,11 +37,14 @@ TRACE_NAME="${SCHEDULER_TYPE}_${THREADING_TYPE}_${FUSION_TYPE}_${TRACE_LENGTH}" cd "$LOCAL_PROJECT_DIR" -colcon build --packages-select full_topology --cmake-args "${CMAKE_ARGS[@]}" +echo colcon build --packages-select full_topology --cmake-clean-cache --cmake-clean-first --cmake-args "${CMAKE_ARGS[@]}" +colcon build --packages-select full_topology --cmake-clean-cache --cmake-clean-first --cmake-args "${CMAKE_ARGS[@]}" source install/setup.bash -TRACE_ID=$(taskset -c 2,3 ros2 launch full_topology trace_full_topology.launch.py "length:=${TRACE_LENGTH}" | \ +OUTPUT=$(taskset -c 2,3 ros2 launch full_topology trace_full_topology.launch.py "length:=${TRACE_LENGTH}") +#echo ${OUTPUT} +TRACE_ID=$(echo ${OUTPUT} | \ grep -oP '(?<=Writing tracing session to: /home/niklas/ROS-Dynamic-Executor-Experiments/analysis/tracing/)[^\s]+') if [[ -z "$TRACE_ID" ]]; then diff --git a/src/full_topology/CMakeLists.txt b/src/full_topology/CMakeLists.txt index 0ae7f0c..b2f50c7 100644 --- a/src/full_topology/CMakeLists.txt +++ b/src/full_topology/CMakeLists.txt @@ -26,22 +26,27 @@ option(MULTI_THREADED "Use multi-threading" OFF) option(USE_TIMER_IN_FUSION_NODES "Use timers in fusion nodes" OFF) if(ROS_DEFAULT_EXECUTOR) + message(NOTICE "ROS default executor") add_compile_definitions(ROS_DEFAULT_EXECUTOR) endif() if(EDF_PRIORITY_EXECUTOR) + message(NOTICE "EDF executor") add_compile_definitions(EDF_PRIORITY_EXECUTOR) endif() if(SEMANTIC_EXECUTOR) + message(NOTICE "semantic executor") add_compile_definitions(SEMANTIC_EXECUTOR) endif() if(MULTI_THREADED) + message(NOTICE "multi threaded") add_compile_definitions(MULTI_THREADED) endif() if(USE_TIMER_IN_FUSION_NODES) + message(NOTICE "with timer") add_compile_definitions(USE_TIMER_IN_FUSION_NODES) endif() diff --git a/src/full_topology/src/full_topology.cpp b/src/full_topology/src/full_topology.cpp index 966a707..d876462 100644 --- a/src/full_topology/src/full_topology.cpp +++ b/src/full_topology/src/full_topology.cpp @@ -98,8 +98,10 @@ int main(int argc, char **argv) rclcpp::ExecutorOptions options; options.memory_strategy = strategy; #ifdef MULTI_THREADED + std::cout << "multi threaded EDF" << std::endl; auto executor = priority_executor::MultithreadTimedExecutor(options); #else + std::cout << "single threaded EDF" << std::endl; auto executor = priority_executor::TimedExecutor(options); #endif @@ -108,9 +110,11 @@ int main(int argc, char **argv) #else // default: ROS #ifdef MULTI_THREADED // Create a multi-threaded executor to handle all nodes + std::cout << "multi threaded ros default" << std::endl; rclcpp::executors::MultiThreadedExecutor executor; #else // Create a single-threaded executor to handle all nodes + std::cout << "single threaded ros default" << std::endl; rclcpp::executors::SingleThreadedExecutor executor; #endif #endif diff --git a/src/full_topology/src/nodes.hpp b/src/full_topology/src/nodes.hpp index 935460d..c073aea 100644 --- a/src/full_topology/src/nodes.hpp +++ b/src/full_topology/src/nodes.hpp @@ -101,6 +101,7 @@ public: \ topic, 10, \ [this, name](std_msgs::msg::String::SharedPtr msg) \ { \ + (void) msg; \ }); \ subscriptions_.emplace_back(sub); \ } \