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

velodyne-128 driver issue #541

Open
YangJunghoon opened this issue Sep 23, 2024 · 3 comments
Open

velodyne-128 driver issue #541

YangJunghoon opened this issue Sep 23, 2024 · 3 comments
Labels

Comments

@YangJunghoon
Copy link

Please complete the following information:

  • OS and Version: [Ubuntu 22.04]
  • ROS Version: [humble]
  • Built from Source or Downloaded from Official Repository:
  • Version: sudo apt install ros-humble-velodyne ros-humble-pcl-ros ros-humble-visualization-msgs

Describe the bug
velodyne_transform_node-2] [INFO] [1727069870.757835119] [velodyne_transform]: correction angles: config/VLS128.yaml
[velodyne_driver_node-1] terminate called after throwing an instance of 'std::runtime_error'
[velodyne_driver_node-1] what(): Unknown Velodyne LIDAR model: VLS-128

To Reproduce
Steps to reproduce the behavior:

  1. I found out that you guys updated the vls-128 version.
  2. so i setup through sudo apt install ros-humble-velodyne ros-humble-pcl-ros ros-humble-visualization-msgs
  3. and make nodes like, ex) Node(
    package='velodyne_driver',
    executable='velodyne_driver_node',
    name='velodyne_driver',
    parameters=[{
    'frame_id': 'velodyne',
    'model': 'VLS-128'
    }],
    output='screen'
    ),
    Node(
    package='velodyne_pointcloud',
    executable='velodyne_transform_node',
    name='velodyne_transform',
    parameters=[{
    'min_range': 0.4,
    'max_range': 130.0,
    'calibration': 'config/VLS128.yaml',
    'model': 'VLS-128'
    }],
    output='screen'
    )
  4. but i got [velodyne_driver_node-1] terminate called after throwing an instance of 'std::runtime_error'
    [velodyne_driver_node-1] what(): Unknown Velodyne LIDAR model: VLS-128
    [velodyne_transform_node-2] [WARN] [1727069870.763872376] [velodyne_pointcloud]: Timings not supported for model VLS-128
    [velodyne_transform_node-2] [WARN] [1727069870.763890396] [velodyne_pointcloud]: NO TIMING OFFSETS CALCULATED. ARE YOU USING A SUPPORTED VELODYNE SENSOR?
    [ERROR] [velodyne_driver_node-1]: process has died [pid 90514, exit code -6, cmd '/opt/ros/humble/lib/velodyne_driver/velodyne_driver_node --ros-args -r __node:=velodyne_driver --params-file /tmp/launch_params_lzog4cqa'].
  5. i checked up ros/humble/share/velodyne_driver/launch, then i found velodyne_driver_node-VLP16-composed-launch.py,velodyne_driver_node-VLP16-launch.py, velodyne_driver_node-VLP32C-composed-launch.py, velodyne_driver_node-VLP32C-launch.py but o couldn't found 128,
  6. How do I use version 128

Expected behavior
using VLS-128 driver

@valgur
Copy link

valgur commented Sep 23, 2024

Set the model ID to VLS128 to fix the issue.

@YangJunghoon
Copy link
Author

i tried that
Node(
package='velodyne_driver',
executable='velodyne_driver_node',
name='velodyne_driver',
parameters=[{
'frame_id': 'velodyne',
'model': 'VLS128'
}],
output='screen'
),
Node(
package='velodyne_pointcloud',
executable='velodyne_transform_node',
name='velodyne_transform',
parameters=[{
'min_range': 0.4,
'max_range': 130.0,
'calibration': 'config/VLS128.yaml',
'model': 'VLS128'
}],
output='screen'
)
but return error
[velodyne_transform_node-2] [INFO] [1727073236.440597056] [velodyne_transform]: correction angles: config/VLS128.yaml
[velodyne_driver_node-1] terminate called after throwing an instance of 'std::runtime_error'
[velodyne_driver_node-1] what(): Unknown Velodyne LIDAR model: VLS128
[velodyne_transform_node-2] [WARN] [1727073236.447534543] [velodyne_pointcloud]: Timings not supported for model VLS128
[velodyne_transform_node-2] [WARN] [1727073236.447553540] [velodyne_pointcloud]: NO TIMING OFFSETS CALCULATED. ARE YOU USING A SUPPORTED VELODYNE SENSOR?
[ERROR] [velodyne_driver_node-1]: process has died [pid 94803, exit code -6, cmd '/opt/ros/humble/lib/velodyne_driver/velodyne_driver_node --ros-args -r __node:=velodyne_driver --params-file /tmp/launch_params_t0ly_cme'].

@valgur
Copy link

valgur commented Sep 23, 2024

Ok, that's a bug in the driver then:

} else if (config_.model == "VLS128") {
timing_offsets_.resize(3);
for (size_t i = 0; i < timing_offsets_.size(); ++i) {
timing_offsets_[i].resize(17); // 17 (+1 for the maintenance time after firing group 8)
}
double full_firing_cycle = VLS128_SEQ_TDURATION * 1e-6; // seconds
double single_firing = VLS128_CHANNEL_TDURATION * 1e-6; // seconds
double offset_paket_time = VLS128_TOH_ADJUSTMENT * 1e-6; // seconds
double sequenceIndex, firingGroupIndex;
// Compute timing offsets
for (size_t x = 0; x < timing_offsets_.size(); ++x) {
for (size_t y = 0; y < timing_offsets_[x].size(); ++y) {
sequenceIndex = x;
firingGroupIndex = y;
timing_offsets_[x][y] =
(full_firing_cycle * sequenceIndex) + (single_firing * firingGroupIndex) -
offset_paket_time;
RCLCPP_DEBUG(
rclcpp::get_logger("velodyne_pointcloud"),
"firing_seque %lu firing_group %lu offset %f", x, y, timing_offsets_[x][y]);
}
}

Btw, you can give https://github.com/valgur/velodyne_decoder a try. It's not a direct replacement, but the precise timing info for VLS-128 is definitely supported there, together with dual-return support and other improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants