<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ROS - Measure distance with D435 in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/ROS-Measure-distance-with-D435/m-p/560603#M9355</link>
    <description>&lt;P&gt;// License: Apache 2.0. See LICENSE file in root directory.&lt;/P&gt;&lt;P&gt;// Copyright(c) 2017 Intel Corporation. All Rights Reserved.&lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void chatterCallback(const sensor_msgs::Image::ConstPtr&amp;amp; msg) &lt;/P&gt;&lt;P&gt;{ &lt;/P&gt;&lt;P&gt;    cv_bridge::CvImagePtr Dest = cv_bridge::toCvCopy(msg); &lt;/P&gt;&lt;P&gt;    ROS_INFO("Width: %i", msg-&amp;gt;width);&lt;/P&gt;&lt;P&gt;    ROS_INFO("Height: %i", msg-&amp;gt;height);&lt;/P&gt;&lt;P&gt;    ROS_INFO("Value: %f", Dest-&amp;gt;&lt;A href="http://image.at"&gt;image.at&lt;/A&gt;(msg-&amp;gt;width/2,msg-&amp;gt;height/2)); &lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(int argc, char **argv)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ros::init(argc, argv, "distance");&lt;/P&gt;&lt;P&gt;    ros::NodeHandle n;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ros::AsyncSpinner spinner(1);&lt;/P&gt;&lt;P&gt;    spinner.start();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       ros::Subscriber sub = n.subscribe("camera/depth/image_raw", 100, chatterCallback); &lt;/P&gt;&lt;P&gt;    ros::Duration(100).sleep(&lt;/P&gt;&lt;P&gt;return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote this node. I subscribe to the depth stream and the output of width and height of the depth stream are correct.&lt;/P&gt;&lt;P&gt;The distance value still doesn't work. It always returns 0.00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is my conversion from ROS to OpenCV correct?&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jan 2018 14:43:22 GMT</pubDate>
    <dc:creator>FAl</dc:creator>
    <dc:date>2018-01-24T14:43:22Z</dc:date>
    <item>
      <title>ROS - Measure distance with D435</title>
      <link>https://community.intel.com/t5/Items-with-no-label/ROS-Measure-distance-with-D435/m-p/560602#M9354</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I installed librealsense 2.8.1 and the ROS wrapper 2.0.1. When i'm using the realsense-viewer I can view the depth and color streams. I am also able to measure the distance in the viewer.&lt;/P&gt;&lt;P&gt;How can I measure the distance with a ROS node?&lt;/P&gt;&lt;P&gt;I tried the sample code posted here : &lt;A href="https://github.com/IntelRealSense/librealsense/tree/development#"&gt;https://github.com/IntelRealSense/librealsense/tree/development#&lt;/A&gt; quick-start GitHub - IntelRealSense/librealsense at development  but it dosen't work.&lt;/P&gt;&lt;P&gt;The sample code uses the rs_pipeline. Is it possible to subscribe to the depth topic and calculate the distance from it? If I rostopic echo the depth stream the resulting values range between 0 and 255 (not the distance in m).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 12:22:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/ROS-Measure-distance-with-D435/m-p/560602#M9354</guid>
      <dc:creator>FAl</dc:creator>
      <dc:date>2018-01-24T12:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: ROS - Measure distance with D435</title>
      <link>https://community.intel.com/t5/Items-with-no-label/ROS-Measure-distance-with-D435/m-p/560603#M9355</link>
      <description>&lt;P&gt;// License: Apache 2.0. See LICENSE file in root directory.&lt;/P&gt;&lt;P&gt;// Copyright(c) 2017 Intel Corporation. All Rights Reserved.&lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;# include &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void chatterCallback(const sensor_msgs::Image::ConstPtr&amp;amp; msg) &lt;/P&gt;&lt;P&gt;{ &lt;/P&gt;&lt;P&gt;    cv_bridge::CvImagePtr Dest = cv_bridge::toCvCopy(msg); &lt;/P&gt;&lt;P&gt;    ROS_INFO("Width: %i", msg-&amp;gt;width);&lt;/P&gt;&lt;P&gt;    ROS_INFO("Height: %i", msg-&amp;gt;height);&lt;/P&gt;&lt;P&gt;    ROS_INFO("Value: %f", Dest-&amp;gt;&lt;A href="http://image.at"&gt;image.at&lt;/A&gt;(msg-&amp;gt;width/2,msg-&amp;gt;height/2)); &lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int main(int argc, char **argv)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ros::init(argc, argv, "distance");&lt;/P&gt;&lt;P&gt;    ros::NodeHandle n;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ros::AsyncSpinner spinner(1);&lt;/P&gt;&lt;P&gt;    spinner.start();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       ros::Subscriber sub = n.subscribe("camera/depth/image_raw", 100, chatterCallback); &lt;/P&gt;&lt;P&gt;    ros::Duration(100).sleep(&lt;/P&gt;&lt;P&gt;return 0;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wrote this node. I subscribe to the depth stream and the output of width and height of the depth stream are correct.&lt;/P&gt;&lt;P&gt;The distance value still doesn't work. It always returns 0.00.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is my conversion from ROS to OpenCV correct?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 14:43:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/ROS-Measure-distance-with-D435/m-p/560603#M9355</guid>
      <dc:creator>FAl</dc:creator>
      <dc:date>2018-01-24T14:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: ROS - Measure distance with D435</title>
      <link>https://community.intel.com/t5/Items-with-no-label/ROS-Measure-distance-with-D435/m-p/560604#M9356</link>
      <description>&lt;P&gt;Hello FelixAl,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;We escalated your question to RealSense developers. We'll let you know as soon as we have an answer.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Regards,&lt;P&gt;&amp;nbsp;&lt;/P&gt;Jesus&lt;P&gt;&amp;nbsp;&lt;/P&gt;Intel Customer Support</description>
      <pubDate>Wed, 24 Jan 2018 23:21:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/ROS-Measure-distance-with-D435/m-p/560604#M9356</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-01-24T23:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: ROS - Measure distance with D435</title>
      <link>https://community.intel.com/t5/Items-with-no-label/ROS-Measure-distance-with-D435/m-p/560605#M9357</link>
      <description>&lt;P&gt;Hello FelixAl, we received this code snippet from the dev team that will do as you asked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Hi,&lt;P&gt;&amp;nbsp;&lt;/P&gt;The following code snippet can do what he asked. I added a ROS conversion from raw depth pixel to a distance in meters.&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;# include &amp;lt;&amp;lt;/span&amp;gt;ros/ros.h&amp;gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;# include &amp;lt;&amp;lt;/span&amp;gt;image_transport/image_transport.h&amp;gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;# include &amp;lt;&amp;lt;/span&amp;gt;cv_bridge/cv_bridge.h&amp;gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;# include &amp;lt;&amp;lt;/span&amp;gt;sensor_msgs/image_encodings.h&amp;gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;# include &amp;lt;&amp;lt;/span&amp;gt;iostream&amp;gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;# include &amp;lt;&amp;lt;/span&amp;gt;depth_image_proc/depth_conversions.h&amp;gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;# include &amp;lt;&amp;lt;/span&amp;gt;depth_image_proc/depth_traits.h&amp;gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;B&gt;void&lt;/B&gt; chatterCallback(&lt;B&gt;const&lt;/B&gt; sensor_msgs::Image::ConstPtr&amp;amp; msg)&lt;P&gt;&amp;nbsp;&lt;/P&gt;{&lt;P&gt;&amp;nbsp;&lt;/P&gt;    cv_bridge::CvImagePtr Dest = cv_bridge::toCvCopy(msg);&lt;P&gt;&amp;nbsp;&lt;/P&gt;    ROS_INFO("Width: %i", msg-&amp;gt;width);&lt;P&gt;&amp;nbsp;&lt;/P&gt;    ROS_INFO("Height: %i",&amp;lt;span style="color: ...</description>
      <pubDate>Fri, 26 Jan 2018 00:29:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/ROS-Measure-distance-with-D435/m-p/560605#M9357</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-01-26T00:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: ROS - Measure distance with D435</title>
      <link>https://community.intel.com/t5/Items-with-no-label/ROS-Measure-distance-with-D435/m-p/560606#M9358</link>
      <description>&lt;P&gt;Thank you! It works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Felix&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 09:48:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/ROS-Measure-distance-with-D435/m-p/560606#M9358</guid>
      <dc:creator>FAl</dc:creator>
      <dc:date>2018-01-26T09:48:45Z</dc:date>
    </item>
  </channel>
</rss>

