Skip to content

Rosmaster X3 /scan data truncation #15

@EBoyCoder

Description

@EBoyCoder

The scan topic created from the node opened by

ros2 launch sllidar_ros2 view_sllidar_launch.py

provides scan data from the LiDAR system, for which the output is formatted in the following way:

header:
stamp:
sec: 1755038923
nanosec: 189240596
frame_id: laser
angle_min: -3.1241390705108643
angle_max: 3.1415927410125732
angle_increment: 0.005806980188935995
time_increment: 0.00012355842045508325
scan_time: 0.13331952691078186
range_min: 0.15000000596046448
range_max: 12.0
ranges:

  • 0.7020000219345093
  • 0.7039999961853027
    ... etc, there are a lot of the ranges, which are followed by a lot of intensity values. These fields are truncated by the default argument to the --truncate-length optional argument, which is 128 lines. This can be resolved by adding the -f optional argument, which prevents any truncation, or by setting the truncate length to a larger number than the default value. An example command to output the data to a text file without any truncation would be as follows:

ros2 topic echo -f /scan > output.txt

hope this helps!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions