Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

World Visualization Bug Fix If Objects Removed/Attached #80

Merged
merged 8 commits into from
Sep 23, 2021

Conversation

tlipps
Copy link
Contributor

@tlipps tlipps commented Aug 26, 2021

Basically changing plugin_world_vis.has_environment_changed(), so it detects if objects were deleted too. Moreover, ignoring of objects having only one link since they are managed from plugin_pybullet.

Copy link
Member

@ichumuh ichumuh left a comment

Choose a reason for hiding this comment

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

In test bowl and cup, there are no markers for the cup and bowl, after they were placed on the kitchen island.

if object_name not in self.currently_publishing_objects:
return True
return False
object_names = [object_name for object_name, _ in objects_dict.items()]
Copy link
Member

Choose a reason for hiding this comment

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

world has a get_object_names

@@ -359,6 +359,10 @@ def attach_object(self, req):
except:
pass

def attach_existing_obj_to_robot(self, name, link, pose):
self.unsafe_get_world().attach_existing_obj_to_robot(name, link, pose)
self.remove_object(name)
Copy link
Member

Choose a reason for hiding this comment

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

This seems weird, the attach_existing_obj_to_robot already removes the object. If you are doing it just to get rid of the marker, you should probably split up the remove_object function.

# Simple objects (containing only one link) are published here:
if link_name == object_name and len(object.get_link_names()) == 1:
marker = object.as_marker_msg()
markers.append(marker)
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't that mean that the marker.id and so on are not being set anymore? Is that intentional?

@@ -161,7 +161,6 @@ def attach_existing_obj_to_robot(self, name, link, pose):
"""
# TODO this should know the object pose and not require it as input
self._robot.attach_urdf_object(self.get_object(name), link, pose)
self.remove_object(name)
Copy link
Member

Choose a reason for hiding this comment

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

Oh I don't like that. Attaching should definitely remove the object. The world class should work properly on its own.

@tlipps
Copy link
Contributor Author

tlipps commented Sep 10, 2021

@ichumuh Changed above wrt your comments and tested it with test_tray and test_bowl_and_cup.

@ichumuh ichumuh merged commit 24ed307 into SemRoCo:devel Sep 23, 2021
@ichumuh
Copy link
Member

ichumuh commented Sep 23, 2021

thx

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants