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_monitor): fix build error in Humble #476

Merged
merged 1 commit into from
May 15, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system/system_monitor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wno-stringop-truncation)
endif()

find_package(ament_cmake_auto REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion system/system_monitor/launch/system_monitor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def launch_setup(context, *args, **kwargs):

def generate_launch_description():
system_monitor_path = os.path.join(
get_package_share_directory("tier4_system_launch"), "config", "system_monitor"
get_package_share_directory("system_monitor"), "config", "system_monitor"
)
return launch.LaunchDescription(
[
Expand Down
8 changes: 4 additions & 4 deletions system/system_monitor/src/gpu_monitor/nvml_gpu_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ void GPUMonitor::addProcessUsage(
uint32_t info_count = MAX_ARRAY_SIZE;
std::unique_ptr<nvmlProcessInfo_t[]> infos;
infos = std::make_unique<nvmlProcessInfo_t[]>(MAX_ARRAY_SIZE);
ret = nvmlDeviceGetComputeRunningProcesses_v2(device, &info_count, infos.get());
ret = nvmlDeviceGetComputeRunningProcesses(device, &info_count, infos.get());
if (ret != NVML_SUCCESS) {
RCLCPP_WARN(
this->get_logger(), "Failed to nvmlDeviceGetComputeRunningProcesses_v2 NVML: %s",
this->get_logger(), "Failed to nvmlDeviceGetComputeRunningProcesses NVML: %s",
nvmlErrorString(ret));
return;
}
Expand All @@ -197,10 +197,10 @@ void GPUMonitor::addProcessUsage(
// Get Graphics Process ID
info_count = MAX_ARRAY_SIZE;
infos = std::make_unique<nvmlProcessInfo_t[]>(MAX_ARRAY_SIZE);
ret = nvmlDeviceGetGraphicsRunningProcesses_v2(device, &info_count, infos.get());
ret = nvmlDeviceGetGraphicsRunningProcesses(device, &info_count, infos.get());
if (ret != NVML_SUCCESS) {
RCLCPP_WARN(
this->get_logger(), "Failed to nvmlDeviceGetGraphicsRunningProcesses_v2 NVML: %s",
this->get_logger(), "Failed to nvmlDeviceGetGraphicsRunningProcesses NVML: %s",
nvmlErrorString(ret));
return;
}
Expand Down