From 0d346dee5e8da0c73a0aba2925d7d6abbde67af3 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Mon, 11 Nov 2024 13:53:21 -0800 Subject: [PATCH 1/2] Prepend to PYTHONPATH in tests (#2673) Preserve the existing PYTHONPATH by prepending instead of replacing. Signed-off-by: Steve Peters --- python/CMakeLists.txt | 2 +- test/integration/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 98bbe66650..f7228de0a1 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -105,7 +105,7 @@ if (BUILD_TESTING) endif() set(_env_vars) - list(APPEND _env_vars "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python/") + list(APPEND _env_vars "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python/:$ENV{PYTHONPATH}") list(APPEND _env_vars "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}:$ENV{LD_LIBRARY_PATH}") set_tests_properties(${test} PROPERTIES ENVIRONMENT "${_env_vars}") diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt index da422d2a89..df28287316 100644 --- a/test/integration/CMakeLists.txt +++ b/test/integration/CMakeLists.txt @@ -246,5 +246,5 @@ endif() if (TARGET INTEGRATION_python_system_loader) set_tests_properties(INTEGRATION_python_system_loader PROPERTIES - ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python/") + ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python/:$ENV{PYTHONPATH}") endif() From 57599fb184090e11ed0cf58628a0327bb67a9f8d Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Tue, 12 Nov 2024 03:29:32 -0800 Subject: [PATCH 2/2] check valid pointer (#2674) Signed-off-by: Ian Chen --- src/systems/optical_tactile_plugin/OpticalTactilePlugin.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systems/optical_tactile_plugin/OpticalTactilePlugin.cc b/src/systems/optical_tactile_plugin/OpticalTactilePlugin.cc index e2bf376e1e..92320f0de3 100644 --- a/src/systems/optical_tactile_plugin/OpticalTactilePlugin.cc +++ b/src/systems/optical_tactile_plugin/OpticalTactilePlugin.cc @@ -632,7 +632,7 @@ void OpticalTactilePluginPrivate::Enable(const gz::msgs::Boolean &_req) this->enabled = _req.data(); - if (!_req.data()) + if (!_req.data() && this->visualizePtr) { this->visualizePtr->RemoveNormalForcesAndContactsMarkers(); }