hi did u found the solution cuz i am facing the same issue here
osamasalah

- Feb 5, 2024
- Joined Jun 20, 2023
- 0 best answers
I am encountering an issue with timestamp synchronization between the OAK camera and the host computer in ROS2. The camera generates its own timestamp, which differs from the computer's. Consequently, all nodes utilizing the camera data adhere to its timestamp, while others follow the computer's. This discrepancy presents a challenge in simultaneously obtaining data from the LiDAR and camera within the same frame, due to the differing timestamps. Is there a way to synchronize the camera's timestamp with that of the hosting computer?
I am using the OAK-D Pro camera for my AMR robot to utilize the generated point cloud data in order to update the costmap and avoid obstacles. However, I have noticed that when the camera is horizontally aligned, my field of view is slanted. Consequently, I need to adjust the inclination angle so that the point cloud provides a level representation of the floor, regardless of the distance between the floor points and the camera. My question is whether the inclination angle for your camera is fixed, or if I need to go through a testing and trial process to determine the appropriate angle.
I'm currently working on a ROS2 project where I'm using a local costmap for robot navigation. The costmap is generated based on a point cloud data obtained from a 3D camera. However, I'm encountering an issue where the local costmap freezes and does not update as the robot moves.
I have configured the local costmap using the following parameters:
$$
local_costmap:
ros__parameters:
update_frequency: 5.0
publish_frequency: 2.0
global_frame: odom
robot_base_frame: base_link
use_sim_time: True
rolling_window: true
width: 10
height: 10
resolution: 0.05
footprint: "[ [0.4665, 0.2890], [0.4665, -0.2890], [-0.4665, -0.2890], [-0.4665, 0.2890] ]"
footprint_padding: 0.02
plugins: ["voxel_layer", "inflation_layer"]
voxel_layer:
plugin: "nav2_costmap_2d::VoxelLayer"
enabled: True
footprint_clearing_enabled: true
publish_voxel_map: True
origin_z: 0.0
z_resolution: 0.05
z_voxels: 16
max_obstacle_height: 2.0
unknown_threshold: 15
mark_threshold: 0
observation_sources: pointcloud
combination_method: 1
pointcloud:
topic: /stereo/points
sensor_frame: oak_rgb_camera_optical_frame
max_obstacle_height: 2.0
min_obstacle_height: 0.0
obstacle_max_range: 9.5
obstacle_min_range: 0.0
raytrace_max_range: 10.0
raytrace_min_range: 0.0
clearing: True
marking: True
data_type: "PointCloud2"
inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 3.0
inflation_radius: 3.0always_send_full_costmap: True
$$I have verified that the point cloud topic
/stereo/points
is publishing data correctly, and thesensor_frame
parameter is set to match the frame ID of my 3D camera's optical frame.However, despite these configurations, the local costmap freezes after receiving the first data from the point cloud and does not update as the robot moves. I suspect there may be an issue with the configuration or some missing parameters.
I would appreciate any insights or suggestions on how to resolve this problem. Thank you in advance for your help!