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 vlp-16 not publishing Pointcloud2 with ROS2 in Docker (ROS1 working) #540

Open
h0uter opened this issue Aug 13, 2024 · 0 comments
Labels

Comments

@h0uter
Copy link

h0uter commented Aug 13, 2024

Please complete the following information:

  • OS and Version: Docker image ros:humble
  • ROS Version: Docker image ros:humble
  • Built from Source or Downloaded from Official Repository: installed with ros-$ROS_DISTRO-velodyne
  • Version: [if from repository, give version from sudo dpkg -s ros-$ROS_VERSION-velodyne, if from source, give commit hash]

Describe the bug
ROS2 driver boots, creates topics but never publishes on those topics

bootlog

velodyne-1  | [INFO] [launch]: All log files can be found below /root/.ros/log/XXXX
velodyne-1  | [INFO] [launch]: Default logging verbosity is set to INFO
velodyne-1  | [INFO] [velodyne_driver_node-1]: process started with pid [30]
velodyne-1  | [INFO] [velodyne_convert_node-2]: process started with pid [32]
velodyne-1  | [INFO] [velodyne_laserscan_node-3]: process started with pid [34]
velodyne-1  | [velodyne_driver_node-1] [INFO] [1723573645.668104927] [velodyne_driver_node]: Velodyne VLP-16 rotating at 600.000000 RPM
velodyne-1  | [velodyne_driver_node-1] [INFO] [1723573645.668337121] [velodyne_driver_node]: publishing 76 packets per scan
velodyne-1  | [velodyne_driver_node-1] [INFO] [1723573645.668374369] [velodyne_driver_node]: Cut at specific angle feature activated. Cutting velodyne points always at 6.283185 rad.
velodyne-1  | [velodyne_driver_node-1] [INFO] [1723573645.668388673] [velodyne_driver_node]: expected frequency: 9.921 (Hz)
velodyne-1  | [velodyne_driver_node-1] [INFO] [1723573645.669490764] [velodyne_driver_node]: Only accepting packets from IP address: 192.168.1.201
velodyne-1  | [velodyne_driver_node-1] [INFO] [1723573645.669550317] [velodyne_driver_node]: Opening UDP socket: port 2368
velodyne-1  | [velodyne_convert_node-2] [INFO] [1723573645.670721400] [velodyne_convert_node]: correction angles: /opt/ros/foxy/share/velodyne_pointcloud/params/VLP16db.yaml

To Reproduce
The following Dockerfile builds successfully, it starts successfully, it mentions the cannot poll() error when I power down the Velodyne, it successfully creates the topic /velodyne_pointclouds. However it does not publish any messages on this topic.

# ROS2 Dockerfile
ARG ROS_DISTRO=humble

FROM ros:$ROS_DISTRO
ENV ROS_DISTRO=$ROS_DISTRO

RUN apt-get update && apt-get upgrade -y

RUN apt-get update \
    && apt-get install -y curl \
    && curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - \
    && apt-get update

# install the velodyne drivers
RUN apt-get install -y ros-$ROS_DISTRO-velodyne

CMD  "ros2 launch velodyne velodyne-all-nodes-VLP16-launch.py"

Expected behavior
I expect Pointcloud2 messages to be published on the /velodyne_pointclouds topic.

Additional context
Everything is working fine under ROS1 with the following Dockerfile:

# ROS1 Dockerfile
ARG ROS_DISTRO=noetic

FROM ros:$ROS_DISTRO-ros-core AS base

ENV ROS_DISTRO=$ROS_DISTRO

# set shell to bash (instead of "sh") for RUN (first line) and when opening a new terminal (second line).
SHELL ["/bin/bash", "-c"]
ENV SHELL /bin/bash

RUN apt-get update && apt-get upgrade -y

RUN apt-get update \
    && apt-get install -y curl \
    && curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - \
    && apt-get update \
    && apt-get install -y ros-$ROS_DISTRO-velodyne-pointcloud\
    # && rosdep install --from-paths /ws_production/src -i -r -y\
    && rm -rf /var/lib/apt/lists/*

CMD "roslaunch velodyne_pointcloud VLP16_points.launch --wait"
@h0uter h0uter added the bug label Aug 13, 2024
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

1 participant