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

Fixed a comparison and logical statement order issue. #26

Merged
merged 4 commits into from
Dec 25, 2020
Merged

Fixed a comparison and logical statement order issue. #26

merged 4 commits into from
Dec 25, 2020

Conversation

Nurgak
Copy link
Contributor

@Nurgak Nurgak commented Apr 23, 2020

The scene parameter is None by default, this is not equal to 0 or False, therefore it passed the comparison anyway and gave the following error:

File "/home/karl/catkin_ws/src/moveit_python/src/moveit_python/pick_place_interface.py", line 268, in pick_with_retry
if name in scene.getKnownAttachedObjects():
AttributeError: 'NoneType' object has no attribute 'getKnownAttachedObjects'

Second problem in there was the logical statement order, as or precedes and. So even when fixing the scene parameter comparison with None it passed this block and threw the same error. I added parenthesis as a quick solution.

@mikeferguson mikeferguson merged commit 9e176c0 into mikeferguson:master Dec 25, 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.

None yet

3 participants