# voxl_mpa_to_ros2 camera_interface timestamp

Source: https://forum.modalai.com/topic/3125/voxl_mpa_to_ros2-camera_interface-timestamp
Category: VOXL SDK and Software (https://forum.modalai.com/category/47/voxl-sdk-and-software)
Tags: ros
Posted: 2024-02-16 14:53:00 UTC by smilon
Replies: 10 · Views: 2328

## smilon · 2024-02-16 14:53:00 UTC

Heya,

I just found out something that's causing me issues with my TF's in ROS2. Shouldn't the timestamp of the ROS2 msgs be constructed from both nanosecs and secs? 

In the [camera_interface.cpp](https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros2/-/blob/master/colcon_ws/src/voxl_mpa_to_ros2/src/interfaces/camera_interface.cpp?ref_type=heads#L100) only the nanosecs field is populated causing the timestamp to be incompatible with any ROS2 time conventions.

This however is not the case in the [imu_interface.cpp](https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros2/-/blob/master/colcon_ws/src/voxl_mpa_to_ros2/src/interfaces/imu_interface.cpp?ref_type=heads#L128) which works as intended.

Thought I would point it out!

## Reply by Alex Kushleyev (ModalAI staff) · 2024-02-23 14:37:09 UTC

@smilon ,

I believe you are correct! Thank you. We will double check this and fix.

## Reply by smilon · 2024-02-29 09:25:34 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev Great! Please ping me here whenever you have this updated because current workaround is kinda ugly :S. Thanks a lot!

## Reply by Alex Kushleyev (ModalAI staff) · 2024-02-29 18:04:31 UTC (in reply to smilon)

@smilon , we have a merge request that is being tested - https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-to-ros2/-/merge_requests/8/diffs?commit_id=a128608d0ad1e4c417edc7013f9bbbf9665b754b#diff-content-bbec15f81097cb24d4e021ae03a1c7aa01ff13d6

Can you please take a look and help confirm this is what you are expecting?

Thank you :)

## Reply by Eric Katzfey (ModalAI staff) · 2024-02-29 20:19:00 UTC (in reply to smilon)

@smilon You can find an updated package here: http://voxl-packages.modalai.com/dists/qrb5165/dev/binary-arm64/voxl-mpa-to-ros2_0.0.2-202402291159_arm64.deb. This should work fine with SDK 1.1.2.

## Reply by smilon · 2024-03-06 14:55:25 UTC

Dear @Alex-Kushleyev, @Eric-Katzfey this did the trick! Thanks for the quick fix!! Everything works as expected now.

## Reply by Alex Kushleyev (ModalAI staff) · 2024-03-07 14:44:56 UTC (in reply to smilon)

@smilon, great! thank you for bringing this issue to our attention in the first place.

## Reply by jacob yaacubov · 2024-04-02 13:53:26 UTC

Hi guys sorry for getting this thread up again,
i am experiencing same issue with my cameras and qvio ros2 topics 
time stamp  rests after few seconds , time stamp of seconds stays at zero  

```
sec 0  STUCK AT ZERO
nsec 3300161870  REACHING TO 3 BILLION (3 SECONDS) 
frame_id "tracking"
height 480
width 640
encoding "mono8"
is_bigendian 0
step 640
```

any fixes that match SDK 1.1.3 ?

## Reply by Alex Kushleyev (ModalAI staff) · 2024-04-03 19:48:27 UTC (in reply to jacob yaacubov)

@jacob-yaacubov Are you able to use the deb provided above with the fix? i'll check when it will officially be in SDK

## Reply by jacob yaacubov · 2024-04-04 08:16:28 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev i have used the dev branch in the voxl-mpa_to_ros2 

and this branch has a fix , built it from source

## Reply by Alex Kushleyev (ModalAI staff) · 2024-04-11 16:53:51 UTC (in reply to jacob yaacubov)

@jacob-yaacubov , FYI, this fix will be in 1.2.0 release which is in testing now
