Skip to content

fix bug in perception screen#1013

Merged
davetcoleman merged 1 commit intomoveit:kinetic-develfrom
mayman99:perception_screen_fix
Aug 14, 2018
Merged

fix bug in perception screen#1013
davetcoleman merged 1 commit intomoveit:kinetic-develfrom
mayman99:perception_screen_fix

Conversation

@mayman99
Copy link
Copy Markdown
Contributor

@mayman99 mayman99 commented Aug 2, 2018

Description

  1. Fixing a bug that makes the SA crashes when switching from the perception screen.
  2. Improve documentation.

Checklist

void MoveItConfigData::clearSensorPluginConfig()
{
sensors_plugin_config_parameter_list_.clear();
// sensors_plugin_config_parameter_list_.clear();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

remove comment

{
sensors_plugin_config_parameter_list_.clear();
// sensors_plugin_config_parameter_list_.clear();
for (int i = 0; i < sensors_plugin_config_parameter_list_.size(); ++i)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

size_t

better var name e.g. param_id

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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 "
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"Look at" --> "Please see"

"href='http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/"
"perception_configuration/"
"perception_configuration_tutorial.html'>Perception Documentation</a> "
"for more details",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add "." after "details"

@davetcoleman
Copy link
Copy Markdown
Member

I still do not see any default values when I choose a sensor plugin:

image

@davetcoleman
Copy link
Copy Markdown
Member

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.

@mayman99
Copy link
Copy Markdown
Contributor Author

mayman99 commented Aug 6, 2018

@davetcoleman
I do confirm the other bug about the segfaults but I can still not reproduce the no default values.
Would you tell me what do you see if you run the catkin test in the setup assistant? there is actually a test case on reading the default values.

@mayman99
Copy link
Copy Markdown
Contributor Author

mayman99 commented Aug 6, 2018

I also cant reproduce the segmentation fault either on this branch.

@davetcoleman
Copy link
Copy Markdown
Member

Run on a new moveit_config package, not an existing one.

@mayman99 mayman99 force-pushed the perception_screen_fix branch from 7a7f265 to 3718f32 Compare August 9, 2018 05:28
@mayman99
Copy link
Copy Markdown
Contributor Author

mayman99 commented Aug 9, 2018

Fixed the bug the occurs when using on a new package by calling the input3DSensors() even if the package is new.

@mayman99 mayman99 mentioned this pull request Aug 9, 2018
5 tasks
@mayman99 mayman99 force-pushed the perception_screen_fix branch from 3718f32 to 48037a6 Compare August 9, 2018 22:30
@mayman99
Copy link
Copy Markdown
Contributor Author

mayman99 commented Aug 9, 2018

@davetcoleman Travis is happy.

Copy link
Copy Markdown
Member

@davetcoleman davetcoleman left a comment

Choose a reason for hiding this comment

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

Tested locally and it works!
Should be merged asap due to hotfix

Copy link
Copy Markdown

@mcevoyandy mcevoyandy left a comment

Choose a reason for hiding this comment

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

two minor comments


// 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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why not if(!sensors_plugin_config_parameter_list_.empty())

@@ -1518,6 +1518,7 @@ bool MoveItConfigData::input3DSensorsYAML(const std::string& default_file_path,
{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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())

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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())

@mayman99 mayman99 force-pushed the perception_screen_fix branch from 48037a6 to de2c521 Compare August 13, 2018 20:03
@mayman99 mayman99 force-pushed the perception_screen_fix branch from de2c521 to babd97b Compare August 13, 2018 22:26
Copy link
Copy Markdown
Member

@davetcoleman davetcoleman left a comment

Choose a reason for hiding this comment

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

Great job!

@davetcoleman davetcoleman merged commit 199eded into moveit:kinetic-devel Aug 14, 2018
davetcoleman pushed a commit to davetcoleman/moveit that referenced this pull request Aug 14, 2018
@davetcoleman
Copy link
Copy Markdown
Member

cherry-picked to melodic

@mayman99 mayman99 mentioned this pull request Aug 20, 2018
6 tasks
pull bot pushed a commit to shadow-robot/moveit that referenced this pull request Sep 3, 2020
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