This is a package for using Senkylaser Skpro30 with ROS. The package is also suitable for Skpro60 and Skpro100.
- ROS melodic/kinetic
- libmodbus
- FTDI TN_101 Linux (RS485 to USB)
-
Install the RS485 to USB linux driver, most of the chips use FTDI, so you can refer to FTDI TN_101
-
Install the ROS. Ubuntu install of ROS Melodic
-
installl libmodbus
Follow the instruction
-
Create a catkin workspace Unbuntu
mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src
-
Clone this respository into 'catkin_ws/src'
git clone https://github.com/nkuhzx/senkylaser-skpro-ros.git cd ~/catkin_ws catkin_make
-
Connect your senkylaser and roslaunch (RS485->USB->Laptop)
source devel/setup.bash roslaunch skpro30_laser lasernode.launch
-
Then the topic is published on '/laser_node/sklaser' as sensor_msg::LaserScan
source devel/setup.bash roslaunch skpro30_laser lasernode.launch
-
Q: How to connect Senkylaser to my computer?
A: You need an adapter to convert RS485 to USB serial port.
-
Q: Cannot open /dev/ttyusb0 no such file or directory
A: First check the properties of ttyusb0
ll /dev/ttyUSB0
Then
sudo chmod 666 /dev/ttyUSB0
It is valid only once, and the command needs to be executed again after unplugging the cable.
or
sudo usermod -aG dialout USERNAME
USERNAME is your ubuntu username, this method is permanently valid.
-
How to check whether the device can communicate with serial port
Use cutecom to open '/dev/ttyUSB0', and then power on the device. If you can see the baud rate, it means the connection is successful.
-
What are the contents of the published message?
The measured distance is in the 'ranges' of the LaserScan message.
We use 'intensities' to indicate error status.
- Zhengxi Hu
Please raise an issue or send email to hzx@mail.nankai.edu.cn if there are any issues running the code.