Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slam #65

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Slam #65

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
35adc49
added hectormapping based odometry free slam demo
cheaven Jun 7, 2014
b113752
Add CHANGELOG
linling Jun 2, 2014
9610f46
1.0.1
linling Jun 2, 2014
0c7de1d
Fixed cpp check warnings: memory leak and uninitialized vars
awesomebytes Jun 6, 2014
e4c23a3
Fix typos
awesomebytes Jun 6, 2014
5442c7e
Replace 0.0 (max range) readings with Inf
awesomebytes Jun 6, 2014
9ce095b
Fix stack corruption in Windows 64bit
jlblancoc Sep 3, 2014
12ca4f3
add install targets
k-okada Jan 8, 2015
c0ed451
quality used as intensity in sensor_msgs/LaserScan
afrancescon Mar 28, 2015
4dad203
fixed angle min and max on published laser scan message
afrancescon Apr 1, 2015
28091c9
added documentation about rplidar frame
afrancescon Apr 1, 2015
937816f
fixed rplidar-frame.png
afrancescon Apr 1, 2015
3b6d32d
add motor start/stop service
Apr 9, 2015
1bd5956
remove commented lines
Apr 9, 2015
3fcf41e
include catkin directories
stonier Jul 3, 2015
e93d852
reverse the scan publisher if max < min.
stonier Jan 17, 2016
9f63ee5
remove processing cost for reversing the published scan
stonier Jan 17, 2016
7ecd54f
update to RPLIDAR SDK 1.5.2
Apr 29, 2016
be77271
update CHANGELOG
Apr 29, 2016
25b3a06
updated to SDK 1.5.4
Jun 2, 2016
67c9f2b
Update README.md
kintzhao Jul 19, 2016
4b0de7c
add new picture for install and fixed the default param of inverted a…
Aug 8, 2016
a6d33ba
change rplidar_A1.png
Aug 8, 2016
c6b8c48
add RPLIDAR information print,and fix the standard motor speed of RPL…
Aug 24, 2016
f9a1034
Extend the measurement of max_distance from 6m to 8m
kintzhao Dec 15, 2016
99e65f3
update sdk to 1.5.7, fixed the motor default speed at 10 HZ.
kintzhao Dec 15, 2016
bda87c6
add the demo-slam using rplidar, gmapping,hector,karto.
kintzhao Dec 15, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package rplidar_ros
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Forthcoming
-----------
1.5.7 (2016-12-15)
------------------
* Release 1.5.7.
* Update RPLIDAR SDK to 1.5.7
* Fixed the motor default speed at 10 HZ. Extend the measurement of max_distance from 6m to 8m.
* Contributors: kint

1.5.5 (2016-08-23)
------------------
* Release 1.5.5.
* Update RPLIDAR SDK to 1.5.5
* Add RPLIDAR information print, and fix the standard motor speed of RPLIDAR A2.
* Contributors: kint

1.5.4 (2016-06-02)
------------------
* Release 1.5.4.
* Update RPLIDAR SDK to 1.5.4
* Support RPLIDAR A2
* Contributors: kint

1.5.2 (2016-04-29)
------------------
* Release 1.5.2.
* Update RPLIDAR SDK to 1.5.2
* Support RPLIDAR A2
* Contributors: kint

1.0.1 (2014-06-03)
------------------
* Release 1.0.1.
* Add angle compensate mechanism to compatible with ROS scan message
* Add RPLIDAR sdk to the repo.
* First release of RPLIDAR ROS package (1.0.0)
* Initial commit
* Contributors: Ling, RoboPeak Public Repos
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ find_package(catkin REQUIRED COMPONENTS
include_directories(
${RPLIDAR_SDK_PATH}/include
${RPLIDAR_SDK_PATH}/src
${catkin_INCLUDE_DIRS}
)

catkin_package()
Expand All @@ -27,3 +28,14 @@ target_link_libraries(rplidarNode ${catkin_LIBRARIES})

add_executable(rplidarNodeClient src/client.cpp)
target_link_libraries(rplidarNodeClient ${catkin_LIBRARIES})

install(TARGETS rplidarNode rplidarNodeClient
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(DIRECTORY launch rviz sdk
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS
)
5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2014, RoboPeak Public Repos
Copyright (c) 2009 - 2014 RoboPeak Team
Copyright (c) 2014 - 2016 Shanghai Slamtec Co., Ltd.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -20,4 +21,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ RPLIDAR ROS package

ROS node and test application for RPLIDAR

Visit RoboPeak Website for more details about RPLIDAR.
Visit following Website for more details about RPLIDAR:

rplidar roswiki: http://wiki.ros.org/rplidar

rplidar HomePage: http://www.slamtec.com/en/Lidar

rplidar Tutorial: https://github.com/robopeak/rplidar_ros/wiki

How to build rplidar ros package
=====================================================================
Expand All @@ -27,3 +33,8 @@ roslaunch rplidar_ros rplidar.launch
rosrun rplidar_ros rplidarNodeClient

You should see rplidar's scan result in the console

RPLidar frame
=====================================================================
RPLidar frame must be broadcasted according to picture shown in
rplidar-frame.png
50 changes: 50 additions & 0 deletions launch/gmapping.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!--
notice : you should install gmapping-slam at first, command 'sudo apt-get install ros-indigo-gmapping'and 'sudo apt-get install ros-indigo-slam-gmapping'.
this launch just for test, you should improve the param for the best result.

you nedd change the frame of the "static_transform_publisher" when using the real robot platform.
it is better subscribe the topic /odom with true to slam in gmapping

E-mail: [email protected]
-->
<launch>

<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 0 0 0 base_link laser 100" /> <!--change -->
<node pkg="tf" type="static_transform_publisher" name="link2_broadcaster" args="0 0 0 0 0 0 odom base_link 100" /> <!--change -->

<node pkg="gmapping" type="slam_gmapping" name="simple_gmapping" output="screen">
<!--remap from="scan" to="base_scan"/-->
<param name="map_update_interval" value="5.0"/>
<param name="maxUrange" value="8.0"/>
<param name="sigma" value="0.05"/>
<param name="kernelSize" value="1"/>
<param name="lstep" value="0.05"/>
<param name="astep" value="0.05"/>
<param name="iterations" value="5"/>
<param name="lsigma" value="0.075"/>
<param name="ogain" value="3.0"/>
<param name="lskip" value="0"/>
<param name="minimumScore" value="50"/>
<param name="srr" value="0.1"/>
<param name="srt" value="0.2"/>
<param name="str" value="0.1"/>
<param name="stt" value="0.2"/>
<param name="linearUpdate" value="0.3"/>
<param name="angularUpdate" value="0.4"/>
<param name="temporalUpdate" value="3.0"/>
<param name="resampleThreshold" value="0.5"/>
<param name="particles" value="30"/>
<param name="xmin" value="-5.0"/>
<param name="ymin" value="-5.0"/>
<param name="xmax" value="5.0"/>
<param name="ymax" value="5.0"/>
<param name="delta" value="0.05"/>
<param name="llsamplerange" value="0.01"/>
<param name="llsamplestep" value="0.01"/>
<param name="lasamplerange" value="0.005"/>
<param name="lasamplestep" value="0.005"/>
</node>



</launch>
39 changes: 39 additions & 0 deletions launch/hectormapping.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!--
notice : you should install hector-slam at first, sudo apt-get install ros-indigo-hector-slam
this launch just for test, you should improve the param for the best result.

E-mail: [email protected]
-->
<launch>

<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="1 0 0 0 0 0 base_link laser 100" /> <!--change -->


<node pkg="hector_mapping" type="hector_mapping" name="hector_height_mapping" output="screen">
<param name="scan_topic" value="scan" />
<param name="base_frame" value="base_link" />
<param name="odom_frame" value="base_link" />

<param name="output_timing" value="false"/>
<param name="advertise_map_service" value="true"/>
<param name="use_tf_scan_transformation" value="true"/>
<param name="use_tf_pose_start_estimate" value="false"/>
<param name="pub_map_odom_transform" value="true"/>
<param name="map_with_known_poses" value="false"/>

<param name="map_pub_period" value="0.5"/>
<param name="update_factor_free" value="0.45"/>

<param name="map_update_distance_thresh" value="0.02"/>
<param name="map_update_angle_thresh" value="0.1"/>

<param name="map_resolution" value="0.05"/>
<param name="map_size" value="1024"/>
<param name="map_start_x" value="0.5"/>
<param name="map_start_y" value="0.5"/>

</node>



</launch>
23 changes: 23 additions & 0 deletions launch/karto.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
notice : you should install karto-slam at first, command 'sudo apt-get install ros-indigo-open-karto'and 'sudo apt-get install ros-indigo-slam-karto'.
this launch just for test, you should improve the param for the best result.

you nedd change the frame of the "static_transform_publisher" when using the real robot platform.
it is better subscribe the topic /odom with true to slam in gmapping

E-mail: [email protected]
-->
<launch>

<node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 0 0 0 base_link laser 100" /> <!--change -->
<node pkg="tf" type="static_transform_publisher" name="link2_broadcaster" args="0 0 0 0 0 0 odom base_link 100" /> <!--change -->

<node pkg="slam_karto" type="slam_karto" name="slam_karto" output="screen">
<remap from="scan" to="scan"/>
<param name="odom_frame" value="odom"/>
<param name="map_update_interval" value="25"/>
<param name="resolution" value="0.025"/>
<rosparam command="load" file="$(find rplidar_ros)/launch/karto_mapper_params.yaml" />
</node>

</launch>
37 changes: 37 additions & 0 deletions launch/karto_mapper_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# General Parameters
use_scan_matching: true
use_scan_barycenter: true
minimum_travel_distance: 0.3
minimum_travel_heading: 0.4 # 0.2 #in radians

scan_buffer_size: 67
scan_buffer_maximum_scan_distance: 20.0
link_match_minimum_response_fine: 0.6
link_scan_maximum_distance: 4 # 6

do_loop_closing: true
loop_match_minimum_chain_size: 5
loop_match_maximum_variance_coarse: 0.4 # gets squared later
loop_match_minimum_response_coarse: 0.4 # 0.6
loop_match_minimum_response_fine: 0.6

# Correlation Parameters - Correlation Parameters
correlation_search_space_dimension: 2
correlation_search_space_resolution: 0.05
correlation_search_space_smear_deviation: 0.05

# Correlation Parameters - Loop Closure Parameters
loop_search_space_dimension: 10 # 2.8
loop_search_space_resolution: 0.1
loop_search_space_smear_deviation: 0.05
loop_search_maximum_distance: 4.0

# Scan Matcher Parameters
distance_variance_penalty: 0.3 # gets squared later
angle_variance_penalty: 0.35 # in degrees (gets converted to radians then squared)
fine_search_angle_offset: 0.00349 # in degrees (gets converted to radians)
coarse_search_angle_offset: 0.349 # in degrees (gets converted to radians)
coarse_angle_resolution: 0.0349 # in degrees (gets converted to radians)
minimum_angle_penalty: 0.9
minimum_distance_penalty: 0.5
use_response_expansion: false
12 changes: 12 additions & 0 deletions launch/test_rplidar.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<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="115200"/>
<param name="frame_id" type="string" value="laser"/>
<param name="inverted" type="bool" value="false"/>
<param name="angle_compensate" type="bool" value="true"/>

</node>
<node name="rplidarNodeClient" pkg="rplidar_ros" type="rplidarNodeClient" output="screen">
</node>
</launch>
10 changes: 10 additions & 0 deletions launch/view_gmapping.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.launch" />
<include file="$(find rplidar_ros)/launch/gmapping.launch" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find rplidar_ros)/rviz/slam.rviz" />
</launch>
10 changes: 10 additions & 0 deletions launch/view_hectorSlam.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.launch" />
<include file="$(find rplidar_ros)/launch/hectormapping.launch" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find rplidar_ros)/rviz/slam.rviz" />
</launch>
10 changes: 10 additions & 0 deletions launch/view_karto.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.launch" />
<include file="$(find rplidar_ros)/launch/karto.launch" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find rplidar_ros)/rviz/slam.rviz" />
</launch>
10 changes: 10 additions & 0 deletions launch/view_slam.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.launch" />
<include file="$(find rplidar_ros)/launch/hectormapping.launch" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find rplidar_ros)/rviz/slam.rviz" />
</launch>
10 changes: 6 additions & 4 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<?xml version="1.0"?>
<package>
<name>rplidar_ros</name>
<version>1.0.0</version>
<description>The rplidar ros package</description>

<maintainer email="[email protected]">Ling</maintainer>
<version>1.5.7</version>
<description>The rplidar ros package, support rplidar A2/A1 </description>

<maintainer email="[email protected]">Slamtec ROS Maintainer</maintainer>
<license>BSD</license>

<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rosconsole</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>std_srvs</build_depend>
<run_depend>roscpp</run_depend>
<run_depend>rosconsole</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>std_srvs</run_depend>

</package>
Binary file added rplidar_A1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added rplidar_A2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading