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

Fix system_tests flaky issue #1723

Merged
merged 3 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion nav2_system_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if(BUILD_TESTING)
find_package(ament_cmake_gtest REQUIRED)
find_package(ament_cmake_pytest REQUIRED)

# add_subdirectory(src/planning)
add_subdirectory(src/planning)
add_subdirectory(src/localization)
add_subdirectory(src/system)
add_subdirectory(src/updown)
Expand Down
3 changes: 2 additions & 1 deletion nav2_system_tests/src/planning/planner_tester.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ class NavFnPlannerTester : public nav2_planner::PlannerServer
costmap_ros_->getCostmap()->resizeMap(
prop.size_x, prop.size_y,
prop.resolution, prop.origin.position.x, prop.origin.position.x);
unsigned char * costmap_ptr = costmap_ros_->getCostmap()->getCharMap();
// Volatile prevents compiler from treating costmap_ptr as unused or changing its address
volatile unsigned char * costmap_ptr = costmap_ros_->getCostmap()->getCharMap();
delete[] costmap_ptr;
costmap_ptr = new unsigned char[prop.size_x * prop.size_y];
std::copy(cm.data.begin(), cm.data.end(), costmap_ptr);
Expand Down
4 changes: 2 additions & 2 deletions nav2_system_tests/src/system/test_multi_robot_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def generate_launch_description():

bringup_dir = get_package_share_directory('nav2_bringup')
robot1_params_file = os.path.join(bringup_dir, # noqa: F841
'params/nav2_multirobot_params_1.yaml')
'params/nav2_multirobot_params_1.yaml')
robot2_params_file = os.path.join(bringup_dir, # noqa: F841
'params/nav2_multirobot_params_2.yaml')
'params/nav2_multirobot_params_2.yaml')

# Names and poses of the robots
robots = [
Expand Down