fix bug in perception screen#1013
Conversation
| void MoveItConfigData::clearSensorPluginConfig() | ||
| { | ||
| sensors_plugin_config_parameter_list_.clear(); | ||
| // sensors_plugin_config_parameter_list_.clear(); |
| { | ||
| sensors_plugin_config_parameter_list_.clear(); | ||
| // sensors_plugin_config_parameter_list_.clear(); | ||
| for (int i = 0; i < sensors_plugin_config_parameter_list_.size(); ++i) |
There was a problem hiding this comment.
size_t
better var name e.g. param_id
There was a problem hiding this comment.
Well I do really apologize for this mistake, its not my first time doing it.
| new HeaderWidget("3D Perception Sensor Configuration", "Configure your 3D sensors to work with Moveit! ", this); | ||
| HeaderWidget* header = new HeaderWidget("3D Perception Sensor Configuration", | ||
| "Configure your 3D sensors to work with Moveit! " | ||
| "Look at <a " |
| "href='http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/" | ||
| "perception_configuration/" | ||
| "perception_configuration_tutorial.html'>Perception Documentation</a> " | ||
| "for more details", |
|
Bug: if I go to the "3D Perception" screen and choose "Depth Map" from the drop down list, then switch to the "Passive Joints" screen, the MSA segfaults. |
|
@davetcoleman |
|
I also cant reproduce the segmentation fault either on this branch. |
|
Run on a new moveit_config package, not an existing one. |
7a7f265 to
3718f32
Compare
|
Fixed the bug the occurs when using on a new package by calling the |
3718f32 to
48037a6
Compare
|
@davetcoleman Travis is happy. |
davetcoleman
left a comment
There was a problem hiding this comment.
Tested locally and it works!
Should be merged asap due to hotfix
|
|
||
| // Make sure sensors_plugin_config_parameter_list_ is not empty | ||
| if (sensors_plugin_config_parameter_list_.size() == 1) | ||
| if (sensors_plugin_config_parameter_list_.size() > 0) |
There was a problem hiding this comment.
why not if(!sensors_plugin_config_parameter_list_.empty())
| @@ -1518,6 +1518,7 @@ bool MoveItConfigData::input3DSensorsYAML(const std::string& default_file_path, | |||
| { | |||
There was a problem hiding this comment.
not really in the scope of this PR, but why not combine these if statements?
if (const YAML::Node& sensors_node = doc["sensors"] && sensors_node.IsSequence())
There was a problem hiding this comment.
I think can do sth like this
// Get sensors node
const YAML::Node& sensors_node = doc["sensors"];
// Make sure that the sensors are written as a sequence
if (sensors_node && sensors_node.IsSequence())
48037a6 to
de2c521
Compare
de2c521 to
babd97b
Compare
|
cherry-picked to melodic |

Description
Checklist