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

Correct IMU_FRAME and IMU_OPTICAL_FRAME definition from camera_name #2627

Conversation

arslogavitabrevis
Copy link

Related to the issue #2617.

Now the imu topic header is based on camera_name:

header:
  stamp:
    sec: 1676470898
    nanosec: 797342208
  frame_id: front_camera_imu_optical_frame
orientation:
  x: 0.0
  y: 0.0
  z: 0.0

And the tf tree is complete:
Screenshot from 2023-02-15 09-22-43

#define IMU_FRAME_ID (static_cast<std::ostringstream&&>(std::ostringstream() << _camera_name << "_imu_frame")).str()
#define IMU_OPTICAL_FRAME_ID (static_cast<std::ostringstream&&>(std::ostringstream() << _camera_name << "_imu_optical_frame")).str()
#define IMU_FRAME_ID(sip) (static_cast<std::ostringstream&&>(std::ostringstream() << _camera_name << "_imu_frame")).str()
#define IMU_OPTICAL_FRAME_ID(sip) (static_cast<std::ostringstream&&>(std::ostringstream() << _camera_name << "_imu_optical_frame")).str()
Copy link
Collaborator

@Nir-Az Nir-Az Feb 15, 2023

Choose a reason for hiding this comment

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

I don't see usage of the new parameter..
Am I missing something?

Copy link
Author

Choose a reason for hiding this comment

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

From my test this parameter allow usage of the updated values of the variable "_camera_name". As you can see in #2617, before this modification, the default value of "_camera_name" was used. After this modification, the value of "_camera_name" used was the one defined in the parameters. I did this modification based on the others lines around that are using a similar pattern.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What I meant is that your change added a macro parameter that is not used.
If we look on other macro's i.e.

#define FRAME_ID(sip) (static_cast<std::ostringstream&&>(std::ostringstream() << _camera_name << "_" << STREAM_NAME(sip) << "_frame")).str()

You can notice the macro usage of the parameter here:

STREAM_NAME(sip) 

Copy link
Author

Choose a reason for hiding this comment

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

You are right this does not seem to be doing the difference. Thanks you for following with me.

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