Giter Site home page Giter Site logo

ydlidar_ros2_driver's People

Contributors

yangfuyuan avatar yistxin avatar zhanyiaini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ydlidar_ros2_driver's Issues

lots of builds errors RO2 Humble in raspberry PI4

Many build errors when i build the package
I am not strong at cpp so here is are typical exemples ( there is many so much of them that i can not copy them all)

391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/mower/ydlidar_ws/src/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:56:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [9])’
56 | node->declare_parameter("frame_id");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/mower/ydlidar_ws/src/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/mower/ydlidar_ws/src/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:56:26: note: candidate expects 4 arguments, 1 provided
56 | node->declare_parameter("frame_id");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/mower/ydlidar_ws/src/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’

How to initialize the driver without sudo?

I've successfully install the SDK and the ros2_driver in my docker container.
However, I still cannot start my lidar probably due to a permission error.
Running sudo tri_test works, but not without sudo, which returns:

[YDLIDAR] Error, cannot bind to the specified [serial port:/dev/ttyUSB0] and [baudrate:230400]

Screenshot from 2023-12-29 13-01-59

The command ros2 launch ydlidar_ros2_driver ydlidar_launch_view.py returns this error:

[ydlidar_ros2_driver_node-1] [ERROR] [1703828580.750248162] [ydlidar_ros2_driver_node]: Unknown error

Unfortunantely, using sudo and ros2 doesn'T work:

$ sudo ros2 launch ydlidar_ros2_driver ydlidar_launch_view.py 
sudo: ros2: command not found

and running the ./initenv.sh doesn't work in the docker container:

ydlidar_ros2_driver/startup$ ./initenv.sh 
./initenv.sh: line 2: /etc/udev/rules.d/ydlidar.rules: Permission denied
./initenv.sh: line 4: /etc/udev/rules.d/ydlidar-V2.rules: Permission denied
./initenv.sh: line 6: /etc/udev/rules.d/ydlidar-2303.rules: Permission denied
udev: unrecognized service
udev: unrecognized service

ydlidar_ros2_driver/startup$ sudo ./initenv.sh 
udev: unrecognized service
udev: unrecognized service

LiDAR not visualing in Rviz

I have followed the steps on the github but i still get this error any ideas how to fix. Running ROS2 Foxy on the jetson nano. Ubuntu 20.04.
Screenshot from 2023-12-07 14-38-29

Build problem - Blocked at 50%

Hello,

I have a problem during the build when I run the build of the ydlidar_ros2_driver package after the colcon build --symlink-install :

[1min 16.4s] [0/1 complete] [ydlidar_ros2_driver:build 50% - 1min 15.5s]

I use Ubuntu 20.04 Desktop on a Raspberry Pi.
I've follow the best as I could the indication to install YDLidar-SDK package and seems to work when I run the test.
So I don't know where there is a problem.

Do you have an idea ? Could you help me please ?

Have a good day

How to slam using YDLidar

Hello
This is the first time using YDLidar.
I have verified that Lidar works through Rviz on Ubuntu.
I want to create maps and use navigation using Lidar, which I am currently using.
I would like to know more detailed process and tutorial about this.
This is the development environment I am currently developing.

  • Ubuntu 20.04
  • ROS2 foxy
    -YDLidar TG15
  • Raspberry Pi 4
    -PC

launch warnings none_name, node_executable deprecated

I'm using ydlidar_ros2_driver_node version 1.0.1 and SDK version 1.0.3 and was getting warnings:

UserWarning: The parameter 'node_name' is deprecated, use 'name' instead
UserWarning: The parameter 'node_name' is deprecated, use 'name' instead

I changed my ydlidar_launch.py to eliminate these warnings:

    driver_node = LifecycleNode(package='ydlidar_ros2_driver',
                                executable='ydlidar_ros2_driver_node',
                                name='ydlidar_ros2_driver_node',
                                output='screen',
                                emulate_tty=True,
                                parameters=[parameter_file],
                                )
     tf2_node = Node(package='tf2_ros',
                    executable='static_transform_publisher',
                    name='static_tf_pub_laser',
                    arguments=['0', '0', '0.02','0', '0', '0', '1','base_link','laser_frame'],
                    )

There is a pull request to perform this: #6

Build Error in ROS2 Humble: no matching function - rclcpp::Node::declare_parameter(const char [5])

Compile errors in ROS2 Humble (on Ubuntu 22.04 Server Jammy)

$ colcon build --symlink-install
Starting >>> ydlidar_ros2_driver
[Processing: ydlidar_ros2_driver]                             
--- stderr: ydlidar_ros2_driver                               
/home/ubuntu/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp: In function ‘int main(int, char**)’:
/home/ubuntu/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:44:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [5])’
   44 |   node->declare_parameter("port");
      |   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note:   template argument deduction/substitution failed:
/home/ubuntu/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:44:26: note:   candidate expects 4 arguments, 1 provided
   44 |   node->declare_parameter("port");
      |   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

...


ubuntu@ROS2HH:~/ydlidar_ros2_ws$ printenv | grep ROS
ROS_VERSION=2
ROS_PYTHON_VERSION=3
ROS_DOMAIN_ID=0
ROS_LOCALHOST_ONLY=0
ROS_DISTRO=humble


ubuntu@ROS2HH:~/ydlidar_ros2_ws$ uname -a
Linux ROS2HH 5.15.0-1017-raspi #19-Ubuntu SMP PREEMPT Fri Oct 14 08:22:47 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

/stop_scan service call causes improper logging of "[ERROR] Failed to get scan"

The ydlidar_ros2_driver_node provides two services /stop_scan and /start_scan which turn off/on the laser respectively. The main loop always attempts doProcessSimpleScan().

When the laser has been turned off via /stop_scan, the main loop assumes an error and improperly logs "[ERROR] time Failed to get scan".

An error should not be logged when the /stop_scan service has turned off the laser.

using version 1.0.2 Modified for Humble 10/2022


*** Calling ydlidar_ros_driver's /stop_scan service
ros2 service call /stop_scan std_srvs/Empty



[ydlidar_ros2_driver_node-1] [YDLIDAR] Now lidar scanning has stopped!
[ydlidar_ros2_driver_node-1] [ERROR] [1716343284.161687969] [ydlidar_ros2_driver_node]: Failed to get scan
[ydlidar_ros2_driver_node-1] [ERROR] [1716343284.234454572] [ydlidar_ros2_driver_node]: Failed to get scan
[ydlidar_ros2_driver_node-1] [ERROR] [1716343284.307347786] [ydlidar_ros2_driver_node]: Failed to get scan

colcon build --symlink-install problem

Hello
I am a first-time user of YDLidar.
I'm testing according to the tutorial, but I'm having a problem, so I'm asking a question.

image

As shown in the picture, when entering colcon build --symlink-install

image

Package is not installing.
I would appreciate it if you could tell me how to solve it.

Error, cannot retrieve YDLidar health code: ffffffff

Hi, so I have just started implementing a ROS 2 project using a ydlidar x2l LiDAR.
When I run the ydlidar_launch_view.py file i get the following output:
I noticed a similar issue that was closed, but making adjustments didn't help me (unless i did it wrong).

ros2 launch ydlidar_ros2_driver ydlidar_launch_view.py
[INFO] [launch]: Default logging verbosity is set to INFO
<launch.substitutions.launch_configuration.LaunchConfiguration object at 0x7f589dfb3250>
[INFO] [ydlidar_ros2_driver_node-1]: process started with pid [5837]
[INFO] [static_transform_publisher-2]: process started with pid [5839]
[static_transform_publisher-2] [WARN] [1694086841.296649159] []: Old-style arguments are deprecated; see --help for new-style arguments
[ydlidar_ros2_driver_node-1] [INFO] [1694086841.318627688] [ydlidar_node]: [YDLIDAR INFO] Current ROS Driver Version: 1.0.1
[ydlidar_ros2_driver_node-1]
[ydlidar_ros2_driver_node-1] [YDLIDAR] SDK initializing
[ydlidar_ros2_driver_node-1] [YDLIDAR] SDK has been initialized
[ydlidar_ros2_driver_node-1] [YDLIDAR] SDK Version: 1.1.18
[static_transform_publisher-2] [INFO] [1694086841.326665310] [static_tf_pub_laser]: Spinning until stopped - publishing transform
[static_transform_publisher-2] translation: ('0.000000', '0.000000', '0.020000')
[static_transform_publisher-2] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-2] from 'base_link' to 'laser_frame'
[ydlidar_ros2_driver_node-1] [YDLIDAR] Lidar successfully connected [/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0:115200]
[ydlidar_ros2_driver_node-1] [YDLIDAR] Error, cannot retrieve YDLidar health code: ffffffff
[ydlidar_ros2_driver_node-1] [YDLIDAR] Fail to get baseplate device information
[ydlidar_ros2_driver_node-1] [YDLIDAR] Lidar init success, Elapsed time 2662 ms
[ydlidar_ros2_driver_node-1] [YDLIDAR] Failed to start scan mode: ffffffff
[ydlidar_ros2_driver_node-1] [INFO] [1694086849.624063705] [ydlidar_node]: [YDLIDAR INFO] Now YDLIDAR is stopping .......
[INFO] [ydlidar_ros2_driver_node-1]: process has finished cleanly [pid 5837]

When I launch the file, the LiDAR rotation speed drops down aswell. I have check the voltage during this time and its not sagging, I have a supply with more than enough power for the LiDAR.

My launch file:
`
def generate_launch_description():
share_dir = get_package_share_directory('ydlidar_ros2_driver')
parameter_file = LaunchConfiguration('params_file')
node_name = 'ydlidar_ros2_driver_node'

params_declare = DeclareLaunchArgument('params_file',
                                        default_value=os.path.join(
                                        share_dir, 'params', 'X2.yaml'),
                                        description='FPath to the ROS2 parameters file to use.')

print (parameter_file)

driver_node = LifecycleNode(package='ydlidar_ros2_driver',
                            executable='ydlidar_ros2_driver_node',
                            name='ydlidar_node',
                            output='screen',
                            emulate_tty=True,
                            parameters=[parameter_file],
                            namespace='/',
                            )
tf2_node = Node(package='tf2_ros',
                executable='static_transform_publisher',
                name='static_tf_pub_laser',
                arguments=['0', '0', '0.02','0', '0', '0', '1','base_link','laser_frame'],
                )

return LaunchDescription([
    params_declare,
    driver_node,
    tf2_node,
])`

Parameter file used:
ydlidar_ros2_driver_node: ros__parameters: port: /dev/ydlidar frame_id: laser_frame ignore_array: "" baudrate: 115200 lidar_type: 1 device_type: 0 sample_rate: 3 abnormal_check_count: 4 fixed_resolution: true reversion: false inverted: false auto_reconnect: true isSingleChannel: true intensity: false support_motor_dtr: true angle_max: 180.0 angle_min: -180.0 range_max: 12.0 range_min: 0.1 frequency: 10.0 invalid_range_is_inf: false

Any help is greatly appreciated. Thank you in advance

Unable to compile under ros Iron (don't know with ros humble)

I am using ros Iron,
I cloned the humble version of ydlidar_ros2_driver (main branch produces errors as well, but not the same)
compiling with colcon colcon build --symlink-install results with missing libraries : lttng and numa
I've installed lib lttng following the original procedure : sudo apt-get install lttng-tools lttng-modules-dkms liblttng-ust-dev
I've installed libnuma with sudo apt-get -y install libnuma-dev

but unfortunately I still have error with missing library numa1

any suggestions?

Wrong parameter type, parameter {invalid_range_is_inf} is of type {double}, setting it to {bool} is not allowed.

hello i have x3 lidar (which is similar to x2) and I am using the ydlidar sdk on ubuntu 22 with ros2 humble implementation. Inside the ydlidar.yaml, whenever i set invalid_range_is_inf to false i get the error:
parameter 'invalid_range_is_inf' has invalid type: Wrong parameter type, parameter {invalid_range_is_inf} is of type {double}, setting it to {bool} is not allowed.

which indicates that the type is double.

But when i change it to 0.0 i get the error:
what(): parameter 'invalid_range_is_inf' has invalid type: expected [bool] got [double]

this is a paradox and i need help
thanks

Build error in ROS2 rolling version with the master branch

I run in my dockerfile this command

RUN mkdir -p /home/${USERNAME}/ros2_ws/src && cd /home/${USERNAME}/ros2_ws/src \
  && git clone https://github.com/YDLIDAR/ydlidar_ros2_driver.git -b master\
  && cd .. && . /opt/ros/rolling/setup.bash \
  && rosdep update && rosdep install -y -r --from-paths src --ignore-src \
  && colcon build --symlink-install

and got this compiler error:

17.78 /home/ros/ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp: In function ‘int main(int, char**)’:
17.78 /home/ros/ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:44:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [5])’
17.78    44 |   node->declare_parameter("port");
17.78       |   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

Is the master branch compatible to the ROS2 rolling?

I can build the humble branch without any issue.

Unused parameter

invalid_range_is_inf is defined in yaml and loaded in cpp. But it is not used anywhere.
定义在 yaml 文件的 invalid_range_is_inf 在cpp里加载但未被使用!

Not working with Humble or later

Hi guys,

I was experiencing problem with the branch working on Humble, and I am not too fan of the solution in the humble branch because all the files are executable with is useless and not a good practice.

So I created a few pull request to change this.
Please see here the pull requests opened today

#30 (this one reused #19)
#31
#32

If nobody wants to merge them you can use my repo.. all pull request are merged in my main branch : https://github.com/flochre/ydlidar_ros2_driver

Bloom plan?

Hi,

I would like to ask if you guys have a plan to bloom release this repository. Releasing will help make the lidar and the developed code used by more people in the ROS community.

Thanks!
Jaehyun

Need to change the parameters with wrong names

Hi,

As the title says, in the yaml file in the location "ydlidar_ros2_driver/params/ydlidar.yaml", param names have to be fixed as below.

max_range -> range_max
min_range -> range_min

Ryan

Colcon build failed

I am getting this error message

amal@amal-Aspire-A515-57G:~/ydlidar$ colcon build --symlink-install
Starting >>> ydlidar_ros2_driver
--- stderr: ydlidar_ros2_driver
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp: In function ‘int main(int, char**)’:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:44:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [5])’
44 | node->declare_parameter("port");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:44:26: note: candidate expects 4 arguments, 1 provided
44 | node->declare_parameter("port");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:44:26: note: couldn’t deduce template parameter ‘ParameterT’
44 | node->declare_parameter("port");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:51:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [13])’
51 | node->declare_parameter("ignore_array");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:51:26: note: candidate expects 4 arguments, 1 provided
51 | node->declare_parameter("ignore_array");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:51:26: note: couldn’t deduce template parameter ‘ParameterT’
51 | node->declare_parameter("ignore_array");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:56:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [9])’
56 | node->declare_parameter("frame_id");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:56:26: note: candidate expects 4 arguments, 1 provided
56 | node->declare_parameter("frame_id");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:56:26: note: couldn’t deduce template parameter ‘ParameterT’
56 | node->declare_parameter("frame_id");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:62:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [9])’
62 | node->declare_parameter("baudrate");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:62:26: note: candidate expects 4 arguments, 1 provided
62 | node->declare_parameter("baudrate");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:62:26: note: couldn’t deduce template parameter ‘ParameterT’
62 | node->declare_parameter("baudrate");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:67:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [11])’
67 | node->declare_parameter("lidar_type");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:67:26: note: candidate expects 4 arguments, 1 provided
67 | node->declare_parameter("lidar_type");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:67:26: note: couldn’t deduce template parameter ‘ParameterT’
67 | node->declare_parameter("lidar_type");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:72:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [12])’
72 | node->declare_parameter("device_type");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:72:26: note: candidate expects 4 arguments, 1 provided
72 | node->declare_parameter("device_type");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:72:26: note: couldn’t deduce template parameter ‘ParameterT’
72 | node->declare_parameter("device_type");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:77:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [12])’
77 | node->declare_parameter("sample_rate");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:77:26: note: candidate expects 4 arguments, 1 provided
77 | node->declare_parameter("sample_rate");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:77:26: note: couldn’t deduce template parameter ‘ParameterT’
77 | node->declare_parameter("sample_rate");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:82:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [21])’
82 | node->declare_parameter("abnormal_check_count");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:82:26: note: candidate expects 4 arguments, 1 provided
82 | node->declare_parameter("abnormal_check_count");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:82:26: note: couldn’t deduce template parameter ‘ParameterT’
82 | node->declare_parameter("abnormal_check_count");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:88:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [14])’
88 | node->declare_parameter("intensity_bit");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:88:26: note: candidate expects 4 arguments, 1 provided
88 | node->declare_parameter("intensity_bit");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:88:26: note: couldn’t deduce template parameter ‘ParameterT’
88 | node->declare_parameter("intensity_bit");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:95:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [17])’
95 | node->declare_parameter("fixed_resolution");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:95:26: note: candidate expects 4 arguments, 1 provided
95 | node->declare_parameter("fixed_resolution");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:95:26: note: couldn’t deduce template parameter ‘ParameterT’
95 | node->declare_parameter("fixed_resolution");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:100:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [10])’
100 | node->declare_parameter("reversion");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:100:26: note: candidate expects 4 arguments, 1 provided
100 | node->declare_parameter("reversion");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:100:26: note: couldn’t deduce template parameter ‘ParameterT’
100 | node->declare_parameter("reversion");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:105:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [9])’
105 | node->declare_parameter("inverted");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:105:26: note: candidate expects 4 arguments, 1 provided
105 | node->declare_parameter("inverted");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:105:26: note: couldn’t deduce template parameter ‘ParameterT’
105 | node->declare_parameter("inverted");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:109:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [15])’
109 | node->declare_parameter("auto_reconnect");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:109:26: note: candidate expects 4 arguments, 1 provided
109 | node->declare_parameter("auto_reconnect");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:109:26: note: couldn’t deduce template parameter ‘ParameterT’
109 | node->declare_parameter("auto_reconnect");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:114:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [16])’
114 | node->declare_parameter("isSingleChannel");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:114:26: note: candidate expects 4 arguments, 1 provided
114 | node->declare_parameter("isSingleChannel");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:114:26: note: couldn’t deduce template parameter ‘ParameterT’
114 | node->declare_parameter("isSingleChannel");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:119:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [10])’
119 | node->declare_parameter("intensity");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:119:26: note: candidate expects 4 arguments, 1 provided
119 | node->declare_parameter("intensity");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:119:26: note: couldn’t deduce template parameter ‘ParameterT’
119 | node->declare_parameter("intensity");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:124:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [18])’
124 | node->declare_parameter("support_motor_dtr");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:124:26: note: candidate expects 4 arguments, 1 provided
124 | node->declare_parameter("support_motor_dtr");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:124:26: note: couldn’t deduce template parameter ‘ParameterT’
124 | node->declare_parameter("support_motor_dtr");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:131:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [10])’
131 | node->declare_parameter("angle_max");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:131:26: note: candidate expects 4 arguments, 1 provided
131 | node->declare_parameter("angle_max");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:131:26: note: couldn’t deduce template parameter ‘ParameterT’
131 | node->declare_parameter("angle_max");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:135:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [10])’
135 | node->declare_parameter("angle_min");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:135:26: note: candidate expects 4 arguments, 1 provided
135 | node->declare_parameter("angle_min");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:135:26: note: couldn’t deduce template parameter ‘ParameterT’
135 | node->declare_parameter("angle_min");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:140:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [10])’
140 | node->declare_parameter("range_max");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:140:26: note: candidate expects 4 arguments, 1 provided
140 | node->declare_parameter("range_max");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterDescriptor&, bool)’
434 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:434:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:140:26: note: couldn’t deduce template parameter ‘ParameterT’
140 | node->declare_parameter("range_max");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, const rclcpp::ParameterValue&, const ParameterDescriptor&, bool)’
366 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:366:3: note: candidate expects 4 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate: ‘const rclcpp::ParameterValue& rclcpp::Node::declare_parameter(const string&, rclcpp::ParameterType, const ParameterDescriptor&, bool)’
391 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:391:3: note: candidate expects 4 arguments, 1 provided
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:144:26: error: no matching function for call to ‘rclcpp::Node::declare_parameter(const char [10])’
144 | node->declare_parameter("range_min");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:22,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:23:
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: candidate: ‘template auto rclcpp::Node::declare_parameter(const string&, const ParameterT&, const ParameterDescriptor&, bool)’
421 | declare_parameter(
| ^~~~~~~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/node.hpp:421:3: note: template argument deduction/substitution failed:
/home/amal/ydlidar/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:144:26: note: candidate expects 4 arguments, 1 provided
144 | node->declare_parameter("range_min");
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp:28,

Error at running ydlidar_launch_view.py

I successfully install and run examples from YDLidar_SDK and ydlidar_launch.py in ydlidar_ros2_driver, but I got error when I run the ydlidar_launch_view.py.

The output:

[INFO] [ydlidar_ros2_driver_node-1]: process started with pid [98526]
[INFO] [static_transform_publisher-2]: process started with pid [98528]
[INFO] [ydlidar_ros2_driver_node-1]: sending signal 'SIGINT' to process[ydlidar_ros2_driver_node-1]
[ydlidar_ros2_driver_node-1] YDLidar SDK initializing
[ydlidar_ros2_driver_node-1] YDLidar SDK has been initialized
[ydlidar_ros2_driver_node-1] [YDLIDAR]:SDK Version: 1.0.3
[ydlidar_ros2_driver_node-1] LiDAR successfully connected
[ydlidar_ros2_driver_node-1] [YDLIDAR]:Lidar running correctly ! The health status: good
[ydlidar_ros2_driver_node-1] [YDLIDAR] Connection established in [/dev/ttyACM0][230400]:
[ydlidar_ros2_driver_node-1] Firmware version: 2.12
[ydlidar_ros2_driver_node-1] Hardware version: 2
[ydlidar_ros2_driver_node-1] Model: G4
[ydlidar_ros2_driver_node-1] Serial: 2018052300000036
[ydlidar_ros2_driver_node-1] [YDLIDAR INFO] Current Scan Frequency: 10.000000Hz
[ydlidar_ros2_driver_node-1] LiDAR init success!
[ydlidar_ros2_driver_node-1] [INFO] [1628759984.906625355] [ydlidar_ros2_driver_node]: [YDLIDAR INFO] Current ROS Driver Version: 1.0.1
[ydlidar_ros2_driver_node-1]
[static_transform_publisher-2] [INFO] [1628759984.909083192] [static_tf_pub_laser]: Spinning until killed publishing transform from 'base_link' to 'laser_frame'
[ydlidar_ros2_driver_node-1] [INFO] [1628759985.887675823] [rclcpp]: signal_handler(signal_value=2)
[ydlidar_ros2_driver_node-1] [YDLIDAR3]:Fixed Size: 909
[ydlidar_ros2_driver_node-1] [YDLIDAR3]:Sample Rate: 9K
[ydlidar_ros2_driver_node-1] [YDLIDAR INFO] Current Sampling Rate : 9K
[ydlidar_ros2_driver_node-1] [YDLIDAR INFO] Now YDLIDAR is scanning ......
[ydlidar_ros2_driver_node-1] terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
[ydlidar_ros2_driver_node-1] what(): could not create publisher: rcl node's context is invalid, at /tmp/binarydeb/ros-foxy-rcl-1.1.11/src/rcl/node.c:441
[ERROR] [ydlidar_ros2_driver_node-1]: process has died [pid 98526, exit code -6, cmd '/home/user/ydlidar_ros2_ws/install/ydlidar_ros2_driver/lib/ydlidar_ros2_driver/ydlidar_ros2_driver_node --ros-args -r __node:=ydlidar_ros2_driver_node -r __ns:=/ --params-file /home/user/ydlidar_ros2_ws/install/ydlidar_ros2_driver/share/ydlidar_ros2_driver/params/ydlidar.yaml'].
[ERROR] [static_transform_publisher-2]: process[static_transform_publisher-2] failed to terminate '5' seconds after receiving 'SIGINT', escalating to 'SIGTERM'
[INFO] [static_transform_publisher-2]: sending signal 'SIGTERM' to process[static_transform_publisher-2]
[ERROR] [static_transform_publisher-2]: process has died [pid 98528, exit code -15, cmd '/home/user/ros2_foxy/install/tf2_ros/lib/tf2_ros/static_transform_publisher 0 0 0.02 0 0 0 1 base_link laser_frame --ros-args -r __node:=static_tf_pub_laser -r __node:=static_tf_pub_laser'].

Which stopped and shows the " terminate called after throwing an instance of 'rclcpp::exceptions::RCLError' ".

I am using Ubuntu 20.04, Ros2 Foxy

Services

I am not able to utilize the start and stop scan services, when I list ros2 service list:
/ydlidar_ros2_driver_node/change_state
/ydlidar_ros2_driver_node/describe_parameters
/ydlidar_ros2_driver_node/get_parameter_types
/ydlidar_ros2_driver_node/get_parameters
/ydlidar_ros2_driver_node/list_parameters
/ydlidar_ros2_driver_node/set_parameters
/ydlidar_ros2_driver_node/set_parameters_atomically

I don't see start and stop scan

YDLidar fails health check

I'm getting the following error while running on an X2.

ros2 run ydlidar_ros2_driver ydlidar_ros2_driver_node 
[INFO] [1607667192.059940007] [ydlidar_ros2_driver_node]: [YDLIDAR INFO] Current ROS Driver Version: 1.0.1

YDLidar SDK initializing
YDLidar SDK has been initialized
[YDLIDAR]:SDK Version: 1.0.2
LiDAR successfully connected
Error, cannot retrieve YDLidar health code: ffffffff
get Device Information Error
[CYdLidar::initialize] Error initializing YDLIDAR check status under [/dev/ydlidar] and [230400].
[ERROR] [1607667194.729046802] [ydlidar_ros2_driver_node]: Unknown error

[INFO] [1607667194.742430593] [ydlidar_ros2_driver_node]: [YDLIDAR INFO] Now YDLIDAR is stopping

The lidar runs successfully at the SDK level using ./ydlidar_test so the connection to the port is OK.
Any help would be appreciated. Thank you.

Launch files not working on Ubuntu 20.04

Hey all,

I'm trying to use the YDLidar on Ubuntu20.04 using ROS2. However, I keep getting the following error. I tried fixing it myself but I can't figure it out. I feel like it has something to do with using Ubuntu20.04 which builds differently somehow. You guys have any suggestions?

ros2 launch ydlidar_ros2_driver ydlidar_launch_view.py 
[INFO] [launch]: All log files can be found below /home/mkerklaan/.ros/log/2022-05-14-10-52-04-025192-mkerklaan-ThinkPad-T15-Gen-2i-603152
[INFO] [launch]: Default logging verbosity is set to INFO
Task exception was never retrieved
future: <Task finished name='Task-2' coro=<LaunchService._process_one_event() done, defined at /opt/ros/galactic/lib/python3.8/site-packages/launch/launch_service.py:226> exception=InvalidLaunchFileError('py')>
Traceback (most recent call last):
  File "/opt/ros/galactic/lib/python3.8/site-packages/launch/launch_description_sources/any_launch_file_utilities.py", line 53, in get_launch_description_from_any_launch_file
    return loader(launch_file_path)
  File "/opt/ros/galactic/lib/python3.8/site-packages/launch/launch_description_sources/python_launch_file_utilities.py", line 68, in get_launch_description_from_python_launch_file
    return getattr(launch_file_module, 'generate_launch_description')()
  File "/home/mkerklaan/Documents/GitRepos/YLidar/install/ydlidar_ros2_driver/share/ydlidar_ros2_driver/launch/ydlidar_launch_view.py", line 40, in generate_launch_description
    driver_node = LifecycleNode(
TypeError: __init__() missing 2 required keyword-only arguments: 'name' and 'namespace'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/ros/galactic/lib/python3.8/site-packages/launch/launch_service.py", line 228, in _process_one_event
    await self.__process_event(next_event)
  File "/opt/ros/galactic/lib/python3.8/site-packages/launch/launch_service.py", line 248, in __process_event
    visit_all_entities_and_collect_futures(entity, self.__context))
  File "/opt/ros/galactic/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
    futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
  File "/opt/ros/galactic/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
    futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
  File "/opt/ros/galactic/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures
    sub_entities = entity.visit(context)
  File "/opt/ros/galactic/lib/python3.8/site-packages/launch/action.py", line 108, in visit
    return self.execute(context)
  File "/opt/ros/galactic/lib/python3.8/site-packages/launch/actions/include_launch_description.py", line 130, in execute
    launch_description = self.__launch_description_source.get_launch_description(context)
  File "/opt/ros/galactic/lib/python3.8/site-packages/launch/launch_description_source.py", line 84, in get_launch_description
    self._get_launch_description(self.__expanded_location)
  File "/opt/ros/galactic/lib/python3.8/site-packages/launch/launch_description_sources/any_launch_description_source.py", line 53, in _get_launch_description
    return get_launch_description_from_any_launch_file(location)
  File "/opt/ros/galactic/lib/python3.8/site-packages/launch/launch_description_sources/any_launch_file_utilities.py", line 56, in get_launch_description_from_any_launch_file
    raise InvalidLaunchFileError(extension, likely_errors=exceptions)
launch.invalid_launch_file_error.InvalidLaunchFileError: Caught exception when trying to load file of format [py]: __init__() missing 2 required keyword-only arguments: 'name' and 'namespace'

need ydlidar x2l parameters

please some one give the parameters for ydlidar x2l model
i can't able to run lidar it didn't connect to pi
so please help me.

thanks in advance ........

Launch Error

Hi, I meet this problem when i run the following command and I have tried some methods but no one works.

ros2 launch ydlidar_ros2_driver ydlidar_launch.py

[INFO] [launch]: All log files can be found below /home/wlw/.ros/log/2020-09-23-14-45-56-344114-ubuntu-19979
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): init() got an unexpected keyword argument 'emulate_tty'

YDLIDAR TG30 data oscillates between 0 and measured value

Description

I am using the YDLIDAR TG30 sensor to measure distances in my project. However, I noticed that the data from the sensor is not stable and oscillates between 0 and the actual measured value. This makes it hard to use the sensor for accurate measurements.

关于YDLIDAR TG30传感器的数据不稳定的问题。发现传感器的数据在0和实际测量值之间波动,导致无法进行精确的测量。希望得到解决方案或建议。谢谢!

Steps to reproduce

  • Connect the YDLIDAR TG30 sensor to a computer via USB
  • Run the ydlidar_launch.py launch file with the TG.yaml parameters
  • Observe the output data from the sensor
    • Launch rqt and plot any one of the scanned data, eg: /scan/ranges[1]

Expected behavior

The output data from the sensor should be consistent (or oscillates around the measured value) and reflect the actual distance to the objects in front of the sensor.

Actual behavior

The output data from the sensor fluctuates between 0 and the actual distance to the objects in front of the sensor. For example, if the object is 1 meter away, the output data will alternate between 0 and 1 meter.

Screenshots

image
image

Environment

  • Operating system: Ubuntu 22.04
  • ROS 2 Distro: Humble
  • YDLIDAR SDK version: 1.1.13
  • YDLIDAR TG30 firmware version: 2.1
  • ydlidar_ros2_driver commit: a74cc95
  • YDLidar-SDK commit : 5bf99a3
  • terminal log when launching ydlidar_launch.py
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ydlidar_ros2_driver_node-1]: process started with pid [9553]
[ydlidar_ros2_driver_node-1] [INFO] [1687325335.227257866] [ydlidar_ros2_driver_node]: [YDLIDAR INFO] Current ROS Driver Version: 1.0.1
[ydlidar_ros2_driver_node-1]
[ydlidar_ros2_driver_node-1] [YDLIDAR] SDK initializing
[ydlidar_ros2_driver_node-1] [YDLIDAR] SDK has been initialized
[ydlidar_ros2_driver_node-1] [YDLIDAR] SDK Version: 1.1.13
[ydlidar_ros2_driver_node-1] [YDLIDAR] Lidar successfully connected /dev/ttyUSB0[512000]
[ydlidar_ros2_driver_node-1] [YDLIDAR] Lidar running correctly! The health status: good
[ydlidar_ros2_driver_node-1] [YDLIDAR] Device info
[ydlidar_ros2_driver_node-1] Firmware version: 2.1
[ydlidar_ros2_driver_node-1] Hardware version: 1
[ydlidar_ros2_driver_node-1] Model: TG30
[ydlidar_ros2_driver_node-1] Serial: 20211220XXXXXXXX
[ydlidar_ros2_driver_node-1] [YDLIDAR] Get origin sample rate code: 20
[ydlidar_ros2_driver_node-1] [YDLIDAR] Get sample rate: 20.00K
[ydlidar_ros2_driver_node-1] [YDLIDAR] Current scan frequency: 10.00Hz
[ydlidar_ros2_driver_node-1] [YDLIDAR] Successfully obtained the corrected offset angle[-4.750000] from the lidar[20211220XXXXXXXX]
[ydlidar_ros2_driver_node-1] [YDLIDAR] Lidar init success, Elapsed time 873 ms
[ydlidar_ros2_driver_node-1] [YDLIDAR] Create thread 0x92FFD640
[ydlidar_ros2_driver_node-1] [YDLIDAR] Successed to start scan mode, Elapsed time 1066 ms
[ydlidar_ros2_driver_node-1] timeout count: 1
[ydlidar_ros2_driver_node-1] [YDLIDAR] Fixed Size: 2020
[ydlidar_ros2_driver_node-1] [YDLIDAR] Sample Rate: 20.00K
[ydlidar_ros2_driver_node-1] [YDLIDAR] Successed to check the lidar, Elapsed time 661 ms
[ydlidar_ros2_driver_node-1] [YDLIDAR] Current Sampling Rate : 20.00K
[ydlidar_ros2_driver_node-1] [YDLIDAR] Now lidar is scanning...

Additional information

  • tried with another TG30, same issue occurs

Building ydlidar_ros2_driver: 1 package had stderr output fixed by ros2 doctor

I successfully installed YDLIDAR-SDK and ydlidar_test reports "successfully connected" and "running correctly"

Firmware version 1.10
Hardware version: 1
Model: X4

OS: Ubuntu 20.04.2 64-bit Server
CPU:  Raspberry Pi 3B+
ROS2 version ros

I cloned ydlidar_ros2_driver and build initially failed with "Summary: 1 package finished [1min 13s]":

pi@ROSbot:~/rosbot-on-gopigo3/handsonros2$ colcon build --symlink-install --packages-select ydlidar_ros2_driver
Starting >>> ydlidar_ros2_driver
[Processing: ydlidar_ros2_driver]                             
[Processing: ydlidar_ros2_driver]                                     
--- stderr: ydlidar_ros2_driver                                        
/home/pi/rosbot-on-gopigo3/handsonros2/src/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp: In lambda function:
/home/pi/rosbot-on-gopigo3/handsonros2/src/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:163:54: warning: unused parameter ‘request_header’ [-Wunused-parameter]
  163 |     [&laser](const std::shared_ptr<rmw_request_id_t> request_header,
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/pi/rosbot-on-gopigo3/handsonros2/src/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:164:56: warning: unused parameter ‘req’ [-Wunused-parameter]
  164 |   const std::shared_ptr<std_srvs::srv::Empty::Request> req,
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/pi/rosbot-on-gopigo3/handsonros2/src/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:165:51: warning: unused parameter ‘response’ [-Wunused-parameter]
  165 |   std::shared_ptr<std_srvs::srv::Empty::Response> response) -> bool
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/home/pi/rosbot-on-gopigo3/handsonros2/src/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp: In lambda function:
/home/pi/rosbot-on-gopigo3/handsonros2/src/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:173:54: warning: unused parameter ‘request_header’ [-Wunused-parameter]
  173 |     [&laser](const std::shared_ptr<rmw_request_id_t> request_header,
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/home/pi/rosbot-on-gopigo3/handsonros2/src/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:174:56: warning: unused parameter ‘req’ [-Wunused-parameter]
  174 |   const std::shared_ptr<std_srvs::srv::Empty::Request> req,
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/pi/rosbot-on-gopigo3/handsonros2/src/ydlidar_ros2_ws/src/ydlidar_ros2_driver/src/ydlidar_ros2_driver_node.cpp:175:51: warning: unused parameter ‘response’ [-Wunused-parameter]
  175 |   std::shared_ptr<std_srvs::srv::Empty::Response> response) -> bool
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
---
Finished <<< ydlidar_ros2_driver [1min 12s]
                           
Summary: 1 package finished [1min 13s]
  1 package had stderr output: ydlidar_ros2_driver

I ran "ros2 doctor" which updated ament_index_python and ament_index_cpp to 1.0.2, and sqlite3_vendor, among other ROS packages.

When I repeated my build command - it succeeded.

pi@ROSbot:~/rosbot-on-gopigo3/handsonros2$ colcon build --symlink-install --packages-select ydlidar_ros2_driver
Starting >>> ydlidar_ros2_driver
Finished <<< ydlidar_ros2_driver [1.68s]                     

Summary: 1 package finished [2.91s]

ranges length is not constant

Hi, thank you for the work on ros2_driver support, I am using TG30 but I noticed that the length of ranges array from /scan topic from ydlidar_ros2_driver_node is not constant.
When I was using your ydlidar_ros package on ROS1 with TG.launch, it gave a ranges length as 2019 constantly.
Here is my ydlidar.yaml config file to run with ydlidar_ros2_driver_node

ydlidar_ros2_driver_node:
  ros__parameters:
    port: /dev/ydlidar
    frame_id: base_laser
    ignore_array: ""
    baudrate: 512000
    lidar_type: 0
    device_type: 0
    sample_rate: 20
    abnormal_check_count: 4
    resolution_fixed: true
    reversion: true
    inverted: true
    auto_reconnect: true
    isSingleChannel: false
    intensity: false
    support_motor_dtr: false
    angle_max: 180.0
    angle_min: -180.0
    range_max: 16.0
    range_min: 0.01
    frequency: 10.0 #8.0
    invalid_range_is_inf: false

I made a python script to subscribe on that, and the ranges length is like 1963, 1965, 1971, 1967, 1965, 1961,...
Here is the test script I am using,

import rclpy
from rclpy.node import Node
from sensor_msgs.msg import LaserScan

class Test(Node):
	def __init__(self):
		super().__init__("test_node")
		self.get_logger().info('Check lidar')
		# https://answers.ros.org/question/334649/ros2-turtlebot3-gazebo-scan-topic-subscriber-is-not-calling-the-callback-function/
		qos_policy = rclpy.qos.QoSProfile(reliability=rclpy.qos.ReliabilityPolicy.BEST_EFFORT, history=rclpy.qos.HistoryPolicy.KEEP_LAST, depth=1)
		self.sub = self.create_subscription(LaserScan, 'scan', self.callback, qos_profile=qos_policy)
		### Loop spin ###
		timer_period = 0.05
		self.timer = self.create_timer(timer_period, self.timer_callback)
	
       def callback(self, msg):
		print(len(msg.ranges))

	def timer_callback(self):
		pass

def main(args=None):
	rclpy.init(args=args)
	node = Test()
	rclpy.spin(node)
	node.destroy_node()
	rclpy.shutdown()

if __name__ == "__main__":
	main()

Do you have any idea why the length of ranges is not constant as your ROS1 package?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.