Skip to content

Commit

Permalink
Merge pull request #273 from icarpis/development
Browse files Browse the repository at this point in the history
Added RGB point cloud and stream synchronization
  • Loading branch information
icarpis authored Nov 2, 2017
2 parents 83a859e + 0525dcb commit 4aba5ce
Show file tree
Hide file tree
Showing 7 changed files with 299 additions and 151 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ This will launch [RViz](http://wiki.ros.org/rviz) and display the depth pointclo


## Known Issues
* This ROS node does not currently provide RGB point cloud.
* This ROS node does not currently provide any dynamic reconfigure support for camera properties/presets.
* This ROS node does not currently offer temporal syncronization of depth and color data.
* This ROS node does not currently support [ROS Lunar Loggerhead](http://wiki.ros.org/lunar).
* This ROS node does not currently work with [ROS 2](https://github.com/ros2/ros2/wiki).
* This ROS node currently does not provide the unit-tests which ensure the proper operation of the camera. Future versions of the node will provide ROS compatible unit-tests.
Expand Down
5 changes: 4 additions & 1 deletion realsense_ros_camera/include/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#define REALSENSE_ROS_MAJOR_VERSION 2
#define REALSENSE_ROS_MINOR_VERSION 0
#define REALSENSE_ROS_PATCH_VERSION 0
#define REALSENSE_ROS_PATCH_VERSION 1

#define STRINGIFY(arg) #arg
#define VAR_ARG_STRING(arg) STRINGIFY(arg)
Expand All @@ -18,6 +18,9 @@

namespace realsense_ros_camera
{
const bool POINTCLOUD = false;
const bool SYNC_FRAMES = false;

const int DEPTH_WIDTH = 640;
const int DEPTH_HEIGHT = 480;

Expand Down
20 changes: 15 additions & 5 deletions realsense_ros_camera/launch/demo_pointcloud.launch
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@
<arg name="manager" default="realsense_ros_camera_manager"/>

<include file="$(find realsense_ros_camera)/launch/rs_camera.launch">
<arg name="manager" value="$(arg manager)"/>
<arg name="depth_width" value="640"/>
<arg name="depth_height" value="480"/>
<arg name="depth_fps" value="30"/>
<arg name="enable_depth" value="true"/>
<arg name="manager" value="$(arg manager)"/>
<arg name="depth_width" value="640"/>
<arg name="depth_height" value="480"/>
<arg name="depth_fps" value="30"/>
<arg name="color_width" value="640"/>
<arg name="color_height" value="480"/>
<arg name="color_fps" value="30"/>
<arg name="enable_depth" value="true"/>
<arg name="enable_color" value="true"/>
<arg name="enable_infra1" value="false"/>
<arg name="enable_infra2" value="false"/>
<arg name="enable_fisheye" value="false"/>
<arg name="enable_imu" value="false"/>
<arg name="enable_pointcloud" value="true"/>
<arg name="enable_sync" value="true"/>
</include>

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find realsense_ros_camera)/rviz/pointcloud.rviz" required="true" />
Expand Down
6 changes: 6 additions & 0 deletions realsense_ros_camera/launch/rs_camera.launch
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@
<arg name="accel_fps" default="1000" />
<arg name="enable_imu" default="true" />

<arg name="enable_pointcloud" default="false" />
<arg name="enable_sync" default="false" />

<node pkg="nodelet" type="nodelet" name="$(arg manager)" args="manager" output="screen"/>
<node pkg="nodelet" type="nodelet" name="realsense_ros_$(arg camera)" args="load realsense_ros_camera/RealSenseCameraNodelet $(arg manager)" output="screen">

<param name="enable_pointcloud" type="bool" value="$(arg enable_pointcloud)" />
<param name="enable_sync" type="bool" value="$(arg enable_sync)" />

<param name="fisheye_width" type="int" value="$(arg fisheye_width)" />
<param name="fisheye_height" type="int" value="$(arg fisheye_height)" />
<param name="enable_fisheye" type="bool" value="$(arg enable_fisheye)" />
Expand Down
2 changes: 1 addition & 1 deletion realsense_ros_camera/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package>
<name>realsense_ros_camera</name>
<version>1.0.0</version>
<version>2.0.1</version>
<description>The realsense_ros_camera package</description>
<maintainer email="[email protected]">Intel RealSense</maintainer>
<license>Apache 2.0</license>
Expand Down
21 changes: 11 additions & 10 deletions realsense_ros_camera/rviz/pointcloud.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Visualization Manager:
Axis: Z
Channel Name: intensity
Class: rviz/PointCloud2
Color: 85; 0; 255
Color Transformer: FlatColor
Color: 255; 255; 255
Color Transformer: RGB8
Decay Time: 0
Enabled: true
Invert Rainbow: false
Expand All @@ -68,9 +68,9 @@ Visualization Manager:
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 1
Size (Pixels): 3
Size (m): 0.00999999978
Style: Points
Style: Flat Squares
Topic: /camera/points
Unreliable: false
Use Fixed Frame: true
Expand Down Expand Up @@ -100,24 +100,25 @@ Visualization Manager:
Views:
Current:
Class: rviz/ThirdPersonFollower
Distance: 3.48406529
Distance: 6.36999989
Enable Stereo Rendering:
Stereo Eye Separation: 0.0599999987
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
X: -0.697073579
Y: -0.280089796
X: 0
Y: 0
Z: 0
Focal Shape Fixed Size: true
Focal Shape Fixed Size: false
Focal Shape Size: 0.0500000007
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.00999999978
Pitch: 0.659797728
Pitch: 0.085398294
Target Frame: <Fixed Frame>
Value: ThirdPersonFollower (rviz)
Yaw: 3.15039515
Yaw: 3.01539803
Saved: ~
Window Geometry:
Displays:
Expand Down
Loading

0 comments on commit 4aba5ce

Please sign in to comment.