From 78802dfc891cd1510c4fa6dee21526a8c55c6246 Mon Sep 17 00:00:00 2001 From: Joseph Duchesne Date: Fri, 25 Sep 2026 16:18:41 +0000 Subject: [PATCH 1/2] Fixed tests on Humble, and enabled Humble, Lyrical and Rolling for CI, commenting out Jazzy and Kilted since testing those is probably redundant. --- .github/workflows/industrial_ci_action.yml | 4 +- flatland_plugins/test/bumper_test.cpp | 4 +- .../change_rate_dialog.hpp | 75 ++++++++-------- .../change_rate_tool.hpp | 75 ++++++++-------- .../interactive_tool.hpp | 75 ++++++++-------- .../load_model_dialog.hpp | 87 +++++++++---------- .../flatland_rviz_plugins/pause_tool.hpp | 75 ++++++++-------- .../spawn_model_tool.hpp | 87 +++++++++---------- .../src/change_rate_dialog.cpp | 75 ++++++++-------- .../src/change_rate_tool.cpp | 75 ++++++++-------- .../src/interactive_tool.cpp | 75 ++++++++-------- .../src/load_model_dialog.cpp | 87 +++++++++---------- flatland_rviz_plugins/src/pause_tool.cpp | 75 ++++++++-------- .../src/spawn_model_tool.cpp | 87 +++++++++---------- flatland_server/test/service_manager_test.cpp | 27 +++--- 15 files changed, 462 insertions(+), 521 deletions(-) diff --git a/.github/workflows/industrial_ci_action.yml b/.github/workflows/industrial_ci_action.yml index 30b44508..b35cd965 100644 --- a/.github/workflows/industrial_ci_action.yml +++ b/.github/workflows/industrial_ci_action.yml @@ -11,9 +11,9 @@ jobs: strategy: matrix: env: - # - {ROS_DISTRO: humble, ROS_REPO: main, AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS: true} + - {ROS_DISTRO: humble, ROS_REPO: main, AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS: true} # - {ROS_DISTRO: jazzy, ROS_REPO: main, AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS: true} - - {ROS_DISTRO: kilted, ROS_REPO: main, AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS: true, TARGET_CMAKE_ARGS: '-DCMAKE_COMPILE_WARNING_AS_ERROR=ON'} + # - {ROS_DISTRO: kilted, ROS_REPO: main, AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS: true, TARGET_CMAKE_ARGS: '-DCMAKE_COMPILE_WARNING_AS_ERROR=ON'} - {ROS_DISTRO: lyrical, ROS_REPO: main, AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS: true, TARGET_CMAKE_ARGS: '-DCMAKE_COMPILE_WARNING_AS_ERROR=ON'} - {ROS_DISTRO: rolling, ROS_REPO: main, OS_CODE_NAME: noble, AMENT_CPPCHECK_ALLOW_SLOW_VERSIONS: true, TARGET_CMAKE_ARGS: '-DCMAKE_COMPILE_WARNING_AS_ERROR=ON'} runs-on: ubuntu-24.04 diff --git a/flatland_plugins/test/bumper_test.cpp b/flatland_plugins/test/bumper_test.cpp index 23995a1b..38708f56 100644 --- a/flatland_plugins/test/bumper_test.cpp +++ b/flatland_plugins/test/bumper_test.cpp @@ -221,8 +221,8 @@ TEST_F(BumperPluginTest, collision_test) SpinRos(500, 10); // make sure the messages gets through // check time is not zero to make sure message is received - ASSERT_NE(msg1.header.stamp, rclcpp::Time(0, 0)); - ASSERT_NE(msg2.header.stamp, rclcpp::Time(0, 0)); + ASSERT_NE(msg1.header.stamp, builtin_interfaces::msg::Time{}); + ASSERT_NE(msg2.header.stamp, builtin_interfaces::msg::Time{}); // step 15 time which makes the body move 1.5 meters, will make base_link_1 // collide, but not base_link_2, not that base_link_1's fixture is a sensor diff --git a/flatland_rviz_plugins/include/flatland_rviz_plugins/change_rate_dialog.hpp b/flatland_rviz_plugins/include/flatland_rviz_plugins/change_rate_dialog.hpp index 434f9fc2..7f1945dc 100644 --- a/flatland_rviz_plugins/include/flatland_rviz_plugins/change_rate_dialog.hpp +++ b/flatland_rviz_plugins/include/flatland_rviz_plugins/change_rate_dialog.hpp @@ -1,43 +1,38 @@ -/* - * @copyright Copyright 2022 FEUP - * Copyright (c) 2022, FEUP - * @name change_rate_dialog.cpp - * @brief dialog to change rate - * @author Ana Barros - * @author Henrique Ribeiro - * @author João Costa - * - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the Avidbots Corp. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright (c) 2022, FEUP +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of the Avidbots Corp. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// @name change_rate_dialog.cpp +// @brief dialog to change rate +// @author Ana Barros +// @author Henrique Ribeiro +// @author João Costa +// All rights reserved. #ifndef FLATLAND_RVIZ_PLUGINS__CHANGE_RATE_DIALOG_HPP_ #define FLATLAND_RVIZ_PLUGINS__CHANGE_RATE_DIALOG_HPP_ diff --git a/flatland_rviz_plugins/include/flatland_rviz_plugins/change_rate_tool.hpp b/flatland_rviz_plugins/include/flatland_rviz_plugins/change_rate_tool.hpp index 679fe448..6953f825 100644 --- a/flatland_rviz_plugins/include/flatland_rviz_plugins/change_rate_tool.hpp +++ b/flatland_rviz_plugins/include/flatland_rviz_plugins/change_rate_tool.hpp @@ -1,43 +1,38 @@ -/* - * @copyright Copyright 2022 FEUP - * Copyright (c) 2022, FEUP - * @name change_rate_tool.hpp - * @brief changes simulation rate - * @author Ana Barros - * @author Henrique Ribeiro - * @author João Costa - * - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the Avidbots Corp. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright (c) 2022, FEUP +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of the Avidbots Corp. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// @name change_rate_tool.hpp +// @brief changes simulation rate +// @author Ana Barros +// @author Henrique Ribeiro +// @author João Costa +// All rights reserved. #ifndef FLATLAND_RVIZ_PLUGINS__CHANGE_RATE_TOOL_HPP_ #define FLATLAND_RVIZ_PLUGINS__CHANGE_RATE_TOOL_HPP_ diff --git a/flatland_rviz_plugins/include/flatland_rviz_plugins/interactive_tool.hpp b/flatland_rviz_plugins/include/flatland_rviz_plugins/interactive_tool.hpp index d9b2fd59..a932f43f 100644 --- a/flatland_rviz_plugins/include/flatland_rviz_plugins/interactive_tool.hpp +++ b/flatland_rviz_plugins/include/flatland_rviz_plugins/interactive_tool.hpp @@ -1,43 +1,38 @@ -/* - * @copyright Copyright 2022 FEUP - * Copyright (c) 2022, FEUP - * @name interactive_tool.hpp - * @brief allows interaction with interactive markers - * @author Ana Barros - * @author Henrique Ribeiro - * @author João Costa - * - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the Avidbots Corp. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright (c) 2022, FEUP +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of the Avidbots Corp. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// @name interactive_tool.hpp +// @brief allows interaction with interactive markers +// @author Ana Barros +// @author Henrique Ribeiro +// @author João Costa +// All rights reserved. #ifndef FLATLAND_RVIZ_PLUGINS__INTERACTIVE_TOOL_HPP_ #define FLATLAND_RVIZ_PLUGINS__INTERACTIVE_TOOL_HPP_ diff --git a/flatland_rviz_plugins/include/flatland_rviz_plugins/load_model_dialog.hpp b/flatland_rviz_plugins/include/flatland_rviz_plugins/load_model_dialog.hpp index 54de8f9c..1baa527f 100644 --- a/flatland_rviz_plugins/include/flatland_rviz_plugins/load_model_dialog.hpp +++ b/flatland_rviz_plugins/include/flatland_rviz_plugins/load_model_dialog.hpp @@ -1,49 +1,44 @@ -/* - * ______ __ __ __ - * /\ _ \ __ /\ \/\ \ /\ \__ - * \ \ \L\ \ __ __ /\_\ \_\ \ \ \____ ___\ \ ,_\ ____ - * \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__\ - * \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, `\ - * \ \_\ \_\ \___/ \ \_\ \___,_\ \_,__/\ \____/\ \__\/\____/ - * \/_/\/_/\/__/ \/_/\/__,_ /\/___/ \/___/ \/__/\/___/ - * @copyright Copyright 2017 Avidbots Corp. - * Copyright (c) 2017, Avidbots Corp. - * @name load_model_dialog.h - * @brief Spawn dialog - * @author Joseph Duchesne - * @author Mike Brousseau - * - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the Avidbots Corp. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright (c) 2017, Avidbots Corp. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of the Avidbots Corp. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// ______ __ __ __ +// /\ _ \ __ /\ \/\ \ /\ \__ +// \ \ \L\ \ __ __ /\_\ \_\ \ \ \____ ___\ \ ,_\ ____ +// \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__\ +// \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, `\ +// \ \_\ \_\ \___/ \ \_\ \___,_\ \_,__/\ \____/\ \__\/\____/ +// \/_/\/_/\/__/ \/_/\/__,_ /\/___/ \/___/ \/__/\/___/ +// @name load_model_dialog.h +// @brief Spawn dialog +// @author Joseph Duchesne +// @author Mike Brousseau +// All rights reserved. #ifndef FLATLAND_RVIZ_PLUGINS__LOAD_MODEL_DIALOG_HPP_ #define FLATLAND_RVIZ_PLUGINS__LOAD_MODEL_DIALOG_HPP_ diff --git a/flatland_rviz_plugins/include/flatland_rviz_plugins/pause_tool.hpp b/flatland_rviz_plugins/include/flatland_rviz_plugins/pause_tool.hpp index 189a5f14..dfbee603 100644 --- a/flatland_rviz_plugins/include/flatland_rviz_plugins/pause_tool.hpp +++ b/flatland_rviz_plugins/include/flatland_rviz_plugins/pause_tool.hpp @@ -1,43 +1,38 @@ -/* - * @copyright Copyright 2022 FEUP - * Copyright (c) 2022, FEUP - * @name pause_tool.hpp - * @brief pauses simulation - * @author Ana Barros - * @author Henrique Ribeiro - * @author João Costa - * - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the Avidbots Corp. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright (c) 2022, FEUP +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of the Avidbots Corp. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// @name pause_tool.hpp +// @brief pauses simulation +// @author Ana Barros +// @author Henrique Ribeiro +// @author João Costa +// All rights reserved. #ifndef FLATLAND_RVIZ_PLUGINS__PAUSE_TOOL_HPP_ #define FLATLAND_RVIZ_PLUGINS__PAUSE_TOOL_HPP_ diff --git a/flatland_rviz_plugins/include/flatland_rviz_plugins/spawn_model_tool.hpp b/flatland_rviz_plugins/include/flatland_rviz_plugins/spawn_model_tool.hpp index f98d8db1..b01d92a0 100644 --- a/flatland_rviz_plugins/include/flatland_rviz_plugins/spawn_model_tool.hpp +++ b/flatland_rviz_plugins/include/flatland_rviz_plugins/spawn_model_tool.hpp @@ -1,49 +1,44 @@ -/* - * ______ __ __ __ - * /\ _ \ __ /\ \/\ \ /\ \__ - * \ \ \L\ \ __ __ /\_\ \_\ \ \ \____ ___\ \ ,_\ ____ - * \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__\ - * \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, `\ - * \ \_\ \_\ \___/ \ \_\ \___,_\ \_,__/\ \____/\ \__\/\____/ - * \/_/\/_/\/__/ \/_/\/__,_ /\/___/ \/___/ \/__/\/___/ - * @copyright Copyright 2017 Avidbots Corp. - * Copyright (c) 2017, Avidbots Corp. - * @name spawn_model_tool.h - * @brief Rviz compatible tool for spawning flatland model - * @author Joseph Duchesne - * @author Mike Brousseau - * - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the Avidbots Corp. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright (c) 2017, Avidbots Corp. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of the Avidbots Corp. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// ______ __ __ __ +// /\ _ \ __ /\ \/\ \ /\ \__ +// \ \ \L\ \ __ __ /\_\ \_\ \ \ \____ ___\ \ ,_\ ____ +// \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__\ +// \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, `\ +// \ \_\ \_\ \___/ \ \_\ \___,_\ \_,__/\ \____/\ \__\/\____/ +// \/_/\/_/\/__/ \/_/\/__,_ /\/___/ \/___/ \/__/\/___/ +// @name spawn_model_tool.h +// @brief Rviz compatible tool for spawning flatland model +// @author Joseph Duchesne +// @author Mike Brousseau +// All rights reserved. #ifndef FLATLAND_RVIZ_PLUGINS__SPAWN_MODEL_TOOL_HPP_ #define FLATLAND_RVIZ_PLUGINS__SPAWN_MODEL_TOOL_HPP_ diff --git a/flatland_rviz_plugins/src/change_rate_dialog.cpp b/flatland_rviz_plugins/src/change_rate_dialog.cpp index 5f5da9d9..eeea7f34 100644 --- a/flatland_rviz_plugins/src/change_rate_dialog.cpp +++ b/flatland_rviz_plugins/src/change_rate_dialog.cpp @@ -1,43 +1,38 @@ -/* - * @copyright Copyright 2022 FEUP - * Copyright (c) 2022, FEUP - * @name change_rate_dialog.cpp - * @brief dialog to change rate - * @author Ana Barros - * @author Henrique Ribeiro - * @author João Costa - * - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the Avidbots Corp. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright (c) 2022, FEUP +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of the Avidbots Corp. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// @name change_rate_dialog.cpp +// @brief dialog to change rate +// @author Ana Barros +// @author Henrique Ribeiro +// @author João Costa +// All rights reserved. #include "flatland_rviz_plugins/change_rate_dialog.hpp" #include diff --git a/flatland_rviz_plugins/src/change_rate_tool.cpp b/flatland_rviz_plugins/src/change_rate_tool.cpp index 1f9e4fcb..0893abe0 100644 --- a/flatland_rviz_plugins/src/change_rate_tool.cpp +++ b/flatland_rviz_plugins/src/change_rate_tool.cpp @@ -1,43 +1,38 @@ -/* - * @copyright Copyright 2022 FEUP - * Copyright (c) 2022, FEUP - * @name change_rate_tool.hpp - * @brief changes simulation rate - * @author Ana Barros - * @author Henrique Ribeiro - * @author João Costa - * - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the Avidbots Corp. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright (c) 2022, FEUP +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of the Avidbots Corp. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// @name change_rate_tool.hpp +// @brief changes simulation rate +// @author Ana Barros +// @author Henrique Ribeiro +// @author João Costa +// All rights reserved. #include "flatland_rviz_plugins/change_rate_tool.hpp" #include diff --git a/flatland_rviz_plugins/src/interactive_tool.cpp b/flatland_rviz_plugins/src/interactive_tool.cpp index 226dabd2..75adeb0c 100644 --- a/flatland_rviz_plugins/src/interactive_tool.cpp +++ b/flatland_rviz_plugins/src/interactive_tool.cpp @@ -1,43 +1,38 @@ -/* - * @copyright Copyright 2022 FEUP - * Copyright (c) 2022, FEUP - * @name interactive_tool.hpp - * @brief allows interaction with interactive markers - * @author Ana Barros - * @author Henrique Ribeiro - * @author João Costa - * - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the Avidbots Corp. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright (c) 2022, FEUP +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of the Avidbots Corp. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// @name interactive_tool.hpp +// @brief allows interaction with interactive markers +// @author Ana Barros +// @author Henrique Ribeiro +// @author João Costa +// All rights reserved. #include "flatland_rviz_plugins/interactive_tool.hpp" #include diff --git a/flatland_rviz_plugins/src/load_model_dialog.cpp b/flatland_rviz_plugins/src/load_model_dialog.cpp index 88be48b3..712f8a33 100644 --- a/flatland_rviz_plugins/src/load_model_dialog.cpp +++ b/flatland_rviz_plugins/src/load_model_dialog.cpp @@ -1,49 +1,44 @@ -/* - * ______ __ __ __ - * /\ _ \ __ /\ \/\ \ /\ \__ - * \ \ \L\ \ __ __ /\_\ \_\ \ \ \____ ___\ \ ,_\ ____ - * \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__\ - * \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, `\ - * \ \_\ \_\ \___/ \ \_\ \___,_\ \_,__/\ \____/\ \__\/\____/ - * \/_/\/_/\/__/ \/_/\/__,_ /\/___/ \/___/ \/__/\/___/ - * @copyright Copyright 2017 Avidbots Corp. - * Copyright (c) 2017, Avidbots Corp. - * @name load_model_dialog.cpp - * @brief Spawn dialog - * @author Joseph Duchesne - * @author Mike Brousseau - * - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the Avidbots Corp. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright (c) 2017, Avidbots Corp. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of the Avidbots Corp. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// ______ __ __ __ +// /\ _ \ __ /\ \/\ \ /\ \__ +// \ \ \L\ \ __ __ /\_\ \_\ \ \ \____ ___\ \ ,_\ ____ +// \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__\ +// \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, `\ +// \ \_\ \_\ \___/ \ \_\ \___,_\ \_,__/\ \____/\ \__\/\____/ +// \/_/\/_/\/__/ \/_/\/__,_ /\/___/ \/___/ \/__/\/___/ +// @name load_model_dialog.cpp +// @brief Spawn dialog +// @author Joseph Duchesne +// @author Mike Brousseau +// All rights reserved. #include "flatland_rviz_plugins/load_model_dialog.hpp" #include diff --git a/flatland_rviz_plugins/src/pause_tool.cpp b/flatland_rviz_plugins/src/pause_tool.cpp index 90211216..f53ad072 100644 --- a/flatland_rviz_plugins/src/pause_tool.cpp +++ b/flatland_rviz_plugins/src/pause_tool.cpp @@ -1,43 +1,38 @@ -/* - * @copyright Copyright 2022 FEUP - * Copyright (c) 2022, FEUP - * @name pause_tool.cpp - * @brief pauses simulation - * @author Ana Barros - * @author Henrique Ribeiro - * @author João Costa - * - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the Avidbots Corp. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright (c) 2022, FEUP +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of the Avidbots Corp. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// @name pause_tool.cpp +// @brief pauses simulation +// @author Ana Barros +// @author Henrique Ribeiro +// @author João Costa +// All rights reserved. #include "flatland_rviz_plugins/pause_tool.hpp" #include diff --git a/flatland_rviz_plugins/src/spawn_model_tool.cpp b/flatland_rviz_plugins/src/spawn_model_tool.cpp index 97fd0fdf..bee87c06 100644 --- a/flatland_rviz_plugins/src/spawn_model_tool.cpp +++ b/flatland_rviz_plugins/src/spawn_model_tool.cpp @@ -1,49 +1,44 @@ -/* - * ______ __ __ __ - * /\ _ \ __ /\ \/\ \ /\ \__ - * \ \ \L\ \ __ __ /\_\ \_\ \ \ \____ ___\ \ ,_\ ____ - * \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__\ - * \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, `\ - * \ \_\ \_\ \___/ \ \_\ \___,_\ \_,__/\ \____/\ \__\/\____/ - * \/_/\/_/\/__/ \/_/\/__,_ /\/___/ \/___/ \/__/\/___/ - * @copyright Copyright 2018 Avidbots Corp. - * Copyright (c) 2018, Avidbots Corp. - * @name spawn_model_tool.cpp - * @brief Rviz compatible tool for spawning flatland model - * @author Joseph Duchesne - * @author Mike Brousseau - * - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of the Avidbots Corp. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright (c) 2018, Avidbots Corp. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// * Neither the name of the Avidbots Corp. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// ______ __ __ __ +// /\ _ \ __ /\ \/\ \ /\ \__ +// \ \ \L\ \ __ __ /\_\ \_\ \ \ \____ ___\ \ ,_\ ____ +// \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__\ +// \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, `\ +// \ \_\ \_\ \___/ \ \_\ \___,_\ \_,__/\ \____/\ \__\/\____/ +// \/_/\/_/\/__/ \/_/\/__,_ /\/___/ \/___/ \/__/\/___/ +// @name spawn_model_tool.cpp +// @brief Rviz compatible tool for spawning flatland model +// @author Joseph Duchesne +// @author Mike Brousseau +// All rights reserved. #include "flatland_rviz_plugins/spawn_model_tool.hpp" #include diff --git a/flatland_server/test/service_manager_test.cpp b/flatland_server/test/service_manager_test.cpp index c3d22b61..d69f4cb3 100644 --- a/flatland_server/test/service_manager_test.cpp +++ b/flatland_server/test/service_manager_test.cpp @@ -65,7 +65,7 @@ class ServiceManagerTest : public ::testing::Test { public: explicit ServiceManagerTest(const std::shared_ptr & node) - : timekeeper(node), node(node) + : timekeeper(node), node(node), client_node(rclcpp::Node::make_shared("test_service_manager_client")) { } @@ -78,6 +78,7 @@ class ServiceManagerTest : public ::testing::Test fs::path robot_yaml; Timekeeper timekeeper; rclcpp::Node::SharedPtr node; + rclcpp::Node::SharedPtr client_node; std::thread simulation_thread; void SetUp() override @@ -126,7 +127,7 @@ TEST_F(ServiceManagerTest, spawn_valid_model) request->pose.y = 102.1; request->pose.theta = 0.23; - auto client = node->create_client("spawn_model"); + auto client = client_node->create_client("spawn_model"); // Threading is required since client.call blocks executing until return StartSimulationThread(); @@ -134,7 +135,7 @@ TEST_F(ServiceManagerTest, spawn_valid_model) ASSERT_TRUE(client->wait_for_service(1s)); auto result = client->async_send_request(request); - if (rclcpp::spin_until_future_complete(node, result) != rclcpp::FutureReturnCode::SUCCESS) { + if (rclcpp::spin_until_future_complete(client_node, result) != rclcpp::FutureReturnCode::SUCCESS) { FAIL(); } auto response = result.get(); @@ -167,14 +168,14 @@ TEST_F(ServiceManagerTest, spawn_invalid_model) request->pose.y = 2; request->pose.theta = 3; - auto client = node->create_client("spawn_model"); + auto client = client_node->create_client("spawn_model"); StartSimulationThread(); ASSERT_TRUE(client->wait_for_service(1s)); auto result = client->async_send_request(request); - if (rclcpp::spin_until_future_complete(node, result) != rclcpp::FutureReturnCode::SUCCESS) { + if (rclcpp::spin_until_future_complete(client_node, result) != rclcpp::FutureReturnCode::SUCCESS) { FAIL(); } auto response = result.get(); @@ -203,14 +204,14 @@ TEST_F(ServiceManagerTest, move_model) request->pose.y = 9.9; request->pose.theta = 0.77; - auto client = node->create_client("move_model"); + auto client = client_node->create_client("move_model"); StartSimulationThread(); ASSERT_TRUE(client->wait_for_service(1s)); auto result = client->async_send_request(request); - if (rclcpp::spin_until_future_complete(node, result) != rclcpp::FutureReturnCode::SUCCESS) { + if (rclcpp::spin_until_future_complete(client_node, result) != rclcpp::FutureReturnCode::SUCCESS) { FAIL(); } auto response = result.get(); @@ -235,14 +236,14 @@ TEST_F(ServiceManagerTest, move_nonexistent_model) request->pose.y = 5; request->pose.theta = 0; - auto client = node->create_client("move_model"); + auto client = client_node->create_client("move_model"); StartSimulationThread(); ASSERT_TRUE(client->wait_for_service(1s)); auto result = client->async_send_request(request); - if (rclcpp::spin_until_future_complete(node, result) != rclcpp::FutureReturnCode::SUCCESS) { + if (rclcpp::spin_until_future_complete(client_node, result) != rclcpp::FutureReturnCode::SUCCESS) { FAIL(); } auto response = result.get(); @@ -263,14 +264,14 @@ TEST_F(ServiceManagerTest, delete_model) auto request = std::make_shared(); request->name = "turtlebot1"; - auto client = node->create_client("delete_model"); + auto client = client_node->create_client("delete_model"); StartSimulationThread(); ASSERT_TRUE(client->wait_for_service(1s)); auto result = client->async_send_request(request); - if (rclcpp::spin_until_future_complete(node, result) != rclcpp::FutureReturnCode::SUCCESS) { + if (rclcpp::spin_until_future_complete(client_node, result) != rclcpp::FutureReturnCode::SUCCESS) { FAIL(); } auto response = result.get(); @@ -294,14 +295,14 @@ TEST_F(ServiceManagerTest, delete_nonexistent_model) auto request = std::make_shared(); request->name = "random_model"; - auto client = node->create_client("delete_model"); + auto client = client_node->create_client("delete_model"); StartSimulationThread(); ASSERT_TRUE(client->wait_for_service(1s)); auto result = client->async_send_request(request); - if (rclcpp::spin_until_future_complete(node, result) != rclcpp::FutureReturnCode::SUCCESS) { + if (rclcpp::spin_until_future_complete(client_node, result) != rclcpp::FutureReturnCode::SUCCESS) { FAIL(); } auto response = result.get(); From 200aa5e0804bab3f4a8754a3d3c76e42d6fb575b Mon Sep 17 00:00:00 2001 From: Joseph Duchesne Date: Fri, 25 Sep 2026 17:01:31 +0000 Subject: [PATCH 2/2] Fixed errors and warnings, added dev container config and docs --- .devcontainer/Dockerfile | 22 +++++++++++ .devcontainer/humble/devcontainer.json | 29 +++++++++++++++ .devcontainer/jazzy/devcontainer.json | 29 +++++++++++++++ .devcontainer/kilted/devcontainer.json | 29 +++++++++++++++ .devcontainer/lyrical/devcontainer.json | 29 +++++++++++++++ .devcontainer/on-create-command.sh | 5 +++ .devcontainer/post-create-command.sh | 7 ++++ .devcontainer/rolling/devcontainer.json | 29 +++++++++++++++ .devcontainer/update-content-command.sh | 10 +++++ .travis.yml | 13 ------- README.md | 37 ++++++++++++++----- .../load_model_dialog.hpp | 4 +- .../spawn_model_tool.hpp | 4 +- .../src/load_model_dialog.cpp | 4 +- .../src/spawn_model_tool.cpp | 4 +- 15 files changed, 225 insertions(+), 30 deletions(-) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/humble/devcontainer.json create mode 100644 .devcontainer/jazzy/devcontainer.json create mode 100644 .devcontainer/kilted/devcontainer.json create mode 100644 .devcontainer/lyrical/devcontainer.json create mode 100644 .devcontainer/on-create-command.sh create mode 100644 .devcontainer/post-create-command.sh create mode 100644 .devcontainer/rolling/devcontainer.json create mode 100644 .devcontainer/update-content-command.sh delete mode 100644 .travis.yml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..0f0e2baa --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,22 @@ +ARG ROS_DISTRO=humble +FROM ros:${ROS_DISTRO} + +ARG DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends \ + bash-completion \ + ccache \ + gdb \ + git \ + python3-colcon-common-extensions \ + python3-rosdep \ + && rm -rf /var/lib/apt/lists/* + +COPY . /tmp/flatland +RUN rosdep update && \ + apt-get update && \ + rosdep install --from-paths /tmp/flatland --ignore-src --rosdistro "$ROS_DISTRO" -y && \ + rm -rf /tmp/flatland /var/lib/apt/lists/* + +ENV CCACHE_DIR=/tmp/.ccache +WORKDIR /opt/overlay_ws \ No newline at end of file diff --git a/.devcontainer/humble/devcontainer.json b/.devcontainer/humble/devcontainer.json new file mode 100644 index 00000000..a123d02e --- /dev/null +++ b/.devcontainer/humble/devcontainer.json @@ -0,0 +1,29 @@ +{ + "name": "Flatland (Humble)", + "build": { + "dockerfile": "../Dockerfile", + "context": "../..", + "args": { "ROS_DISTRO": "humble" } + }, + "runArgs": ["--init"], + "workspaceFolder": "/opt/overlay_ws/src/flatland", + "workspaceMount": "source=${localWorkspaceFolder},target=${containerWorkspaceFolder},type=bind", + "mounts": [ + { "source": "overlay-${devcontainerId}", "target": "/opt/overlay_ws", "type": "volume" }, + { "source": "ccache-${devcontainerId}", "target": "/tmp/.ccache", "type": "volume" } + ], + "remoteEnv": { "CCACHE_DIR": "/tmp/.ccache" }, + "onCreateCommand": "bash .devcontainer/on-create-command.sh", + "updateContentCommand": "bash .devcontainer/update-content-command.sh", + "postCreateCommand": "bash .devcontainer/post-create-command.sh", + "customizations": { + "vscode": { + "extensions": [ + "althack.ament-task-provider", + "eamodio.gitlens", + "ms-iot.vscode-ros", + "twxs.cmake" + ] + } + } +} \ No newline at end of file diff --git a/.devcontainer/jazzy/devcontainer.json b/.devcontainer/jazzy/devcontainer.json new file mode 100644 index 00000000..1d77bb0d --- /dev/null +++ b/.devcontainer/jazzy/devcontainer.json @@ -0,0 +1,29 @@ +{ + "name": "Flatland (Jazzy)", + "build": { + "dockerfile": "../Dockerfile", + "context": "../..", + "args": { "ROS_DISTRO": "jazzy" } + }, + "runArgs": ["--init"], + "workspaceFolder": "/opt/overlay_ws/src/flatland", + "workspaceMount": "source=${localWorkspaceFolder},target=${containerWorkspaceFolder},type=bind", + "mounts": [ + { "source": "overlay-${devcontainerId}", "target": "/opt/overlay_ws", "type": "volume" }, + { "source": "ccache-${devcontainerId}", "target": "/tmp/.ccache", "type": "volume" } + ], + "remoteEnv": { "CCACHE_DIR": "/tmp/.ccache" }, + "onCreateCommand": "bash .devcontainer/on-create-command.sh", + "updateContentCommand": "bash .devcontainer/update-content-command.sh", + "postCreateCommand": "bash .devcontainer/post-create-command.sh", + "customizations": { + "vscode": { + "extensions": [ + "althack.ament-task-provider", + "eamodio.gitlens", + "ms-iot.vscode-ros", + "twxs.cmake" + ] + } + } +} \ No newline at end of file diff --git a/.devcontainer/kilted/devcontainer.json b/.devcontainer/kilted/devcontainer.json new file mode 100644 index 00000000..543bda52 --- /dev/null +++ b/.devcontainer/kilted/devcontainer.json @@ -0,0 +1,29 @@ +{ + "name": "Flatland (Kilted)", + "build": { + "dockerfile": "../Dockerfile", + "context": "../..", + "args": { "ROS_DISTRO": "kilted" } + }, + "runArgs": ["--init"], + "workspaceFolder": "/opt/overlay_ws/src/flatland", + "workspaceMount": "source=${localWorkspaceFolder},target=${containerWorkspaceFolder},type=bind", + "mounts": [ + { "source": "overlay-${devcontainerId}", "target": "/opt/overlay_ws", "type": "volume" }, + { "source": "ccache-${devcontainerId}", "target": "/tmp/.ccache", "type": "volume" } + ], + "remoteEnv": { "CCACHE_DIR": "/tmp/.ccache" }, + "onCreateCommand": "bash .devcontainer/on-create-command.sh", + "updateContentCommand": "bash .devcontainer/update-content-command.sh", + "postCreateCommand": "bash .devcontainer/post-create-command.sh", + "customizations": { + "vscode": { + "extensions": [ + "althack.ament-task-provider", + "eamodio.gitlens", + "ms-iot.vscode-ros", + "twxs.cmake" + ] + } + } +} \ No newline at end of file diff --git a/.devcontainer/lyrical/devcontainer.json b/.devcontainer/lyrical/devcontainer.json new file mode 100644 index 00000000..f5a5158b --- /dev/null +++ b/.devcontainer/lyrical/devcontainer.json @@ -0,0 +1,29 @@ +{ + "name": "Flatland (Lyrical)", + "build": { + "dockerfile": "../Dockerfile", + "context": "../..", + "args": { "ROS_DISTRO": "lyrical" } + }, + "runArgs": ["--init"], + "workspaceFolder": "/opt/overlay_ws/src/flatland", + "workspaceMount": "source=${localWorkspaceFolder},target=${containerWorkspaceFolder},type=bind", + "mounts": [ + { "source": "overlay-${devcontainerId}", "target": "/opt/overlay_ws", "type": "volume" }, + { "source": "ccache-${devcontainerId}", "target": "/tmp/.ccache", "type": "volume" } + ], + "remoteEnv": { "CCACHE_DIR": "/tmp/.ccache" }, + "onCreateCommand": "bash .devcontainer/on-create-command.sh", + "updateContentCommand": "bash .devcontainer/update-content-command.sh", + "postCreateCommand": "bash .devcontainer/post-create-command.sh", + "customizations": { + "vscode": { + "extensions": [ + "althack.ament-task-provider", + "eamodio.gitlens", + "ms-iot.vscode-ros", + "twxs.cmake" + ] + } + } +} \ No newline at end of file diff --git a/.devcontainer/on-create-command.sh b/.devcontainer/on-create-command.sh new file mode 100644 index 00000000..2f078731 --- /dev/null +++ b/.devcontainer/on-create-command.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -euo pipefail + +mkdir -p /opt/overlay_ws/src /tmp/.ccache +git config --global --add safe.directory /opt/overlay_ws/src/flatland \ No newline at end of file diff --git a/.devcontainer/post-create-command.sh b/.devcontainer/post-create-command.sh new file mode 100644 index 00000000..6cb1e30f --- /dev/null +++ b/.devcontainer/post-create-command.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -euo pipefail + +setup_line='source /opt/overlay_ws/install/setup.bash' +if ! grep -Fxq "$setup_line" "$HOME/.bashrc"; then + printf '\n%s\n' "$setup_line" >> "$HOME/.bashrc" +fi \ No newline at end of file diff --git a/.devcontainer/rolling/devcontainer.json b/.devcontainer/rolling/devcontainer.json new file mode 100644 index 00000000..0accfbfe --- /dev/null +++ b/.devcontainer/rolling/devcontainer.json @@ -0,0 +1,29 @@ +{ + "name": "Flatland (Rolling)", + "build": { + "dockerfile": "../Dockerfile", + "context": "../..", + "args": { "ROS_DISTRO": "rolling" } + }, + "runArgs": ["--init"], + "workspaceFolder": "/opt/overlay_ws/src/flatland", + "workspaceMount": "source=${localWorkspaceFolder},target=${containerWorkspaceFolder},type=bind", + "mounts": [ + { "source": "overlay-${devcontainerId}", "target": "/opt/overlay_ws", "type": "volume" }, + { "source": "ccache-${devcontainerId}", "target": "/tmp/.ccache", "type": "volume" } + ], + "remoteEnv": { "CCACHE_DIR": "/tmp/.ccache" }, + "onCreateCommand": "bash .devcontainer/on-create-command.sh", + "updateContentCommand": "bash .devcontainer/update-content-command.sh", + "postCreateCommand": "bash .devcontainer/post-create-command.sh", + "customizations": { + "vscode": { + "extensions": [ + "althack.ament-task-provider", + "eamodio.gitlens", + "ms-iot.vscode-ros", + "twxs.cmake" + ] + } + } +} \ No newline at end of file diff --git a/.devcontainer/update-content-command.sh b/.devcontainer/update-content-command.sh new file mode 100644 index 00000000..dc4212c6 --- /dev/null +++ b/.devcontainer/update-content-command.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -euo pipefail + +source "/opt/ros/${ROS_DISTRO}/setup.bash" +cd /opt/overlay_ws +colcon build --symlink-install \ + --cmake-args \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b4e813a1..00000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: generic -services: - - docker -cache: - directories: - - $HOME/.ccache -env: - matrix: - - ROS_DISTRO="foxy" BEFORE_SCRIPT='./scripts/ci_prebuild.sh' AFTER_SCRIPT='./scripts/ci_postbuild.sh' -install: - - git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .industrial_ci -b master -script: - - source .industrial_ci/travis.sh diff --git a/README.md b/README.md index c85ec4cb..f7ef0ca1 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,38 @@ # README # -![ci test result](https://travis-ci.com/avidbots/flatland.svg?branch=master "CI Test Result") +### What is Flatland? ### +Flatland is a lightweight 2.5D robot simulator for ROS 1 and ROS 2. -### What is this repository for? ### +- Simulate 2D motion with a variety of drivetrains. +- Extend worlds and robots with plugins for dynamic maps, lidar, and drive control. +- Run faster than real time; connected ROS nodes may encounter timing issues if they cannot keep up. +- Allows headless execution, with RViz based visualization if needed -* Flatland is a performance centric 2d robot simulator -* [Roadmap on trello](https://trello.com/b/s9poP2Jg/flatland-2d-simulator) -* Release Version: None +### Dev container (recommended) ### -### How do I get set up? ### +1. Install Docker, VS Code, and the Dev Containers extension. +2. Open the Flatland repository in VS Code and run **Dev Containers: Reopen in Container**. +3. Choose Humble, Jazzy, Kilted, Lyrical, or Rolling when prompted. -* Git clone flatland into your catkin workspace's src folder, and catkin build. -* Optionally check out [turtlebot_flatland](https://github.com/avidbots/turtlebot_flatland) and run the turtlebot nav stack -* Run `rosdep install --from-paths src --ignore-src` in your catkin workspace to install any missing rosdeps +Once the container opens, Flatland is ready to use. Run **Dev Containers: Rebuild Container** if you change package dependencies. + +### Without a dev container (ROS 2) ### + +Install ROS 2 on your host, or in a container, then run the following: + +```bash +mkdir -p ~/flatland_ws/src +git clone https://github.com/avidbots/flatland.git ~/flatland_ws/src/flatland +source /opt/ros/*/setup.bash +cd ~/flatland_ws +rosdep update +rosdep install --from-paths src --ignore-src -y +colcon build --symlink-install +source install/setup.bash +``` + +For older ROS 1 / catkin setups, check out a ROS 1-compatible Flatland version in your catkin workspace's `src` directory. From the workspace root, run `rosdep install --from-paths src --ignore-src -y` and `catkin build`. ### Who do I talk to? ### diff --git a/flatland_rviz_plugins/include/flatland_rviz_plugins/load_model_dialog.hpp b/flatland_rviz_plugins/include/flatland_rviz_plugins/load_model_dialog.hpp index 1baa527f..0182cdfa 100644 --- a/flatland_rviz_plugins/include/flatland_rviz_plugins/load_model_dialog.hpp +++ b/flatland_rviz_plugins/include/flatland_rviz_plugins/load_model_dialog.hpp @@ -30,8 +30,8 @@ // ______ __ __ __ // /\ _ \ __ /\ \/\ \ /\ \__ // \ \ \L\ \ __ __ /\_\ \_\ \ \ \____ ___\ \ ,_\ ____ -// \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__\ -// \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, `\ +// \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__ +// \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, ` // \ \_\ \_\ \___/ \ \_\ \___,_\ \_,__/\ \____/\ \__\/\____/ // \/_/\/_/\/__/ \/_/\/__,_ /\/___/ \/___/ \/__/\/___/ // @name load_model_dialog.h diff --git a/flatland_rviz_plugins/include/flatland_rviz_plugins/spawn_model_tool.hpp b/flatland_rviz_plugins/include/flatland_rviz_plugins/spawn_model_tool.hpp index b01d92a0..309472f6 100644 --- a/flatland_rviz_plugins/include/flatland_rviz_plugins/spawn_model_tool.hpp +++ b/flatland_rviz_plugins/include/flatland_rviz_plugins/spawn_model_tool.hpp @@ -30,8 +30,8 @@ // ______ __ __ __ // /\ _ \ __ /\ \/\ \ /\ \__ // \ \ \L\ \ __ __ /\_\ \_\ \ \ \____ ___\ \ ,_\ ____ -// \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__\ -// \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, `\ +// \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__ +// \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, ` // \ \_\ \_\ \___/ \ \_\ \___,_\ \_,__/\ \____/\ \__\/\____/ // \/_/\/_/\/__/ \/_/\/__,_ /\/___/ \/___/ \/__/\/___/ // @name spawn_model_tool.h diff --git a/flatland_rviz_plugins/src/load_model_dialog.cpp b/flatland_rviz_plugins/src/load_model_dialog.cpp index 712f8a33..4167d441 100644 --- a/flatland_rviz_plugins/src/load_model_dialog.cpp +++ b/flatland_rviz_plugins/src/load_model_dialog.cpp @@ -30,8 +30,8 @@ // ______ __ __ __ // /\ _ \ __ /\ \/\ \ /\ \__ // \ \ \L\ \ __ __ /\_\ \_\ \ \ \____ ___\ \ ,_\ ____ -// \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__\ -// \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, `\ +// \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__ +// \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, ` // \ \_\ \_\ \___/ \ \_\ \___,_\ \_,__/\ \____/\ \__\/\____/ // \/_/\/_/\/__/ \/_/\/__,_ /\/___/ \/___/ \/__/\/___/ // @name load_model_dialog.cpp diff --git a/flatland_rviz_plugins/src/spawn_model_tool.cpp b/flatland_rviz_plugins/src/spawn_model_tool.cpp index bee87c06..8bad06e3 100644 --- a/flatland_rviz_plugins/src/spawn_model_tool.cpp +++ b/flatland_rviz_plugins/src/spawn_model_tool.cpp @@ -30,8 +30,8 @@ // ______ __ __ __ // /\ _ \ __ /\ \/\ \ /\ \__ // \ \ \L\ \ __ __ /\_\ \_\ \ \ \____ ___\ \ ,_\ ____ -// \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__\ -// \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, `\ +// \ \ __ \/\ \/\ \\/\ \ /'_` \ \ '__`\ / __`\ \ \/ /',__ +// \ \ \/\ \ \ \_/ |\ \ \/\ \L\ \ \ \L\ \/\ \L\ \ \ \_/\__, ` // \ \_\ \_\ \___/ \ \_\ \___,_\ \_,__/\ \____/\ \__\/\____/ // \/_/\/_/\/__/ \/_/\/__,_ /\/___/ \/___/ \/__/\/___/ // @name spawn_model_tool.cpp