Skip to content

Commit

Permalink
Merge pull request #21 from osrf/lidar
Browse files Browse the repository at this point in the history
Point clouds from lidars
  • Loading branch information
nkoenig authored Jun 28, 2019
2 parents 4b07992 + 7feb0b4 commit 07b001e
Show file tree
Hide file tree
Showing 13 changed files with 1,002 additions and 63 deletions.
4 changes: 2 additions & 2 deletions ros1_ign_gazebo_demos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ Then send a command

## Depth camera

Publishes depth camera image.
Publishes depth camera images and point clouds.

roslaunch ros1_ign_gazebo_demos depth_camera.launch

![](images/depth_camera_demo.png)

## GPU lidar

Publishes 2D laser scans.
Publishes 2D laser scans and point clouds.

roslaunch ros1_ign_gazebo_demos gpu_lidar.launch

Expand Down
Binary file modified ros1_ign_gazebo_demos/images/depth_camera_demo.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 modified ros1_ign_gazebo_demos/images/gpu_lidar_demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion ros1_ign_gazebo_demos/launch/depth_camera.launch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<launch>

<include file="$(find ros1_ign_gazebo_demos)/launch/ign_gazebo.launch">
<arg name="args" value="-r -v 3 depth_camera_sensor.sdf"/>
<arg name="args" value="-r -v 3 $(find ros1_ign_point_cloud)/examples/depth_camera.sdf"/>
</include>

<node
Expand All @@ -19,4 +19,10 @@
name="rqt_image_view"
args="/depth_camera">
</node>

<node
type="rviz"
name="rviz"
pkg="rviz"
args="-d $(find ros1_ign_gazebo_demos)/rviz/depth_camera.rviz" />
</launch>
2 changes: 1 addition & 1 deletion ros1_ign_gazebo_demos/launch/gpu_lidar.launch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<launch>

<include file="$(find ros1_ign_gazebo_demos)/launch/ign_gazebo.launch">
<arg name="args" value="-r -v 3 gpu_lidar_sensor.sdf"/>
<arg name="args" value="-r -v 3 $(find ros1_ign_point_cloud)/examples/gpu_lidar.sdf"/>
</include>

<node
Expand Down
2 changes: 1 addition & 1 deletion ros1_ign_gazebo_demos/launch/rgbd_camera.launch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<launch>

<include file="$(find ros1_ign_gazebo_demos)/launch/ign_gazebo.launch">
<arg name="args" value="-r -v 3 $(find ros1_ign_point_cloud)/examples/ros1_ign_point_cloud.sdf"/>
<arg name="args" value="-r -v 3 $(find ros1_ign_point_cloud)/examples/rgbd_camera.sdf"/>
</include>

<node
Expand Down
147 changes: 147 additions & 0 deletions ros1_ign_gazebo_demos/rviz/depth_camera.rviz
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
Panels:
- Class: rviz/Displays
Help Height: 0
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Image1
- /PointCloud21
Splitter Ratio: 0.5
Tree Height: 423
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expanded:
- /2D Pose Estimate1
- /2D Nav Goal1
- /Publish Point1
Name: Tool Properties
Splitter Ratio: 0.5886790156364441
- Class: rviz/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- Class: rviz/Time
Experimental: false
Name: Time
SyncMode: 0
SyncSource: Image
Preferences:
PromptSaveOnExit: true
Toolbars:
toolButtonStyle: 2
Visualization Manager:
Class: ""
Displays:
- Class: rviz/Image
Enabled: true
Image Topic: /depth_camera
Max Value: 1
Median window: 5
Min Value: 0
Name: Image
Normalize Range: true
Queue Size: 2
Transport Hint: raw
Unreliable: false
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/PointCloud2
Color: 255; 255; 255
Color Transformer: RGB8
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: PointCloud2
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.019999999552965164
Style: Flat Squares
Topic: /depth_camera/points
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: true
Enabled: true
Global Options:
Background Color: 255; 255; 255
Default Light: true
Fixed Frame: map
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
Theta std deviation: 0.2617993950843811
Topic: /initialpose
X std deviation: 0.5
Y std deviation: 0.5
- 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: 6.307931423187256
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: -0.024829570204019547
Y: -0.440496027469635
Z: 1.0747597217559814
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: -1.3397971391677856
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 4.723598957061768
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 568
Hide Left Dock: false
Hide Right Dock: false
Image:
collapsed: false
QMainWindow State: 000000ff00000000fd000000040000000000000156000001e2fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003b000001e2000000c700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00430061006d0065007200610000000272000000c1000000000000000000000001000001b8000001e2fc0200000006fb0000000a0049006d006100670065010000003b000001e20000001600fffffffb0000000c00430061006d00650072006100000001ae000001850000000000000000fb0000000c00430061006d00650072006101000001ba000001790000000000000000fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003b000002f8000000a000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004b000000052fc0100000002fb0000000800540069006d006502000001a70000029a000004b000000052fb0000000800540069006d0065010000000000000450000000000000000000000196000001e200000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: false
Width: 1200
X: 405
Y: 378
53 changes: 42 additions & 11 deletions ros1_ign_gazebo_demos/rviz/gpu_lidar.rviz
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Panels:
- Class: rviz/Displays
Help Height: 78
Help Height: 0
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /LaserScan1
- /PointCloud21
Splitter Ratio: 0.5
Tree Height: 288
Tree Height: 366
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expand Down Expand Up @@ -82,11 +83,41 @@ Visualization Manager:
Use Fixed Frame: true
Use rainbow: true
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/PointCloud2
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: PointCloud2
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.029999999329447746
Style: Flat Squares
Topic: /custom_params/pc2
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Default Light: true
Fixed Frame: model_with_lidar/link
Fixed Frame: custom_params/link
Frame Rate: 30
Name: root
Tools:
Expand All @@ -110,25 +141,25 @@ Visualization Manager:
Views:
Current:
Class: rviz/Orbit
Distance: 13.194476127624512
Distance: 10.596034049987793
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: 1.7377599477767944
Y: -0.8083325624465942
Z: 0.38970595598220825
X: 1.855783224105835
Y: -0.6233639717102051
Z: 0.7489486932754517
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.6902022361755371
Pitch: 0.5402030348777771
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 3.6185994148254395
Yaw: 3.7535903453826904
Saved: ~
Window Geometry:
Displays:
Expand All @@ -146,5 +177,5 @@ Window Geometry:
Views:
collapsed: false
Width: 701
X: 492
Y: 396
X: 352
Y: 269
Loading

0 comments on commit 07b001e

Please sign in to comment.