Skip to content

ROS2 Lidar wrong tick source #810

@ceccocats

Description

@ceccocats

The Ros2 lidar sensor is using TickBasedSource wich is not precise.
Since the lidar only relies on physics it should use PhysicsBasedSource wich permits to publish at a precise frequency.

Results with TickBasedSource

    class ROS2Lidar2DSensorComponent : public ROS2SensorComponentBase<TickBasedSource>
ceccocats@aron:~$ ros2 topic hz /scan -w 10
average rate: 9.123
	min: 0.075s max: 0.121s std dev: 0.01262s window: 10
average rate: 10.161
	min: 0.021s max: 0.116s std dev: 0.02784s window: 10
average rate: 8.629
	min: 0.103s max: 0.130s std dev: 0.00799s window: 10
average rate: 8.747
	min: 0.105s max: 0.128s std dev: 0.00662s window: 10

Results with PhysicsBasedSource

    class ROS2Lidar2DSensorComponent : public ROS2SensorComponentBase<PhysicsBasedSource>
ceccocats@aron:~$ ros2 topic hz /scan -w 10
average rate: 10.000
	min: 0.099s max: 0.101s std dev: 0.00054s window: 10
average rate: 10.009
	min: 0.099s max: 0.100s std dev: 0.00038s window: 10
average rate: 9.999
	min: 0.100s max: 0.100s std dev: 0.00007s window: 10
average rate: 9.999
	min: 0.100s max: 0.100s std dev: 0.00012s window: 10

Im using main branch but i have checked also dev branch and it seems to also use TickBasedSource.

class ROS2Lidar2DSensorComponent : public ROS2SensorComponentBase<TickBasedSource>

Metadata

Metadata

Assignees

Labels

feature/roboticsThis item is related to robotics.kind/bugCategorizes issue or PR as related to a bug.priority/majorIssue causes friction in workflows, but can be worked around or avoided. Rare or difficult crashes.sig/simulationCategorizes an issue or PR as relevant to SIG Simulation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions