Giter Club home page Giter Club logo

sllidar_ros2's People

Contributors

deyouslamtec avatar gtoff avatar wubinxia 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  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

sllidar_ros2's Issues

Time out

At first, I tested whether the radar could be used according to the steps given by the official, and it could be used correctly on the development board. However, when I completed the deployment of my project on the development board, the following error was displayed when I went to the step of starting the radar. Even after rebuilding the work area, the following error was displayed.He's been bothering me for a long time, and I hope someone can provide some help.
0b2ae29ab471dfb6c51ed0a08b85a74
a975452e87cd977f4809957b7db7f8f

In ubuntu 22.04 ros2 humble rplidar s2 firmware build error

In member function ‘virtual u_result rp::net::SocketAddress::getAddressAsString(char*, size_t) const’:
/home/dj/lidar_ws/src/sllidar_ros2/sdk/src/arch/linux/net_socket.cpp:170:15: error: ordered comparison of pointer with integer zero (‘const char*’ and ‘int’)
170 | return ans<=0?RESULT_OPERATION_FAIL:RESULT_OK;

"node_executable" and "node_name" deprecated

In ros2 foxy, the following parameter names used by this library are deprecated: node_executable and node_name.

These should probably be renamed.
As far as I understand, this works on ros2 foxy (with a warning), but will not run on later versions at all.

Here is the log:
$ ros2 launch sllidar_ros2 view_sllidar_launch.py [INFO] [launch]: All log files can be found below /home/vinicentus/.ros/log/2022-02-18-12-50-02-247657-LAPTOP-UHU2OA49-122 [INFO] [launch]: Default logging verbosity is set to INFO /home/vinicentus/workspace/install/sllidar_ros2/share/sllidar_ros2/launch/view_sllidar_launch.py:54: UserWarning: The parameter 'node_executable' is deprecated, use 'executable' instead Node( /home/vinicentus/workspace/install/sllidar_ros2/share/sllidar_ros2/launch/view_sllidar_launch.py:54: UserWarning: The parameter 'node_name' is deprecated, use 'name' instead Node( /home/vinicentus/workspace/install/sllidar_ros2/share/sllidar_ros2/launch/view_sllidar_launch.py:65: UserWarning: The parameter 'node_executable' is deprecated, use 'executable' instead Node( /home/vinicentus/workspace/install/sllidar_ros2/share/sllidar_ros2/launch/view_sllidar_launch.py:65: UserWarning: The parameter 'node_name' is deprecated, use 'name' instead Node(

ros2 run sllidar_ros2 sllidar_node

ros2 humble error:
jeff@jeff-smp:/smp_ws$ source install/setup.bash
jeff@jeff-smp:
/smp_ws$ ros2 run sllidar_ros2 sllidar_node
[INFO] [1662300722.249945517] [sllidar_node]: SLLidar running on ROS2 package SLLidar.ROS2 SDK Version:1.0.1, SLLIDAR SDK Version:2.0.0
[ERROR] [1662300722.292923769] [sllidar_node]: Error, operation time out. SL_RESULT_OPERATION_TIMEOUT!
[ros2run]: Process exited with failure 255
jeff@jeff-smp:~/smp_ws$ ls /dev | grep ttyUSB**
ttyUSB0

run but error

rviz starts by running ros2 run, but the point cloud is not displayed. If you look closely, you'll see an error. Does anyone know the solution?
image

Will you bring ROS2 Lifecycle node support?

Hello i'm using this package and i want to error or warning handler for lidar node. When i get the error , i will restart the node. But i can not this function for using regular node in the package. If used lifecycle node in this package this be so functionality and what i'm talking about can be doable. Do you think bring ROS2 Lifecycle Node support for this package?

Difference between repo "sllidar_ros2" and "rplidar_ros"

Hello Slamtec,

I'm using your product "RPLIDAR A1M8" and found two repo here, "sllidar_ros2" and "rplidar_ros".
Could you please explain the difference between them?
I'm using ROS 2 Foxy, which repo should I use in this case?

Look forward to your answer!

Best regards,
Alex

Limiting RPLidar S2 Scan Angle

Thank you for the brief guide to integrate the hardware with ROS2.
I am just wondering how can I limit the scan angle_min and angle_max, I tried to add the parameters section but I think it still behave the same.

My launch code snippet:
Node(
package='sllidar_ros2',
executable='sllidar_node',
name='sllidar_node',
parameters=[{'serial_port': serial_port,
'serial_baudrate': serial_baudrate,
'frame_id': frame_id,
'inverted': inverted,
'angle_compensate': angle_compensate,
'angle_min': angle_min,
'angle_max': angle_max,
'scan_mode': scan_mode}],
output='screen'),

I am running Ubuntu 20.04 and ROS 2 Foxy Fitzroy on RPLidar S2

Mode: Sensitivity

[sllidar_node-1] [INFO] [1720604775.775402223] [sllidar_node]: SLLidar health status : 0
[sllidar_node-1] [INFO] [1720604775.775416763] [sllidar_node]: SLLidar health status : OK.
[sllidar_node-1] [ERROR] [1720604775.839302045] [sllidar_node]: scan mode `Sensitivity' is not supported by lidar, supported modes:
[sllidar_node-1] [ERROR] [1720604775.839333971] [sllidar_node]: Standard: max_distance: 12.0 m, Point number: 2.0K
[sllidar_node-1] [ERROR] [1720604775.839348230] [sllidar_node]: Express: max_distance: 12.0 m, Point number: 4.0K
[sllidar_node-1] [ERROR] [1720604775.839353318] [sllidar_node]: Boost: max_distance: 12.0 m, Point number: 8.0K
[sllidar_node-1] [ERROR] [1720604775.839358345] [sllidar_node]: Can not start scan: 80008001!
--- getting this error althoug I already changed the scan mode in the launch file and also added it as a parameter. Cleaned the build multiple times aswell! Issue doesnt go away. Previously on the same system I was able to get a scan result! now not.

SL_RESULT_OPERATION_TIMEOUT! s2e lidar

Hey, I am using this package with s2e lidar but I got this error while starting the launch:


$ ros2 launch sllidar_ros2 sllidar_s2e_launch.py
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2023-05-30-16-45-39-485600-robot2-6754
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [sllidar_node-1]: process started with pid [6756]
[sllidar_node-1] [INFO] [1685454339.815974183] [sllidar_node]: SLLidar running on ROS2 package SLLidar.ROS2 SDK Version:1.0.1, SLLIDAR SDK Version:2.0.0
[sllidar_node-1] [ERROR] [1685454343.863196303] [sllidar_node]: Error, operation time out. SL_RESULT_OPERATION_TIMEOUT! 
[ERROR] [sllidar_node-1]: process has died [pid 6756, exit code 255, cmd '/home/ubuntu/Robot_Project/husorion_ws/install/sllidar_ros2/lib/sllidar_ros2/sllidar_node --ros-args -r __node:=sllidar_node --params-file /tmp/launch_params_5dcjgxza'].

Caught exception when trying to load file of format [py]: __init__() missing 1 required keyword-only argument: 'executable'

Hello

I have tried to follow the instructions on the repo to install this package on ros2 galactic and am encountering the above error when am trying to launch the node.

[INFO] [launch]: All log files can be found below /home/user/.ros/log/2022-02-25-20-53-38-777999-user-desktop-793818
[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 /home/user/ros2_galactic/build/launch/launch/launch_service.py:226> exception=InvalidLaunchFileError('py')>
Traceback (most recent call last):
  File "/home/user/ros2_galactic/build/launch/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 "/home/user/ros2_galactic/build/launch/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/user/ros2_galactic/install/sllidar_ros2/share/sllidar_ros2/launch/sllidar_launch.py", line 48, in generate_launch_description
    Node(
TypeError: __init__() missing 1 required keyword-only argument: 'executable'

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

Traceback (most recent call last):
  File "/home/user/ros2_galactic/build/launch/launch/launch_service.py", line 228, in _process_one_event
    await self.__process_event(next_event)
  File "/home/user/ros2_galactic/build/launch/launch/launch_service.py", line 248, in __process_event
    visit_all_entities_and_collect_futures(entity, self.__context))
  File "/home/user/ros2_galactic/build/launch/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 "/home/user/ros2_galactic/build/launch/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 "/home/user/ros2_galactic/build/launch/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 "/home/user/ros2_galactic/build/launch/launch/action.py", line 108, in visit
    return self.execute(context)
  File "/home/user/ros2_galactic/build/launch/launch/actions/include_launch_description.py", line 130, in execute
    launch_description = self.__launch_description_source.get_launch_description(context)
  File "/home/user/ros2_galactic/build/launch/launch/launch_description_source.py", line 84, in get_launch_description
    self._get_launch_description(self.__expanded_location)
  File "/home/user/ros2_galactic/build/launch/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 "/home/user/ros2_galactic/build/launch/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 1 required keyword-only argument: 'executable'

Can someone please look into what the problem is ? I am unable to figure out the issue.

Stop motor service doesn't work

I am running the sllidar_ros node for RPlidar A1 on my robot that runs on Ubuntu 20.04 with ROS 2 Galactic. The node runs fine but after termination, the lidar motor keeps spinning. The stop_motor service has no effect. Upon investigating, I found that this was not a problem until release 1.7.0 in ROS 1, however, the issue has crept into the ROS 2 package as well thereafter. Could you point to a fix for this?

nothing is showing after launching the lidar.

I am using the rplidar a1 on ubuntu 22.04 with ros humble. I have also already done this sudo chmod 777 /dev/ttyUSB0

I am not getting anything to show up on rviz after inputting the command ros2 launch sllidar_ros2 view_sllidar_a1_launch.py

D6F945C3-3CF7-4833-A79B-FB5F7D13B33B
A504CA36-DB0D-40C7-BA01-D56689DB3E52
242FF65A-8A8A-4AE0-AAD4-C89115CBD52B

sllidar-frame.png ?

Hi,

I get this error,

it says we should wire the lidar from the image , but I cannot find it

thx for helping me on this

image

How to solve this problem

[ERROR] [launch]: Caught exception in launch (see debug for traceback): init() missing 1 required keyword-only argument: 'node_executable'

Sometimes scan topics stop.(fatal bag)

Sometimes the scan topic stops updating.
It is not throwing any errors.
This is a fatal bag.
I added RCLCPP_INFO to the end of the publish_scan() function.
Then, there are times when publish_scan is not executed at random times.

image

image

ros2 humble 编译问题

sllidar_node.cpp 声明参数时, 应该带上默认值

  this->declare_parameter("channel_type", "serial");

Colcon Failed

I am having issues with Colcon build. I am using ROS2 Humble

Questions regarding device

Does this device gives both range and speed for the objects?

Does it support Macbook? can we use it without ROS setup in Mac?

ROS2 Foxy - Error on launch - SL_RESULT _OPERATION_TIMEOUT

Using the lauch scripts on this GitHub with a clean install of Foxy2 on an X86 machine with a rplidar A1 I constantly receive a SL_RESULT_OPERATION_TIMEOUT error.

The USB serial port is correct and baud is correct because when monitoring it, I receive clear text from the lidar:
"Firmware Ver 1.25 - rc2, HW Ver 5
Model: 18"

Is there something else I need to configure to avoid this error?

思岚C1在node启动时数据会有明显收缩过程

思岚C1在node启动时数据会有明显收缩过程。持续1-2秒。导致我必须给需要使用雷达数据的节点一定的延迟启动时间。
刚启动时(这一张图截图已经启动半秒左右,收缩过很大程度了)↓
image
稳定时↓
image

目前不清楚这个是雷达本身的问题,还是ROS节点的问题,烦请你们验证一下。

Error, RPLidar internal error detected. Please reboot the device to retry.

Starting node

        Node(
            package='sllidar_ros2',
            executable='sllidar_node',
            parameters=[{\
                'serial_port': '/dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3.3:1.0-port0',
                'frame_id': 'laser_frame',
                'angle_compensate': True,
                'serial_baudrate': 1000000,
                'inverted': False,
                'scan_mode': 'DenseBoost'
            }]

then in couple of minutes stop working and publishing messages to topic.
Restarting the node leads to the error:

[INFO] [launch]: All log files can be found below /home/ros2/.ros/log/2023-10-12-21-01-34-307908-robot-2569
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [rplidar_composition-1]: process started with pid [2570]
[rplidar_composition-1] [INFO] [1697137294.757868241] [rplidar_node]: RPLidar running on ROS2 package rplidar_ros. RPLIDAR SDK Version:2.0.0
[rplidar_composition-1] [INFO] [1697137294.810741604] [rplidar_node]: RPLidar S/N: A65DE386C8E69FC2B8EB9CF426824B71
[rplidar_composition-1] [INFO] [1697137294.810995936] [rplidar_node]: Firmware Ver: 1.02
[rplidar_composition-1] [INFO] [1697137294.811087157] [rplidar_node]: Hardware Rev: 18
[rplidar_composition-1] [INFO] [1697137294.862679604] [rplidar_node]: RPLidar health status : 2
[rplidar_composition-1] [ERROR] [1697137294.862897343] [rplidar_node]: Error, RPLidar internal error detected. Please reboot the device to retry.
[ERROR] [rplidar_composition-1]: process has died [pid 2570, exit code 255, cmd '/opt/ros/humble/lib/rplidar_ros/rplidar_composition --ros-args --params-file /tmp/launch_params_q43lshsq'].

launch error: bad_array_new_length

when I run the code for rplidarA2 as: ros2 launch sllidar_ros2 sllidar_launch.py I got the error: [sllidar_node-1] terminate called after throwing an instance of 'std::bad_array_new_length'
[sllidar_node-1] what(): std::bad_array_new_length

lidar_error

May I know how to solve this issue?

Docker Support

Hi has anyone been able to put this running in Docker?
And having the host running and consuming the data via foxglove?

I'm using A1M8

Thank you

根据型号设置测量盲区

目前scan_msg的range_max从scan_mode获得,而range_min设为固定的0.15。这导致一些测量盲区更小的型号损失了近距离感知能力。如无法从SDK中获取测量盲区,建议在launch文件中增加配置。

Error, RPLidar internal error detected. Please reboot the device to retry.

Hello. I bought 2 Slamtec S2 lidars and I mounted them on 2 iRobot Create3 systems. S2 Lidar is connected to Raspberry Pi4 to 2 USB ports for data and power.

I have the same issue as in #32.

I start ros2 launch create3_lidar_slam sensors_launch.py:

[INFO] [launch]: All log files can be found below /home/ccordero/.ros/log/2024-06-16-10-58-35-788301-sr2-pi-4078 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [static_transform_publisher-1]: process started with pid [4079] [static_transform_publisher-1] [WARN] [1718528316.082610138] []: Old-style arguments are deprecated; see --help for new-style arguments [static_transform_publisher-1] [INFO] [1718528316.131057221] [static_transform_publisher_2IUKlNQnpDZhYiXa]: Spinning until stopped - publishing transform [static_transform_publisher-1] translation: ('-0.012000', '0.000000', '0.144000') [static_transform_publisher-1] rotation: ('0.000000', '0.000000', '0.000000', '1.000000') [static_transform_publisher-1] from 'base_footprint' to 'laser_frame' [INFO] [rplidar_composition-2]: process started with pid [4090] [rplidar_composition-2] [INFO] [1718528318.143819291] [rplidar_node]: RPLidar running on ROS2 package rplidar_ros. RPLIDAR SDK Version:2.0.0 [rplidar_composition-2] [INFO] [1718528318.197315042] [rplidar_node]: RPLidar S/N: AAD7ECF8C4E699D7B8EB99F926084717 [rplidar_composition-2] [INFO] [1718528318.197548317] [rplidar_node]: Firmware Ver: 1.01 [rplidar_composition-2] [INFO] [1718528318.197629076] [rplidar_node]: Hardware Rev: 18 [rplidar_composition-2] [INFO] [1718528318.249050535] [rplidar_node]: RPLidar health status : 0 [rplidar_composition-2] [INFO] [1718528318.249217181] [rplidar_node]: RPLidar health status : OK. [rplidar_composition-2] [INFO] [1718528320.262113083] [rplidar_node]: Start [rplidar_composition-2] [INFO] [1718528320.954570804] [rplidar_node]: current scan mode: DenseBoost, sample rate: 32 Khz, max_distance: 30.0 m, scan frequency:10.0 Hz,
After running the bot for a couple of minutes, it stops sending to /scan.
I then kill the process and restart with the same command: ros2 launch create3_lidar_slam sensors_launch.py

[INFO] [launch]: All log files can be found below /home/ccordero/.ros/log/2024-06-16-11-01-27-413092-sr2-pi-4113 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [static_transform_publisher-1]: process started with pid [4114] [static_transform_publisher-1] [WARN] [1718528487.724203140] []: Old-style arguments are deprecated; see --help for new-style arguments [static_transform_publisher-1] [INFO] [1718528487.772116859] [static_transform_publisher_Dtu94dUVOSSsyX2S]: Spinning until stopped - publishing transform [static_transform_publisher-1] translation: ('-0.012000', '0.000000', '0.144000') [static_transform_publisher-1] rotation: ('0.000000', '0.000000', '0.000000', '1.000000') [static_transform_publisher-1] from 'base_footprint' to 'laser_frame' [INFO] [rplidar_composition-2]: process started with pid [4125] [rplidar_composition-2] [INFO] [1718528489.776632797] [rplidar_node]: RPLidar running on ROS2 package rplidar_ros. RPLIDAR SDK Version:2.0.0 [rplidar_composition-2] [INFO] [1718528489.827139821] [rplidar_node]: RPLidar S/N: AAD7ECF8C4E699D7B8EB99F926084717 [rplidar_composition-2] [INFO] [1718528489.827303504] [rplidar_node]: Firmware Ver: 1.01 [rplidar_composition-2] [INFO] [1718528489.827381133] [rplidar_node]: Hardware Rev: 18 [rplidar_composition-2] [INFO] [1718528489.878809036] [rplidar_node]: RPLidar health status : 2 [rplidar_composition-2] [ERROR] [1718528489.879004478] [rplidar_node]: Error, RPLidar internal error detected. Please reboot the device to retry. [ERROR] [rplidar_composition-2]: process has died [pid 4125, exit code 255, cmd '/opt/ros/humble/lib/rplidar_ros/rplidar_composition --ros-args -r __ns:=/ --params-file /home/ccordero/create3_examples_ws/install/create3_lidar_slam/share/create3_lidar_slam/config/rplidar_node.yaml'].

The only way to recover from there is unplug both usb cables and plug them again.
I have tested both S2 lidars. Same issue.

Would you please let me know how I can fix this behaviour?
Thank you in advance.
Regards. Carlos

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.