Skip to content

Commit

Permalink
upgrade sdk 1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
WubinXia committed Mar 5, 2019
1 parent 36684a0 commit 47742dc
Show file tree
Hide file tree
Showing 28 changed files with 173 additions and 43 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Changelog for package rplidar_ros
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.10.0 (2019-02-22)
------------------
* Update RPLIDAR SDK to 1.10.0
* [new feature] support Rplidar S1
* Contributors: tony,WubinXia

1.9.0 (2018-08-24)
------------------
* Update RPLIDAR SDK to 1.9.0
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,26 @@ There're two ways to run rplidar ros package
I. Run rplidar node and view in the rviz
------------------------------------------------------------
roslaunch rplidar_ros view_rplidar.launch (for RPLIDAR A1/A2)
or
,
roslaunch rplidar_ros view_rplidar_a3.launch (for RPLIDAR A3)
or
roslaunch rplidar_ros view_rplidar_s1.launch (for RPLIDAR S1)

You should see rplidar's scan result in the rviz.

II. Run rplidar node and view using test application
------------------------------------------------------------
roslaunch rplidar_ros rplidar.launch (for RPLIDAR A1/A2)
or
,
roslaunch rplidar_ros rplidar_a3.launch (for RPLIDAR A3)
or
roslaunch rplidar_ros rplidar_s1.launch (for RPLIDAR S1)

rosrun rplidar_ros rplidarNodeClient

You should see rplidar's scan result in the console

Notice: the different is serial_baudrate between A1/A2 and A3
Notice: the different is serial_baudrate between A1/A2 and A3/S1

RPLidar frame
=====================================================================
Expand Down
10 changes: 10 additions & 0 deletions launch/rplidar_s1.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<launch>
<node name="rplidarNode" pkg="rplidar_ros" type="rplidarNode" output="screen">
<param name="serial_port" type="string" value="/dev/ttyUSB0"/>
<param name="serial_baudrate" type="int" value="256000"/><!--A3 -->
<param name="frame_id" type="string" value="laser"/>
<param name="inverted" type="bool" value="false"/>
<param name="angle_compensate" type="bool" value="true"/>
<param name="scan_mode" type="string" value="Express"/>
</node>
</launch>
10 changes: 10 additions & 0 deletions launch/view_rplidar_s1.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!--
Used for visualising rplidar in action.
It requires rplidar.launch.
-->
<launch>
<include file="$(find rplidar_ros)/launch/rplidar_s1.launch" />

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find rplidar_ros)/rviz/rplidar.rviz" />
</launch>
4 changes: 2 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<package>
<name>rplidar_ros</name>
<version>1.9.0</version>
<description>The rplidar ros package, support rplidar A2/A1 and A3</description>
<version>1.10.0</version>
<description>The rplidar ros package, support rplidar A2/A1 and A3/S1</description>

<maintainer email="[email protected]">Slamtec ROS Maintainer</maintainer>
<license>BSD</license>
Expand Down
4 changes: 2 additions & 2 deletions sdk/README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright (c) 2009 - 2014 RoboPeak Team
Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -29,6 +29,6 @@ This folder contains RPLIDAR SDK source code which is provided by RoboPeak.

RoboPeak Website: http://www.robopeak.com
SlamTec HomePage: http://www.slamtec.com
RPLIDAR_SDK_VERSION: 1.9.0
RPLIDAR_SDK_VERSION: 1.10.0
Note: The SDK version may not up-to-date.
rplidar product: http://www.slamtec.com/en/Lidar
4 changes: 2 additions & 2 deletions sdk/include/rplidar.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down Expand Up @@ -41,4 +41,4 @@

#include "rplidar_driver.h"

#define RPLIDAR_SDK_VERSION "1.9.0"
#define RPLIDAR_SDK_VERSION "1.10.0"
16 changes: 14 additions & 2 deletions sdk/include/rplidar_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down Expand Up @@ -127,7 +127,7 @@ typedef struct _rplidar_payload_acc_board_flag_t {
//added in FW ver 1.24
#define RPLIDAR_ANS_TYPE_GET_LIDAR_CONF 0x20
#define RPLIDAR_ANS_TYPE_SET_LIDAR_CONF 0x21

#define RPLIDAR_ANS_TYPE_MEASUREMENT_DENSE_CAPSULED 0x85
#define RPLIDAR_ANS_TYPE_ACC_BOARD_FLAG 0xFF

#define RPLIDAR_RESP_ACC_BOARD_FLAG_MOTOR_CTRL_SUPPORT_MASK (0x1)
Expand Down Expand Up @@ -183,6 +183,18 @@ typedef struct _rplidar_response_capsule_measurement_nodes_t {
_u16 start_angle_sync_q6;
rplidar_response_cabin_nodes_t cabins[16];
} __attribute__((packed)) rplidar_response_capsule_measurement_nodes_t;

typedef struct _rplidar_response_dense_cabin_nodes_t {
_u16 distance;
} __attribute__((packed)) rplidar_response_dense_cabin_nodes_t;

typedef struct _rplidar_response_dense_capsule_measurement_nodes_t {
_u8 s_checksum_1; // see [s_checksum_1]
_u8 s_checksum_2; // see [s_checksum_1]
_u16 start_angle_sync_q6;
rplidar_response_dense_cabin_nodes_t cabins[40];
} __attribute__((packed)) rplidar_response_dense_capsule_measurement_nodes_t;

// ext1 : x2 boost mode

#define RPLIDAR_RESP_MEASUREMENT_EXP_ULTRA_MAJOR_BITS 12
Expand Down
3 changes: 2 additions & 1 deletion sdk/include/rplidar_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down Expand Up @@ -132,6 +132,7 @@ class RPlidarDriver {
/// \param timeout The operation timeout value (in millisecond) for the serial port communication
virtual u_result reset(_u32 timeout = DEFAULT_TIMEOUT) = 0;

virtual u_result clearNetSerialRxCache() = 0;
// FW1.24
/// Get all scan modes that supported by lidar
virtual u_result getAllSupportedScanModes(std::vector<RplidarScanMode>& outModes, _u32 timeoutInMs = DEFAULT_TIMEOUT) = 0;
Expand Down
2 changes: 1 addition & 1 deletion sdk/include/rplidar_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/include/rptypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/arch/win32/arch_win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/arch/win32/net_serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/arch/win32/net_serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/arch/win32/timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/arch/win32/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/arch/win32/winthread.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/hal/abs_rxtx.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/hal/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/hal/locker.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/hal/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/hal/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/hal/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (c) 2009 - 2014 RoboPeak Team
* http://www.robopeak.com
* Copyright (c) 2014 - 2018 Shanghai Slamtec Co., Ltd.
* Copyright (c) 2014 - 2019 Shanghai Slamtec Co., Ltd.
* http://www.slamtec.com
*
*/
Expand Down
Loading

0 comments on commit 47742dc

Please sign in to comment.