Skip to content

[PI Sprint 24/25 / PD-462] - [Feature] Migrate to RoslibJS#26

Merged
FaaizHaikal merged 3 commits intomasterfrom
feature/migrate-to-roslib
Mar 15, 2025
Merged

[PI Sprint 24/25 / PD-462] - [Feature] Migrate to RoslibJS#26
FaaizHaikal merged 3 commits intomasterfrom
feature/migrate-to-roslib

Conversation

@mbsaloka
Copy link
Member

@mbsaloka mbsaloka commented Mar 8, 2025

Jira Link:

https://ichiro-its.atlassian.net/browse/PD-462

Description

Remove gRPC and create config_node for capture setting config service

Type of Change

  • Bugfix
  • Enhancement
  • New feature
  • Breaking change (fix or feature that would cause the existing functionality to not work as expected)

How Has This Been Tested?

  • New unit tests added.
  • Manual tested.

Checklist:

  • Using Branch Name Convention
    • feature/JIRA-ID-SHORT-DESCRIPTION if has a JIRA ticket
    • enhancement/SHORT-DESCRIPTION if has/has no JIRA ticket and contain enhancement
    • hotfix/SHORT-DESCRIPTION if the change doesn't need to be tested (urgent)
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have made the documentation for the corresponding changes.

Comment on lines 52 to 69
nlohmann::json config;
try {
config = nlohmann::json::parse(request->json_color);
jitsuyo::save_config(path, "color_classifier.json", config);

response->success = true;
} catch (const std::exception & e) {
RCLCPP_ERROR(node->get_logger(), "Exception occurred: %s", e.what());
response->success = false;
return;
}

if (!jitsuyo::save_config(path, "color_classifier.json", config)) {
response->success = false;
return;
}

response->success = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nlohmann::json config;
try {
config = nlohmann::json::parse(request->json_color);
jitsuyo::save_config(path, "color_classifier.json", config);
response->success = true;
} catch (const std::exception & e) {
RCLCPP_ERROR(node->get_logger(), "Exception occurred: %s", e.what());
response->success = false;
return;
}
if (!jitsuyo::save_config(path, "color_classifier.json", config)) {
response->success = false;
return;
}
response->success = true;
nlohmann::json config;
try {
config = nlohmann::json::parse(request->json_color);
} catch (const std::exception & e) {
RCLCPP_ERROR(node->get_logger(), "Exception occurred: %s", e.what());
response->success = false;
return;
}
if (!jitsuyo::save_config(path, "color_classifier.json", config)) {
response->success = false;
return;
}
response->success = true;

@FaaizHaikal FaaizHaikal merged commit 80e18c5 into master Mar 15, 2025
1 check failed
@FaaizHaikal FaaizHaikal deleted the feature/migrate-to-roslib branch March 15, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants