Skip to content

Mujoco Camera topics and PointCloud2 topics are now displayed correctly in RViz #196

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

Open
wants to merge 3 commits into
base: feature/mujoco_simulation
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions stretch_simulation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,19 @@ ros2 param set /global_costmap/global_costmap inflation_layer.inflation_radius 0
ros2 param set /local_costmap/local_costmap inflation_layer.inflation_radius 0.20
```

## Cameras and PointClouds

Please use the `use_cameras:=true` argument to enable cameras and pointclouds. e.g. `ros2 launch stretch_simulation stretch_mujoco_driver.launch.py use_mujoco_viewer:=true mode:=navigation use_cameras:=true`

There are five camera topics being published:
- RGB and Depth for the D405 camera in the gripper.
- RGB and Depth or the D435i camera in the head.
- RGB for the wide-lens camera in the head.

The RGB and Depth frames are used to create two PointCloud2 topics as well.

<img src="camera.png" width=600 />


## Stretch Drivers

Expand Down
Binary file added stretch_simulation/camera.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 23 additions & 36 deletions stretch_simulation/rviz/stretch_sim.rviz
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Panels:
- Class: rviz_common/Displays
Help Height: 138
Help Height: 70
Name: Displays
Property Tree Widget:
Expanded:
- /Global Options1
- /Status1
- /Camera1/Topic1
Splitter Ratio: 0.5
Tree Height: 461
Tree Height: 444
- Class: rviz_common/Selection
Name: Selection
- Class: rviz_common/Tool Properties
Expand Down Expand Up @@ -390,7 +390,7 @@ Visualization Manager:
Value: true
Visual Enabled: true
- Class: rviz_default_plugins/Camera
Enabled: false
Enabled: true
Far Plane Distance: 100
Image Rendering: background and overlay
Name: Camera
Expand All @@ -400,17 +400,16 @@ Visualization Manager:
Durability Policy: Volatile
History Policy: Keep Last
Reliability Policy: Reliable
Value: /camera/cam_d405_rgb_raw
Value: false
Value: /camera/cam_d435i_rgb_raw
Value: true
Visibility:
Grid: true
LaserScan: true
Map: true
MarkerArray: true
PointCloud2: true
PointCloud2: false
RobotModel: true
TF: true
Value: true
Value: false
Zoom Factor: 1
- Class: rviz_default_plugins/TF
Enabled: false
Expand Down Expand Up @@ -447,18 +446,6 @@ Visualization Manager:
Value: /map_updates
Use Timestamp: false
Value: true
- Class: rviz_default_plugins/MarkerArray
Enabled: false
Name: MarkerArray
Namespaces:
{}
Topic:
Depth: 5
Durability Policy: Volatile
History Policy: Keep Last
Reliability Policy: Reliable
Value: /slam_toolbox/graph_visualization
Value: false
- Alpha: 1
Autocompute Intensity Bounds: true
Autocompute Value Bounds:
Expand All @@ -469,16 +456,16 @@ Visualization Manager:
Channel Name: intensity
Class: rviz_default_plugins/PointCloud2
Color: 255; 255; 255
Color Transformer: ""
Color Transformer: RGB8
Decay Time: 0
Enabled: false
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: ""
Position Transformer: XYZ
Selectable: true
Size (Pixels): 3
Size (m): 0.009999999776482582
Expand All @@ -489,10 +476,10 @@ Visualization Manager:
Filter size: 10
History Policy: Keep Last
Reliability Policy: Reliable
Value: ""
Value: /pointcloud/cam_d435i_depth
Use Fixed Frame: true
Use rainbow: true
Value: false
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Expand Down Expand Up @@ -539,35 +526,35 @@ Visualization Manager:
Views:
Current:
Class: rviz_default_plugins/Orbit
Distance: 9.59525203704834
Distance: 3.2111217975616455
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: 2.8923263549804688
Y: -1.1688225269317627
Z: 0.16504471004009247
X: 1.9737507104873657
Y: -2.8990774154663086
Z: 1.4369930028915405
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.7653981447219849
Pitch: 0.4653986096382141
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
Yaw: 2.8453972339630127
Yaw: 5.638580799102783
Saved: ~
Window Geometry:
Camera:
collapsed: false
Displays:
collapsed: false
Height: 846
Height: 1043
Hide Left Dock: false
Hide Right Dock: false
QMainWindow State: 000000ff00000000fd0000000400000000000001f700000294fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d00000294000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00430061006d006500720061000000023b0000007f0000002800ffffff000000010000015f00000294fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003d00000294000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000005810000005afc0100000002fb0000000800540069006d0065010000000000000581000002fb00fffffffb0000000800540069006d006501000000000000045000000000000000000000021f0000029400000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
QMainWindow State: 000000ff00000000fd0000000400000000000001f700000359fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003d0000023f000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000c00430061006d0065007200610100000282000001140000002800ffffff000000010000015f00000359fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003d00000359000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007800000005afc0100000002fb0000000800540069006d0065010000000000000780000002fb00fffffffb0000000800540069006d006501000000000000045000000000000000000000041e0000035900000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
Expand All @@ -576,6 +563,6 @@ Window Geometry:
collapsed: false
Views:
collapsed: false
Width: 1409
X: 2166
Y: 105
Width: 1920
X: 1920
Y: 0
Loading