Repository navigation
Fix joint trajectory controller missing keys in setup assistant (#3434) #3913
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -188,6 +188,18 @@ bool MoveItControllersConfig::GeneratedControllersConfig::writeYaml(YAML::Emitte | |
| { | ||
| emitter << YAML::Key << "type" << YAML::Value << controller.type_; | ||
|
|
||
| if (controller.type_ == "FollowJointTrajectory") | ||
| { | ||
| if (controller.parameters_.find("action_ns") == controller.parameters_.end()) | ||
| { | ||
| emitter << YAML::Key << "action_ns" << YAML::Value << "follow_joint_trajectory"; | ||
| } | ||
| if (controller.parameters_.find("default") == controller.parameters_.end()) | ||
| { | ||
| emitter << YAML::Key << "default" << YAML::Value << "true"; | ||
| } | ||
| } | ||
|
|
||
| // Write joints | ||
| emitter << YAML::Key << "joints"; | ||
| emitter << YAML::Value; | ||
|
|
@@ -202,6 +214,10 @@ bool MoveItControllersConfig::GeneratedControllersConfig::writeYaml(YAML::Emitte | |
|
|
||
| for (const auto& pair : controller.parameters_) | ||
| { | ||
| if (pair.second.empty() && pair.first != "action_ns") | ||
| { | ||
| continue; | ||
| } | ||
|
Comment on lines
+217
to
+220
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major Generate defaults for empty fields. The writer emits an empty
📍 Affects 2 files
🤖 Prompt for AI Agents |
||
| emitter << YAML::Key << pair.first; | ||
| emitter << YAML::Value << pair.second; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Generate defaults for blank UI fields. A present parameter with an empty value bypasses the new checks. The output loop then writes that empty value, so the blank-field case remains unfixed.
moveit_setup_assistant/moveit_setup_controllers/src/moveit_controllers_config.cpp#L193-L199: treat absent and empty values as needing defaults, without emitting duplicate keys.moveit_setup_assistant/moveit_setup_controllers/test/test_controllers.cpp#L205-L206: expectfollow_joint_trajectoryandtruefor empty inputs.📍 Affects 2 files
moveit_setup_assistant/moveit_setup_controllers/src/moveit_controllers_config.cpp#L193-L199(this comment)moveit_setup_assistant/moveit_setup_controllers/test/test_controllers.cpp#L205-L206🤖 Prompt for AI Agents