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

Feat: add default joints values when creating a POI #17

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

rcartarobotnik
Copy link
Contributor

This pull request includes a change to the poi_marker.py file, specifically in the createNewPOI method. The change involves adding a new dictionary to handle camera joint states and passing it to the save_poi_service method.

Improvements to handling POI creation:

  • poi_manager/src/poi_manager/poi_marker.py: Added a dictionary (poi_joint_dict) to store camera joint states and updated the call to save_poi_service to include this dictionary. This ensures that camera joint states are correctly managed when creating a new POI.

Copy link
Contributor

@alex-arnal alex-arnal left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines 543 to 554
success,msg=self.save_poi_service(new_point.name,new_point.header.frame_id,new_point.pose)
#fill new dictionary with the camera joint states taken from the joint_states_dict
poi_joint_dict = {}
for i in self.joint_states_dict:
if "camera" in i:
if "zoom" in i:
poi_joint_dict[i] = 1.0
else:
poi_joint_dict[i] = 0.0


success,msg=self.save_poi_service(new_point.name, new_point.header.frame_id, new_point.pose, poi_joint_dict)

Copy link
Contributor

Choose a reason for hiding this comment

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

We wanted to replicate the behavior that we currently have when storing a POI using the "Current pose" option. When pressing the "New" option we want to store the position of the interactive_marker but storing the joint_states value (all joints info). So replacing this:

success,msg=self.save_poi_service(new_point.name,new_point.header.frame_id,new_point.pose)

by this:

success,msg=self.save_poi_service(new_point.name, new_point.header.frame_id, new_point.pose, self.joint_states_dict)

should be enough. We do not need to set a default camera joint values

@alex-arnal alex-arnal merged commit d0c8c26 into ros-devel Feb 11, 2025
@alex-arnal alex-arnal deleted the feat/pois-default-joint-values branch February 11, 2025 13:07
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.

2 participants