From d2a683eb91fbedc92e289ce612fbbad2eb7171e9 Mon Sep 17 00:00:00 2001 From: JulienThevenoz Date: Tue, 30 Jan 2024 08:53:13 +0100 Subject: [PATCH] addressed wolfgang's requests --- .github/workflows/systemtests_sim.yml | 1 + crazyflie_sim/crazyflie_sim/visualization/rviz.py | 2 +- systemtests/test_flights.py | 4 +--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/systemtests_sim.yml b/.github/workflows/systemtests_sim.yml index b02702063..ac3530cda 100644 --- a/.github/workflows/systemtests_sim.yml +++ b/.github/workflows/systemtests_sim.yml @@ -56,6 +56,7 @@ jobs: . install/local_setup.bash export PYTHONPATH="${PYTHONPATH}:/home/github/actions-runner/_work/crazyswarm2/crazyswarm2/crazyflie-firmware/build/" export ROS_LOCALHOST_ONLY=1 + export ROS_DOMAIN_ID=99 python3 src/crazyswarm2/systemtests/test_flights.py --sim - name: Upload files diff --git a/crazyflie_sim/crazyflie_sim/visualization/rviz.py b/crazyflie_sim/crazyflie_sim/visualization/rviz.py index 147a71889..154144451 100644 --- a/crazyflie_sim/crazyflie_sim/visualization/rviz.py +++ b/crazyflie_sim/crazyflie_sim/visualization/rviz.py @@ -29,7 +29,7 @@ def step(self, t, states: list[State], states_desired: list[State], actions: lis msg.transform.translation.x = state.pos[0] msg.transform.translation.y = state.pos[1] msg.transform.translation.z = state.pos[2] - msg.transform.rotation.x = state.quat[1] + msg.transform.rotation.x = state.quat[1] msg.transform.rotation.y = state.quat[2] msg.transform.rotation.z = state.quat[3] msg.transform.rotation.w = state.quat[0] diff --git a/systemtests/test_flights.py b/systemtests/test_flights.py index bff4b73c8..70e319101 100644 --- a/systemtests/test_flights.py +++ b/systemtests/test_flights.py @@ -109,7 +109,7 @@ def record_start_and_clean(self, testname:str, max_wait:int): src = f"source {str(self.ros2_ws)}/install/setup.bash" try: - command = f"{src} && ros2 bag record -s mcap -o test_{testname} /tf /clock" #############################change later ????? #if using sim backend, we also need to record simulation time in /clock topic + command = f"{src} && ros2 bag record -s mcap -o test_{testname} /tf" record_bag = Popen(command, shell=True, stderr=PIPE, stdout=True, text=True, cwd= self.ros2_ws / "results/", start_new_session=True, executable="/bin/bash") atexit.register(clean_process, record_bag) @@ -190,5 +190,3 @@ def test_multi_trajectory(self): unittest.main(argv=[sys.argv[0]] + other_args) - # TestFlights.SIM = True - # unittest.main()