Skip to content

Remove added substring from point cloud frame_id#41

Open
marip8 wants to merge 1 commit intoifm:masterfrom
marip8:fix/frame-id-base-specification
Open

Remove added substring from point cloud frame_id#41
marip8 wants to merge 1 commit intoifm:masterfrom
marip8:fix/frame-id-base-specification

Conversation

@marip8
Copy link
Copy Markdown
Contributor

@marip8 marip8 commented Jan 28, 2021

Currently the driver sets the frame_id of the published point cloud equal to the specified frame_id_base parameter plus the substring _link. The nodelet.launch file then creates a static transform publisher from this link to the optical frame. This is problematic when using the IFM in the context of an existing URDF (i.e. IFM mounted to a robot):

  • The point cloud gets published relative to a frame that is unlikely to exist since a somewhat arbitrary sub-string is appended to the user's input
  • The static transform publisher in nodelet.launch creates a disconnected TF tree because the parent frame with the appended substring is unlikely to already exist

These issues result in both visualization errors in Rviz and transformation errors when using TF to transform the cloud.

This PR changes the driver and launch file to use the specified frame_id_base parameter directly as the frame_id of the point cloud itself. This change resolves the two issues described above and maintains the current functionality in the case that the IFM is launched by itself.

@graugans
Copy link
Copy Markdown
Member

graugans commented Feb 1, 2021

Hey @marip8 thanks for your contribution, @desengph will take care of this.

@desengph
Copy link
Copy Markdown
Contributor

desengph commented Feb 3, 2021

Hi @marip8,
we can't easily change this naming of the frame_id_base due to legacy reasons, as there is existing code that relies on the link suffix.

We would suggest that you might use a no-op transformation to the frame you need, to integrate the camera into your URDF (if you can't change it).
E. g.:

rosrun tf static_transform_publisher 0 0 0 0 0 0 YOUR_CAMERA_FRAME ifm3d/camera_link 100 

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