Browse Source

Added Stretch Realsense launch file

pull/113/head
Binit Shah 2 years ago
parent
commit
11fa170b92
3 changed files with 269 additions and 1 deletions
  1. +34
    -0
      stretch_core/launch/stretch_realsense.launch
  2. +1
    -1
      stretch_core/nodes/d435i_frustum_visualizer
  3. +234
    -0
      stretch_core/rviz/realsense.rviz

+ 34
- 0
stretch_core/launch/stretch_realsense.launch View File

@ -0,0 +1,34 @@
<launch>
<arg name="rviz" default="false" doc="whether to show Rviz" />
<arg name="resolution" default="high" doc="resolution of the color/depth images ('low' or 'high')" />
<arg name="preset" default="High Accuracy" doc="depth image visual preset ('Default', 'High Accuracy', and more at https://dev.intelrealsense.com/docs/d400-series-visual-presets#section-preset-table)" />
<arg name="publish_frustum_viz" default="false" doc="whether to pub viz of cameras' frustums" />
<arg name="publish_upright_img" default="true" doc="whether to pub rotated upright color image" />
<!-- D435i DRIVER -->
<include file="$(find stretch_core)/launch/d435i_$(arg resolution)_resolution.launch" />
<!-- VISUAL PRESET CONFIGURATION -->
<node name="d435i_configure" pkg="stretch_core" type="d435i_configure" output="screen">
<param name="initial_mode" type="string" value="$(arg preset)"/>
</node>
<!-- FRUSTUM FIELD OF VIEW VISUALIZATION -->
<node name="d435i_frustum_visualizer" pkg="stretch_core" type="d435i_frustum_visualizer" output="screen" if="$(arg publish_frustum_viz)" />
<!-- UPRIGHT ROTATED CAMERA VIEW -->
<node name="upright_rotater" pkg="image_rotate" type="image_rotate" if="$(arg publish_upright_img)">
<remap from="image" to="/camera/color/image_raw" />
<remap from="rotated/image" to="/camera/color/upright_image_raw" />
<param name="target_frame_id" type="str" value="" />
<param name="target_x" type="double" value="-1.5708" />
</node>
<!-- VISUALIZE -->
<group if="$(arg rviz)">
<node name="rviz" pkg="rviz" type="rviz" output="screen" args="-d $(find stretch_core)/rviz/realsense.rviz" />
<node name="fake_base_link_tf_publisher" pkg="tf" type="static_transform_publisher" args="0.019 -0.007 1.262 0.601 0.399 -0.364 0.589 /fake_base_link /camera_link 100" />
</group>
</launch>

+ 1
- 1
stretch_core/nodes/d435i_frustum_visualizer View File

@ -103,13 +103,13 @@ class FrustumNode:
marker.type = marker.TRIANGLE_LIST
marker.action = marker.ADD
marker.lifetime = rospy.Duration(0.5) #0.2
marker.text = 'D435i_frustum'
marker.header.frame_id = frame_id
marker.header.stamp = timestamp
marker.id = 0
marker.scale.x = 1.0
marker.scale.y = 1.0
marker.scale.z = 1.0
marker.pose.orientation.w = 1.0
if camera_type == 'depth':
# frustum color and transparency
# gray

+ 234
- 0
stretch_core/rviz/realsense.rviz View File

@ -0,0 +1,234 @@
Panels:
- Class: rviz/Displays
Help Height: 78
Name: Displays
Property Tree Widget:
Expanded: ~
Splitter Ratio: 0.5
Tree Height: 255
- 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: PointCloud2
Preferences:
PromptSaveOnExit: true
Toolbars:
toolButtonStyle: 2
Visualization Manager:
Class: ""
Displays:
- Alpha: 0.5
Cell Size: 1
Class: rviz/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
Line Width: 0.029999999329447746
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
- Class: rviz/TF
Enabled: true
Frame Timeout: 15
Frames:
All Enabled: false
camera_accel_frame:
Value: false
camera_accel_optical_frame:
Value: false
camera_aligned_depth_to_color_frame:
Value: false
camera_color_frame:
Value: false
camera_color_optical_frame:
Value: false
camera_color_optical_frame_rotated:
Value: false
camera_depth_frame:
Value: false
camera_depth_optical_frame:
Value: false
camera_link:
Value: true
fake_base_link:
Value: true
Marker Alpha: 1
Marker Scale: 1
Name: TF
Show Arrows: true
Show Axes: true
Show Names: true
Tree:
fake_base_link:
camera_link:
camera_accel_frame:
camera_accel_optical_frame:
{}
camera_aligned_depth_to_color_frame:
camera_color_optical_frame:
camera_color_optical_frame_rotated:
{}
camera_color_frame:
{}
camera_depth_frame:
camera_depth_optical_frame:
{}
Update Interval: 0
Value: true
- Class: rviz/Marker
Enabled: false
Marker Topic: /frustum_marker/color_camera
Name: Color Camera Frustum
Namespaces:
{}
Queue Size: 100
Value: false
- Class: rviz/Marker
Enabled: false
Marker Topic: /frustum_marker/depth_camera
Name: Depth Camera Frustum
Namespaces:
{}
Queue Size: 100
Value: false
- 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
Min Color: 0; 0; 0
Name: PointCloud2
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 1
Size (m): 0.009999999776482582
Style: Points
Topic: /camera/depth/color/points
Unreliable: false
Use Fixed Frame: true
Use rainbow: true
Value: true
- Alpha: 1
Class: rviz_plugin_tutorials/Imu
Color: 204; 51; 204
Enabled: false
History Length: 1
Name: Imu
Queue Size: 10
Topic: /camera/accel/sample_corrected
Unreliable: false
Value: false
- Class: rviz/Image
Enabled: true
Image Topic: /camera/color/upright_image_raw
Max Value: 1
Median window: 5
Min Value: 0
Name: Color Image
Normalize Range: true
Queue Size: 2
Transport Hint: raw
Unreliable: false
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Default Light: true
Fixed Frame: fake_base_link
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: 3.5590744018554688
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Field of View: 0.7853981852531433
Focal Point:
X: 0.190033957362175
Y: -0.3485092520713806
Z: 0.6963028311729431
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.2897970676422119
Target Frame: <Fixed Frame>
Yaw: 2.318114995956421
Saved: ~
Window Geometry:
Color Image:
collapsed: false
Displays:
collapsed: false
Height: 1016
Hide Left Dock: false
Hide Right Dock: false
QMainWindow State: 000000ff00000000fd0000000400000000000001b50000035afc020000000dfb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d0000018a000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb000000160043006f006c006f007200200049006d00610067006501000001cd000001ca0000001600fffffffb0000000a0049006d0061006700650000000234000000960000000000000000fb0000000a0049006d0061006700650000000270000001270000000000000000fb0000000c00430061006d006500720061000000029e000000f90000000000000000fb0000000a0049006d0061006700650100000297000001000000000000000000000000010000010f00000363fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d00000363000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007380000003efc0100000002fb0000000800540069006d0065010000000000000738000002eb00fffffffb0000000800540069006d006501000000000000045000000000000000000000057d0000035a00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
collapsed: false
Tool Properties:
collapsed: false
Views:
collapsed: false
Width: 1848
X: 72
Y: 27

Loading…
Cancel
Save