User Tools

Site Tools


turtlebot:adventures:sensing102_hints

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
turtlebot:adventures:sensing102_hints [2023/11/07 11:45] – [Checking that Data is Being Published] classesturtlebot:adventures:sensing102_hints [2023/11/28 12:24] (current) classes
Line 1: Line 1:
-==== Connecting to the Kinect Sensor ====+==== Connecting to the Kinect Sensor w/out Color+Depth Registration ====
  
 If you have trouble with subscribing to the depth data or to the linescan data, then it may be that the main publisher needed is not running, or is publishing to another topic.  One fix, found [[http://answers.ros.org/question/112391/nothing-published-to-scan-under-hydro/|here]] indicates that one should disable registration of the depth data to the image: If you have trouble with subscribing to the depth data or to the linescan data, then it may be that the main publisher needed is not running, or is publishing to another topic.  One fix, found [[http://answers.ros.org/question/112391/nothing-published-to-scan-under-hydro/|here]] indicates that one should disable registration of the depth data to the image:
Line 5: Line 5:
 roslaunch turtlebot_bringup 3dsensor.launch depth_registration:=false roslaunch turtlebot_bringup 3dsensor.launch depth_registration:=false
 </code> </code>
 +
 +==== Connecting to the Kinect Sensor with Color+Depth Registration ====
 +
 +The default ``3Dsensor`` launch file for the turtlebot enables depth registration in its fully glory by default.  The amount of computation required to register in real-time overwhelms the laptop, which is why running the ``3Dsensor`` launch with default configuration settings can crash, either right away or eventually.  But, suppose that the color and depth should be registered, then what?  There is an intermediate option.  What causes problems is that depth registration creates a point cloud by default.  Converting an image with 300k+ pixels to a point cloud is time consuming.  That's what is causes problems.
 +
 +The solution is to override the point cloud generation with the following disabling flag:
 +<code>
 +roslaunch turtlebot_bringup 3dsensor.launch enable_pointcloud:=false
 +</code>
 +as inferred from this [[https://stackoverflow.com/questions/57119292/how-to-merge-2-ros-topics-into-1|stack overflow question]].  In my experience, the first time launching failed (lots of red error messages) but the second time succeeded (only yellow warning messages). See if that helps.
 +
 +Why register depth?  If access to the depth for given color pixels is necessary, then registering color and depth images is essential.  Otherwise, the corresponding pixel in the depth image needs to be computed.  That calculation is outside of the scope of the course and more inline with ECE4580.  Registering depth provides two topics that provide color and depth images whos pixels match in terms of information content about the world.  These topics were found to be ``/camera/depth_registered/hw_registered/`` and ``/camera/rgb/image_rect_color`` (at least on the laptop used to confirm functionality).  Visualizing those two image topics and waving your hand infront of the camera should result in the hand being plotted in the same place within the two images.  Doing the same with the raw information would not do so.
  
 ==== Checking that Data is Being Published ==== ==== Checking that Data is Being Published ====
Line 14: Line 26:
 where ''/name/of/topic'' is the image topic to subscribe to and view. where ''/name/of/topic'' is the image topic to subscribe to and view.
  
-It is also possible to use ```rostopic echo``` to view some published topics, but be careful with what topics that is done.  Images are huge and will output a scrolling window full of numbers (that's certainly one way to confirm that the images are streaming).  A laser scan is also kinda big and will also output a scrolling window, but you might be able to make sense of it.+It is also possible to use ''rostopic echo'' to view some published topics, but be careful with what topics that is done.  Images are huge and will output a scrolling window full of numbers (that's certainly one way to confirm that the images are streaming).  A laser scan is also kinda big and will also output a scrolling window, but you might be able to make sense of it.
  
 ==== ROS Basics and Python for Image Topics ==== ==== ROS Basics and Python for Image Topics ====
turtlebot/adventures/sensing102_hints.1699375532.txt.gz · Last modified: 2023/11/07 11:45 by classes