SICKAG / sick_scan_xd

Based on the sick_scan drivers for ROS1, sick_scan_xd merges sick_scan, sick_scan2 and sick_scan_base repositories. The driver supports both Linux (native, ROS1, ROS2) and Windows (native and ROS2).
Apache License 2.0
105 stars 86 forks source link

Stop the Scanner Rotation #24

Closed issambm closed 2 years ago

issambm commented 2 years ago

I was wondering how to stop the scanner in command-line after executing, for example, the following ROS launch command? roslaunch sick_scan sick_nav_3xx.launch hostname:=<ip-address> Thanks.

michael1309 commented 2 years ago

There are at least two methods to stop the lidar device driver:

issambm commented 2 years ago

Thank you for your reply.

I am actually talking about stopping the physical rotation of the scanner after your do Ctrl+C. Would you please let me know how to do that?

issambm commented 2 years ago

I was wondering if there is even a way to stop the rotation of the scanner via command-line, other than doing this through SOPAS ET software every time which is inconvenient.

Thanks in advance for any help you could provide on this.

rostest commented 2 years ago

Thanks for reporting this issue. A driver update is available on the branch https://github.com/SICKAG/sick_scan_xd/tree/feature/lidar_stop_exit. This driver update supports a new ros service to stop the scanner at exit. Please checkout the branch and rebuild.

To stop the scanner rotation and to exit the driver, you can call the new ros service SickScanExit by running

rosservice call /sick_nav_3xx/SickScanExit "{}" # stop scanner and exit on ROS-1
ros2 service call /SickScanExit sick_scan/srv/SickScanExitSrv "{}" # stop scanner and exit on ROS-2

Alternatively you can use Ctrl-C, which now stops the scanner and exits the driver, too.

Please leave a short message, so that we can merge the branch to the main trunk.

issambm commented 2 years ago

Great, thank you!