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

fix nanosecond in header timestamp #852

Merged
merged 1 commit into from Dec 20, 2023
Merged

Conversation

changx03
Copy link
Contributor

The header timestamp has two components: sec and nanosec.
The code was intended to convert nanosec to sec but calling the wrong variable.
From:

  pose_tmp.stamp_ = tf2::timeFromSec(
    static_cast<double>(msg->header.stamp.sec) +
    static_cast<double>(msg->header.stamp.sec) / 1000000000.0);

To:

  pose_tmp.stamp_ = tf2::timeFromSec(
    static_cast<double>(msg->header.stamp.sec) +
    static_cast<double>(msg->header.stamp.nanosec) / 1000000000.0);

@ayrton04
Copy link
Collaborator

Yikes! That's a bad one. Good catch. Would you mind PR-ing this against noetic-devel as well, please?

@ayrton04 ayrton04 merged commit ac9c5f1 into cra-ros-pkg:ros2 Dec 20, 2023
0 of 2 checks passed
ayrton04 pushed a commit that referenced this pull request Dec 20, 2023
Co-authored-by: Luke Chang <luke@boxfish.nz>
@ayrton04
Copy link
Collaborator

Never mind, this is ROS 2 only. Thanks.

HaoguangYang added a commit to HaoguangYang/robot_localization that referenced this pull request Mar 26, 2024
* Changelogs

* 3.4.0

* Adding issue templates

* Update issue templates

* install headers (cra-ros-pkg#786)

* bump Humble to 3.4.1 for release (cra-ros-pkg#789)

* bumping to 3.4.2 for humble release (cra-ros-pkg#806)

* bumping humble to 3.5.1 to override incorrect binaries (cra-ros-pkg#816)

* Utm using geographiclib humble branch (cra-ros-pkg#834)

* Add single test for navsat_conversions

* Add a southern point to the navsat_transform test

* LLtoUTM using GeographicLib

* Use GeographicLib for UTMtoLL conversions

* Linting

* Forgot include

* Fix compilation

* Calculate gamma because it's a function output and was supplied before

* Also test for gamma conversion

* Align naming and install

* Utm using geographiclib ros2 branch (cra-ros-pkg#833)

* Add single test for navsat_conversions

* Add a southern point to the navsat_transform test

* LLtoUTM using GeographicLib

* Use GeographicLib for UTMtoLL conversions

* Linting

* Forgot include

* Fix compilation

* Calculate gamma because it's a function output and was supplied before

* Also test for gamma conversion

* Align naming and install

* Test navsat transform functionality (cra-ros-pkg#838)

* Wait for odometry message before setting manual datum so that the base and world frame names can be set. (cra-ros-pkg#835)

* wait for odom msg before setting manual datum

* Wait for odometry message before setting manual datum so that the base and world frame names can be set. (cra-ros-pkg#836)

* wait for odom msg before setting manual datum

* fix header timestamp (cra-ros-pkg#852)

Co-authored-by: Luke Chang <luke@boxfish.nz>

* fix header timestamp (cra-ros-pkg#852)

Co-authored-by: Luke Chang <luke@boxfish.nz>

* Changelogs

* 3.5.2

* Fixing angle clamping for humble (cra-ros-pkg#854)

* fix: modify dual_ekf_navsat_example.launch file to remap the correct imu topic (cra-ros-pkg#857)

* Feature/set utm service (cra-ros-pkg#856)

* Forward port Fix/set utm map frame change

---------

Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>

* simplified calculation

* simplified calculation

* Update issue templates

* Migrate static tfs to ros2 format. (cra-ros-pkg#864)

* Fix throttle duration (cra-ros-pkg#866)

* Fix throttle duration

* Update ukf.yaml to match ekf.yaml (cra-ros-pkg#867)

Add missing *_pose_use_child_frame parameter.

* updated file formatting

---------

Signed-off-by: Tim Clephas <tim.clephas@nobleo.nl>
Co-authored-by: Tom Moore <tmoore@locusrobotics.com>
Co-authored-by: Olivier Kermorgant <olivier_kermorgant@yahoo.fr>
Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
Co-authored-by: Tim Clephas <tim.clephas@nobleo.nl>
Co-authored-by: Tom Greier <tgreier@moog.com>
Co-authored-by: Luke Chang <luke.x.chang@gmail.com>
Co-authored-by: Luke Chang <luke@boxfish.nz>
Co-authored-by: joeldushouyu <65317431+joeldushouyu@users.noreply.github.com>
Co-authored-by: Mukunda Bharatheesha <mukunda.bharatheesha@nobleo.nl>
Co-authored-by: thandal <than@timbrel.org>
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.

None yet

4 participants