Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tkrugg
Last active December 17, 2015 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkrugg/5564205 to your computer and use it in GitHub Desktop.
Save tkrugg/5564205 to your computer and use it in GitHub Desktop.
A little script that automates the installation of a Hokuyo URG-04LX lidar for ros-fuerte and Ubuntu 12.04 To launch the node afterward, please refer to the end of this file Place the `laser.vcg` inside ~/.rviz and load it from rviz
#!/bin/bash
# Works for Ubuntu 12.04 and ros-fuerte featuring a Hokuyo URG-04LX lidar
# installing the drivers `hokuyo_node` and writing permissions
sudo apt-get install ros-fuerte-laser-drivers
sudo chmod a+rwx /dev/ttyACM0
# launching the node
# $ roscore &
# $ rosrun hokuyo_node hokuyo_node &
# you should now see it publishing a laser signal
# on a topic called `laser_scan`
# you visualize this topic using rviz
# $ rosrun rviz rviz &
# now you need to load the proper configuration inside rviz &
Axes.Enabled=1
Axes.Length=1
Axes.Radius=0.1
Axes.Reference\ Frame=<Fixed Frame>
Background\ ColorB=0
Background\ ColorG=0
Background\ ColorR=0
Camera\ Config=1.5698 2.5954 11.7106 -0.0220982 -0.03 0.211857
Camera\ Type=rviz::XYOrbitViewController
Camera.Enabled=0
Camera.Image\ Rendering=background & overlay
Camera.Image\ Topic=/camera/rgb/image_rect_color
Camera.Overlay\ Alpha=0.5
Camera.Queue\ Size=2
Camera.Transport\ Hint=raw
Camera.Zoom\ Factor=1
Fixed\ Frame=/laser
LaserScan..AxisColorAutocompute\ Value\ Bounds=1
LaserScan..AxisColorAxis=2
LaserScan..AxisColorMax\ Value=10
LaserScan..AxisColorMin\ Value=-10
LaserScan..AxisColorUse\ Fixed\ Frame=1
LaserScan..FlatColorColorB=1
LaserScan..FlatColorColorG=1
LaserScan..FlatColorColorR=1
LaserScan..IntensityAutocompute\ Intensity\ Bounds=1
LaserScan..IntensityChannel\ Name=intensity
LaserScan..IntensityMax\ ColorB=1
LaserScan..IntensityMax\ ColorG=1
LaserScan..IntensityMax\ ColorR=1
LaserScan..IntensityMax\ Intensity=4096
LaserScan..IntensityMin\ ColorB=0
LaserScan..IntensityMin\ ColorG=0
LaserScan..IntensityMin\ ColorR=0
LaserScan..IntensityMin\ Intensity=0
LaserScan..IntensityUse\ full\ RGB\ spectrum=1
LaserScan.Alpha=1
LaserScan.Billboard\ Size=0.01
LaserScan.Color\ Transformer=Intensity
LaserScan.Decay\ Time=0
LaserScan.Enabled=0
LaserScan.Position\ Transformer=XYZ
LaserScan.Queue\ Size=10
LaserScan.Selectable=1
LaserScan.Style=1
LaserScan.Topic=/scan
LaserScan2..AxisColorAutocompute\ Value\ Bounds=1
LaserScan2..AxisColorAxis=2
LaserScan2..AxisColorMax\ Value=10
LaserScan2..AxisColorMin\ Value=-10
LaserScan2..AxisColorUse\ Fixed\ Frame=1
LaserScan2..FlatColorColorB=1
LaserScan2..FlatColorColorG=1
LaserScan2..FlatColorColorR=1
LaserScan2..IntensityAutocompute\ Intensity\ Bounds=1
LaserScan2..IntensityChannel\ Name=intensity
LaserScan2..IntensityMax\ ColorB=1
LaserScan2..IntensityMax\ ColorG=1
LaserScan2..IntensityMax\ ColorR=1
LaserScan2..IntensityMax\ Intensity=4096
LaserScan2..IntensityMin\ ColorB=0
LaserScan2..IntensityMin\ ColorG=0
LaserScan2..IntensityMin\ ColorR=0
LaserScan2..IntensityMin\ Intensity=0
LaserScan2..IntensityUse\ full\ RGB\ spectrum=0
LaserScan2.Alpha=1
LaserScan2.Billboard\ Size=0.01
LaserScan2.Color\ Transformer=Intensity
LaserScan2.Decay\ Time=0
LaserScan2.Enabled=1
LaserScan2.Position\ Transformer=XYZ
LaserScan2.Queue\ Size=10
LaserScan2.Selectable=1
LaserScan2.Style=1
LaserScan2.Topic=/scan
PointCloud2..AxisColorAutocompute\ Value\ Bounds=1
PointCloud2..AxisColorAxis=2
PointCloud2..AxisColorMax\ Value=10
PointCloud2..AxisColorMin\ Value=-10
PointCloud2..AxisColorUse\ Fixed\ Frame=1
PointCloud2..FlatColorColorB=1
PointCloud2..FlatColorColorG=1
PointCloud2..FlatColorColorR=1
PointCloud2..IntensityAutocompute\ Intensity\ Bounds=1
PointCloud2..IntensityChannel\ Name=z
PointCloud2..IntensityMax\ ColorB=1
PointCloud2..IntensityMax\ ColorG=1
PointCloud2..IntensityMax\ ColorR=1
PointCloud2..IntensityMax\ Intensity=8.767
PointCloud2..IntensityMin\ ColorB=0
PointCloud2..IntensityMin\ ColorG=0
PointCloud2..IntensityMin\ ColorR=0
PointCloud2..IntensityMin\ Intensity=1.706
PointCloud2..IntensityUse\ full\ RGB\ spectrum=1
PointCloud2.Alpha=1
PointCloud2.Billboard\ Size=0.01
PointCloud2.Color\ Transformer=Intensity
PointCloud2.Decay\ Time=0
PointCloud2.Enabled=0
PointCloud2.Position\ Transformer=XYZ
PointCloud2.Queue\ Size=10
PointCloud2.Selectable=1
PointCloud2.Style=1
PointCloud2.Topic=/camera/depth/points
Property\ Grid\ Splitter=743,78
Property\ Grid\ State=expanded=.Global Options,.Global Status,PointCloud2.Enabled,LaserScan.Enabled,LaserScan2.Enabled,LaserScan2.Status;splitterratio=0.410413
QMainWindow=000000ff00000000fd00000003000000000000017600000387fc0200000002fb000000100044006900730070006c006100790073010000001d00000387000000ee00fffffffb0000000c00430061006d0065007200610000000245000000bc0000001900ffffff000000010000013100000387fc0200000003fb0000001e0054006f006f006c002000500072006f0070006500720074006900650073010000001d000000e60000006700fffffffb0000000a005600690065007700730100000109000001af000000bb00fffffffb0000001200530065006c0065006300740069006f006e01000002be000000e60000006700ffffff00000003000004bf0000003efc0100000001fb0000000800540069006d00650100000000000004bf000002bf00ffffff0000020c0000038700000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
TF.All\ Enabled=0
TF.Enabled=1
TF.Frame\ Timeout=15
TF.Marker\ Scale=1
TF.Show\ Arrows=1
TF.Show\ Axes=1
TF.Show\ Names=1
TF.Update\ Interval=0
Target\ Frame=<Fixed Frame>
Tool\ 2D\ Nav\ GoalTopic=/move_base_simple/goal
Tool\ 2D\ Pose\ EstimateTopic=initialpose
[Display0]
ClassName=rviz::CameraDisplay
Name=Camera
[Display1]
ClassName=rviz::PointCloud2Display
Name=PointCloud2
[Display2]
ClassName=rviz::LaserScanDisplay
Name=LaserScan
[Display3]
ClassName=rviz::AxesDisplay
Name=Axes
[Display4]
ClassName=rviz::TFDisplay
Name=TF
[Display5]
ClassName=rviz::LaserScanDisplay
Name=LaserScan2
[Window]
Height=1000
Width=1215
X=17
Y=-15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment