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

Localization of interactive markers #34

Open
WZHwerk5 opened this issue Mar 4, 2024 · 2 comments
Open

Localization of interactive markers #34

WZHwerk5 opened this issue Mar 4, 2024 · 2 comments

Comments

@WZHwerk5
Copy link

WZHwerk5 commented Mar 4, 2024

Hi, I'm implementing this package to my own robot and to-be-processed workpiece. Since the pose of my workpiece would be changed frequently, I set the collision_mesh_frame as well as points_frame for target_pose_generator as my workpiece link(object_link) in config file. However, the interactive markers based on point cloud still remain at the base frame of robot (link_0), they are not aligned with my mesh model which is located correctly for robot processing. Could you please tell me how to fix this? Thanks in advance!

Here is my config file:

# Anchors
planning_group: &planning_group arm
collision_mesh_filename: &collision_mesh_filename package://reach_ros/iiwa/config/chair_seat_col.ply

optimization:
  radius: 0.2
  max_steps: 10
  step_improvement_threshold: 0.01

ik_solver:
  name: MoveItIKSolver
  distance_threshold: 0.0
  planning_group: *planning_group
  collision_mesh_frame: object_link
  collision_mesh_filename: *collision_mesh_filename
  touch_links: []

evaluator:
  name: MultiplicativeEvaluator
  plugins:
    - name: ManipulabilityMoveIt
      planning_group: *planning_group
    - name: DistancePenaltyMoveIt
      planning_group: *planning_group
      distance_threshold: 0.025
      exponent: 2
      collision_mesh_filename: *collision_mesh_filename
      touch_links: []

display:
  name: ROSDisplay
  collision_mesh_filename: *collision_mesh_filename
  collision_mesh_frame: object_link
  kinematic_base_frame: link_0
  marker_scale: 0.05

target_pose_generator:
  name: PointCloudTargetPoseGenerator
  pcd_file: package://reach_ros/iiwa/config/chair_seat_col.pcd
  points_frame: object_link
  target_frame: link_0

logger:
  name: BoostProgressConsoleLogger

Here is the visualization in Rviz:
Screenshot from 2024-03-04 10-46-26

@marip8
Copy link
Member

marip8 commented Mar 4, 2024

Try using the TransformedPointCloudTargetPoseGenerator class instead. The poses for the reach study ultimately need to be defined relative to the base frame of the kinematic chain that you are using to solve IK, so this plugin will use TF to transform points defined in an arbitrary frame (object_link) to the defined kinematic base frame (link0). The PointCloudTargetPoseGenerator just assumes the point cloud file is already defined in the kinematic base frame.

target_pose_generator:
-  name: PointCloudTargetPoseGenerator
+  name: TransformedPointCloudTargetPoseGenerator
  pcd_file: package://reach_ros/iiwa/config/chair_seat_col.pcd
  points_frame: object_link
  target_frame: link_0

@WZHwerk5
Copy link
Author

WZHwerk5 commented Mar 4, 2024

Thanks, it has been solved!

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

No branches or pull requests

2 participants