Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kent-williams committed Sep 29, 2016
0 parents commit 1b45436
Show file tree
Hide file tree
Showing 25 changed files with 2,776 additions and 0 deletions.
50 changes: 50 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
cmake_minimum_required(VERSION 2.8.3)
project(sweep_ros)

set(SWEEP_SDK_PATH "sweep-sdk-cpp")
set(CPP_SERIAL_PATH "sweep-sdk-cpp/src/serial")

FILE(GLOB SWEEP_SDK_SRC
"${SWEEP_SDK_PATH}/src/*.cc"
"${CPP_SERIAL_PATH}/*.cc"
"${CPP_SERIAL_PATH}/arch/*.cc"
)

find_package(catkin REQUIRED COMPONENTS
rosconsole
roscpp
sensor_msgs
pcl_msgs
)

find_package(PCL REQUIRED)

include_directories(
${SWEEP_SDK_PATH}/inc
${SWEEP_SDK_PATH}/inc/serial
${SWEEP_SDK_PATH}/src
${PCL_INCLUDE_DIRS}
)

## Add link directories
link_directories(
${PCL_LIBRARY_DIRS}
)

catkin_package()

add_executable(sweep_node src/node.cpp ${SWEEP_SDK_SRC})

target_link_libraries(sweep_node ${catkin_LIBRARIES})


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

install(DIRECTORY sweep-sdk-cpp
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS
)
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016, Scanse LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# sweep-ros

[![Join the chat at https://gitter.im/scannable/sweep-ros](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/scanse/sweep-ros?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Scanse Sweep ROS Driver and Node

This node is currently publishing a pointcloud2 msg. Use sweep2scan.launch for conversion to laserscan msg.
8 changes: 8 additions & 0 deletions launch/sweep.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<launch>
<node name="sweep_node" pkg="sweep_ros" type="sweep_node" 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_frame"/>
<param name="rotation_speed" type="int" value="5"/>
</node>
</launch>
38 changes: 38 additions & 0 deletions launch/sweep2scan.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<launch>

<!-- run sweep_node node -->
<node name="sweep_node" pkg="sweep_ros" type="sweep_node" 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_frame"/>
</node>

<!-- run pointcloud_to_laserscan node -->
<node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="pointcloud_to_laserscan">

<remap from="cloud_in" to="pc2"/>
<rosparam>
target_frame: laser_frame # Leave disabled to output scan in pointcloud frame
transform_tolerance: 0.001
min_height: -1.0
max_height: 1.0

angle_min: -3.14 # -M_PI/2
angle_max: 3.14 # M_PI/2
angle_increment: 0.001 # M_PI/360.0
scan_time: 0.1
range_min: 0.0
range_max: 40.0
use_inf: true

# Concurrency level, affects number of pointclouds queued for processing and number of threads used
# 0 : Detect number of cores
# 1 : Single threaded
# 2->inf : Parallelism level
concurrency_level: 1
</rosparam>

</node>

</launch>

5 changes: 5 additions & 0 deletions launch/view_sweep_laser_scan.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<launch>
<include file="$(find sweep_ros)/launch/sweep2scan.launch" />

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find sweep_ros)/rviz/sweep_laser_scan.rviz" />
</launch>
5 changes: 5 additions & 0 deletions launch/view_sweep_pc2.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<launch>
<include file="$(find sweep_ros)/launch/sweep.launch" />

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find sweep_ros)/rviz/sweep_pc2.rviz" />
</launch>
27 changes: 27 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<package>
<name>sweep_ros</name>
<version>0.1.0</version>
<description>The sweep_ros package</description>

<maintainer email="support@scanse.io">Kent Williams</maintainer>

<license>MIT</license>

<buildtool_depend>catkin</buildtool_depend>
<build_depend>rosconsole</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>pcl_conversions</build_depend>
<run_depend>pcl_conversions</run_depend>
<run_depend>rosconsole</run_depend>
<run_depend>roscpp</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>pointcloud_to_laserscan</run_depend>

<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- Other tools can request additional information be placed here -->

</export>
</package>
140 changes: 140 additions & 0 deletions rviz/sweep_laser_scan.rviz
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
Panels:
- Class: rviz/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Status1
- /Grid1
- /LaserScan1
Splitter Ratio: 0.5
Tree Height: 895
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expanded:
- /2D Pose Estimate1
- /2D Nav Goal1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.588679
- Class: rviz/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- Class: rviz/Time
Experimental: false
Name: Time
SyncMode: 0
SyncSource: LaserScan
Visualization Manager:
Class: ""
Displays:
- Alpha: 0.5
Cell Size: 1
Class: rviz/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
Line Width: 0.03
Value: Lines
Name: Grid
Normal Cell Count: 0
Offset:
X: 0
Y: 0
Z: 0
Plane: XY
Plane Cell Count: 10
Reference Frame: <Fixed Frame>
Value: true
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Max Value: 10
Min Value: -10
Value: true
Axis: Z
Channel Name: intensity
Class: rviz/LaserScan
Color: 255; 255; 255
Color Transformer: Intensity
Decay Time: 0
Enabled: true
Invert Rainbow: false
Max Color: 255; 255; 255
Max Intensity: 4096
Min Color: 0; 0; 0
Min Intensity: 0
Name: LaserScan
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.01
Style: Flat Squares
Topic: /scan
Use Fixed Frame: true
Use rainbow: true
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Fixed Frame: laser_frame
Frame Rate: 30
Name: root
Tools:
- Class: rviz/Interact
Hide Inactive Objects: true
- Class: rviz/MoveCamera
- Class: rviz/Select
- Class: rviz/FocusCamera
- Class: rviz/Measure
- Class: rviz/SetInitialPose
Topic: /initialpose
- Class: rviz/SetGoal
Topic: /move_base_simple/goal
- Class: rviz/PublishPoint
Single click: true
Topic: /clicked_point
Value: true
Views:
Current:
Class: rviz/Orbit
Distance: 14.0493
Enable Stereo Rendering:
Stereo Eye Separation: 0.06
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: 0
Y: 0
Z: 0
Name: Current View
Near Clip Distance: 0.01
Pitch: 1.5404
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 0.435398
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 1176
Hide Left Dock: false
Hide Right Dock: false
QMainWindow State: 000000ff00000000fd00000004000000000000013c0000040efc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006400fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c00610079007301000000280000040e000000dd00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f0000040efc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a0056006900650077007301000000280000040e000000b000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007800000003efc0100000002fb0000000800540069006d0065010000000000000780000002f600fffffffb0000000800540069006d00650100000000000004500000000000000000000005290000040e00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: false
Width: 1920
X: 3840
Y: 24
Loading

0 comments on commit 1b45436

Please sign in to comment.