IntelRealSense / realsense-ros

ROS Wrapper for Intel(R) RealSense(TM) Cameras
http://wiki.ros.org/RealSense
Apache License 2.0
2.57k stars 1.76k forks source link

catkin_make clean Realsense-ros on Windows 10 PC Issues #1366

Closed mjs513 closed 4 years ago

mjs513 commented 4 years ago

First let me start off by saying I am a real noob at ROS as well as the D435 camera that I just got :)

I managed to install ROS-noetic for windows 10 and verified that it runs on my windows 10 machine. Then following the instruction for method 2 catkin_make clean exits with the following errors:

  Could not find a package configuration file provided by "realsense2" with
  any of the following names:

    realsense2Config.cmake
    realsense2-config.cmake

  Add the installation prefix of "realsense2" to CMAKE_PREFIX_PATH or set
  "realsense2_DIR" to a directory containing one of the above files.  If
  "realsense2" provides a separate development package or SDK, be sure it has
  been installed.

-- Configuring incomplete, errors occurred!
See also "C:/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "C:/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

I am attaching the output files from CMAKE for reference. Any help would be appreciated since I have no idea.

CMakeError.log

CMakeOutput.log

EDIT: Could not run this command on windows: git checkout git tag | sort -V | grep -P "^\d+\.\d+\.\d+" | tail -1 Windows does not have a grep function

MartyG-RealSense commented 4 years ago

Hi @mjs513 Let's go through the Windows installation steps as I interpret them from the instructions. I went through the process below step by step myself to confirm it after I had written the guide. I had success most of the way but was halted at the same problem that you experienced.

  1. Have you got Git installed on Windows, please?

https://www.atlassian.com/git/tutorials/install-git#windows

  1. Can you confirm please that you have successfully built Intel RealSense SDK 2.0 and have been able to test that it is working (for example, by running the RealSense Viewer program).

  2. If RealSense SDK 2,0 is working, move on to installing the RealSense ROS wrapper. First, create a catkin workspace on Windows using the commands below:

mkdir c:\catkin_ws\src cd c:\catkin_ws\src

These are Windows Command Prompt terminal window commands. The Command Prompt interface can be found by typing command into the text box at the bottom of the Windows screen, next to the button in the corner where the computer is shut down.

  1. Clone dynamic_reconfigure into your catkin_ws/src/ workspace on Windows. It can be done like this:

git clone https://github.com/pal-robotics/ddynamic_reconfigure.git

  1. Whilst in the folder c:\catkin_ws\src in the Command Prompt window, clone the RealSense ROS wrapper into this src folder:

git clone https://github.com/IntelRealSense/realsense-ros.git

At this point I encountered the same problem as you - that grep was not recognised when entering the further commands below:

cd realsense-ros/ git checkout git tag | sort -V | grep -P "^\d+\.\d+\.\d+" | tail -1 cd ..

The git checkout instruction seems to be an important command but I could not find any way around the problem on Windows. I will tag the RealSense ROS developer into this discussion to seek their advice.

@doronhi Do you have any ideas about how to handle 'grep' during a Windows installation of the ROS wrapper, please?

mjs513 commented 4 years ago

Hi @MartyG-RealSense Thanks for getting back to me so fast on this. In answer to your questions:

  1. GIT: Am assuming I have git installed since git clone is working but I also just ran a git --version command and got back: git version 2.28.0.windows.1
  2. _Can you confirm please that you have successfully built Intel RealSense SDK 2.0 and have been able to test that it is working (for example, by running the RealSense Viewer program)._ ok not sure what you mean by built SDK 2.0. I have it downloaded to my "c" drive at C:\Program Files (x86)\Intel RealSense SDK 2.0. In tools there is a RealsenseView.exe that runs. So any help here would be good on how to "BUILD" it. Wasn't clear on to install the SDK for ROS purposes. Samples work fine using VisualStudio 2019.
  3. Steps 3, 4 and 4: Did that exactly and thats where I ran into a problem.

Guess in the meantime while we wait for grep resolution I can figure out the SDK Build process

Thanks for your help Mike

MartyG-RealSense commented 4 years ago
  1. It sounds as though you have Git installed successfully.

  2. There are various ways to build RealSense SDK 2.0 (librealsense), including the 791 MB Intel.RealSense.SDK-WIN10-2.37.0.2094.exe Windows installer from the Assets file list on the SDK's Releases page. That is the easiest way to install the RealSense SDK.

https://github.com/IntelRealSense/librealsense/releases/tag/v2.37.0

It is important to match a particular version of the RealSense ROS wrapper with a particular version of the RealSense SDK. At the time of writing this, the most recent version of the ROS wrapper is 2.2.16:

https://github.com/IntelRealSense/realsense-ros/releases/tag/2.2.16

It is recommended that version 2.37.0 specifically of the RealSense SDK is used with this ROS wrapper version. That is why I linked to 2.37.0 above, even though it is not the latest SDK version now.

Once you have SDK 2.37.0 installed first, then ideally ROS wrapper 2.16.0 should be installed secondly.

While waiting for further advice about the ROS wrapper from @doronhi - if you are a new user of the RealSense camera then you can learn a lot by playing with the RealSense Viewer software that the RealSense SDK installs. A launch icon for it should be placed on your Windows desktop when installation of the SDK is complete.

mjs513 commented 4 years ago

Hi Marty So I did download and install Intel.RealSense.SDK-WIN10-2.37.0.2094.exe and installed so at least it sounds like I got that part right. Just verified that with the exe that I used to install the SDK. So that looks like its installed. And believe I have 2.16.0 wrapper as well

As for playing with the D435 that is exactly what I was doing and changing parameters to see it effect. Biggest thing is getting use to looking at it in a 3D view vs. a 2D view.

Ultimate goal to place it on a Rover and use it for mapping and obstacle avoidance.

MartyG-RealSense commented 4 years ago

It sounds as though you have SLAM navigation in mind for your project. There are some non-ROS options for achieving that. This includes MIT SPARK Lab's Kimera system.

https://github.com/MIT-SPARK/Kimera-VIO

It also has a ROS-enabled version if you decide to carry on down the ROS path:

https://github.com/MIT-SPARK/Kimera-VIO-ROS

MartyG-RealSense commented 4 years ago

It may also be worth looking at Intel's ros_object_analytics ROS package, which can provide both collision avoidance and semantic SLAM.

https://github.com/intel/ros_object_analytics

mjs513 commented 4 years ago

See that the first reference to Kimera is based a relatively new approach (2020), will take a bit of time to read the associated paper but seems to be rather involved process and resource intensive.

The ros_object_analytics package is interesting - just have to translate to get it working on ROS for windows. Think most of the steps are similar to realsense-camera.

What I have been looking at, that got me started was to implement a VFH 3d+, that uses octomap and VFH+: https://github.com/saifullah3396/vfh3d.

MartyG-RealSense commented 4 years ago

Intel's white-paper document on improving depth sensing quality on drones does state that using depth data with a spatial mapping library can be a way to increase the robustness of depth data against "outliers" that cause wrong depth readings and cites octomap as a good starting point.

https://dev.intelrealsense.com/docs/depth-map-improvements-for-stereo-based-depth-cameras-on-drones#section-vii-limitations-and-outlook

Another approach to collision avoidance that you could look at is PX4, which has been used with flight drones for years as a flight controller.

https://px4.io/

https://github.com/PX4

Its 'local planner' system also makes use of VFH+ and its 'global planner' makes use of octomap, according to the avoidance section of its GitHub.

https://github.com/PX4/avoidance

mjs513 commented 4 years ago

@MartyG-RealSense You really are a wealth of information with this stuff. Thank you. Made me do a bit more looking. I came across a few more references along the lines of PX4 implementation:

Intel RealSense Depth Camera on ardupilot: https://ardupilot.org/copter/docs//common-realsense-depth-camera.html

and the second with 3dvfh+ on the PX4: https://github.com/ArduPilot/OctomapPlanner/issues/9

MartyG-RealSense commented 4 years ago

You are very welcome. Yes, Ardupilot is another controller that has been used with RealSense-equipped drones. The Ardupilot website has a tutorial on doing obstacle avoidance with RealSense and Python.

https://ardupilot.org/rover/docs/common-realsense-depth-camera.html

MartyG-RealSense commented 4 years ago

Hi @mjs513 Do you require further assistance with this case, please? Thanks!

mjs513 commented 4 years ago

Hi @MartyG-RealSense Kind of gave up getting it working on Windows. So I picked up a Raspberry Pi4 and got librealsense built and able to run realsense viewer without an issue following the instructions from here: https://github.com/acrobotic/Ai_Demos_RPi/wiki/Raspberry-Pi-4-and-Intel-RealSense-D435

But now when i try to install realsense2-camera using sudo apt-get install ros-$ROS_VER-realsense2-camera i get the error: E: Unable to locate package ros-melodic-realsense2-camera.

MartyG-RealSense commented 4 years ago

Installing the ROS wrapper on Raspbian can be problematic. It is likely to be easier if using Ubuntu Server as the OS on the Pi 4.

https://support.intelrealsense.com/hc/en-us/community/posts/360050092674

If you prefer to use Raspbian, eleccelerator offer guidance about installing the ROS wrapper on Pi 4 and Raspbian Buster.

https://eleccelerator.com/wiki/index.php?title=Raspbian_Buster_ROS_RealSense#Installing_ROS_Package:_realsense-ros

mjs513 commented 4 years ago

Thanks @MartyG-RealSense will probably convert to unbuntu to see if I can get it working.

mjs513 commented 4 years ago

Evening @MartyG-RealSense Tried ubuntu 20.04 on the Pi4 (couldn't get 18.04 installed) but no luck. I did get realsense-viewer working but the performance was terrible and 3d would not work. So spent the day putting back in BUster and using your reference installing realsense ros on the pi4. Still executing the last step but looks like it will work. May have to redo librealsense.

After it finishes will roslauch realsense camera work? or do I have to do something else

mjs513 commented 4 years ago

Ok - knew i couldn't get away with it working out of the box. Get through everything and ran roslauch realsense camera. It started but I am getting this error:

[ERROR] [1600826462.700901636]: An error has occurred during frame callback: Time is out of dual 32-bit range

any ideas.

MartyG-RealSense commented 4 years ago

Apologies for the delay in responding further. The Time is out of dual 32-bit range error is one that the RealSense ROS wrapper developer has researched in the past and concluded that the cause was likely something that is outside of the ROS wrapper. So a solution was not found. Below is a link to a case where this error also occurs with a Pi and Raspbian:

https://github.com/IntelRealSense/realsense-ros/issues/1178

The experience I have with RealSense users' cases involving installing wrappers such as ROS and Python with Pi 4 and Raspian Buster is that it can be problematic, and using Ubuntu Server as the Pi's OS may make things more straightforward.

mjs513 commented 4 years ago

Sorry for the delay in response was working on installing Ubuntu 18.05 LTS plus following the instructions on github. No joy. When I install realsense SDK it installs 2.35.1 and only the 2d stereo view works. Also if i check for Ros dep nothing shows up for /camera. Pretty much a bust on the PI4

Going to go ahead and close this.

MartyG-RealSense commented 4 years ago

Sorry to hear that you were not successful. I researched the Time is out of dual 32-bit range error again and did find a recent case where using the roslaunch term enable_sync:=true worked for one respondent.

https://answers.ros.org/question/350467/intel-realsense-time-is-out-of-dual-32-bit-range/

doronhi commented 4 years ago

I remembered @MartyG-RealSense referencing this issue once, with 1 link to my investigating and another to a possible solution. Check also this link: https://github.com/IntelRealSense/realsense-ros/issues/1284#issuecomment-658146832

mjs513 commented 4 years ago

Thanks guys for the response but i decided to try another approach in the mean time - but may go back and try the approach that gave me the time synch issue. Here is my latest (dont know if you want me to open up another PR):

  1. Installed the SDK (2.38) using the Linux Installation instructions: https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md. However while I do get the streams for both modes it does throw errors to the console: a. On startup of realsense-viewer i get the following: 24/09 15:07:09,660 WARNING [281472609100224] (backend-v4l2.cpp:1269) Pixel format 36315752-1a66-a242-9065-d01814a likely requires patch for fourcc code RW16! b. When i turn on the RGB camera stream works c, Turning off RGB and putting it into stereo mode in 2D works without further erros. d. Putting into 3D mode with Stereo I get the following:
    24/09 15:12:07,907 ERROR [281472158134720] (synthetic-stream.cpp:48) Exception was thrown during user processing callback: Out of frame resources!
    24/09 15:12:07,908 ERROR [281472158134720] (synthetic-stream.cpp:48) Exception was thrown during user processing callback: Error occured during execution of the processing block! See the log for more info
    24/09 15:12:07,956 ERROR [281472158134720] (synthetic-stream.cpp:48) Exception was thrown during user processing callback: Out of frame resources!

    Now if I install realsense-ros using Method 1 for Ubuntu and start up with: roslaunch realsense2_camera rs_camera.launch I get a series of errors repeated:

    24/09 11:47:04,282 WARNING [281473131196800] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
    24/09 11:47:04,441 WARNING [281473131196800] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61

    Now if i try looking at whats published only thing i see published is camera-info and raw-image. I was looking at this PR: https://github.com/IntelRealSense/realsense-ros/issues/1271

But it doesn't look like the resolved the issue with depth or point cloud?

Was going to try building the wrapper as opposed to apt-get install.

mjs513 commented 4 years ago

Just by way of update I fixed the first issue with the errors when running viewer: Had to edit config.txt to set kms for opengl and i increased the GPU mem to 128. But I still get the Pixel format 36315752-1a66-a242-9065-d01814a likely requires patch for fourcc code RW16!

EDIT: Heres the whole log for the second issue:

... logging to /home/ubuntu/.ros/log/651452e4-feaa-11ea-981d-dca632bd9293/roslaunch-ubuntu-4637.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubuntu:41693/

SUMMARY
========

PARAMETERS
 * /camera/realsense2_camera/accel_fps: 250
 * /camera/realsense2_camera/accel_frame_id: camera_accel_frame
 * /camera/realsense2_camera/accel_optical_frame_id: camera_accel_opti...
 * /camera/realsense2_camera/align_depth: False
 * /camera/realsense2_camera/aligned_depth_to_color_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_fisheye_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra1_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/aligned_depth_to_infra2_frame_id: camera_aligned_de...
 * /camera/realsense2_camera/allow_no_texture_points: False
 * /camera/realsense2_camera/base_frame_id: camera_link
 * /camera/realsense2_camera/calib_odom_file: 
 * /camera/realsense2_camera/clip_distance: -2.0
 * /camera/realsense2_camera/color_fps: 30
 * /camera/realsense2_camera/color_frame_id: camera_color_frame
 * /camera/realsense2_camera/color_height: 480
 * /camera/realsense2_camera/color_optical_frame_id: camera_color_opti...
 * /camera/realsense2_camera/color_width: 640
 * /camera/realsense2_camera/depth_fps: 30
 * /camera/realsense2_camera/depth_frame_id: camera_depth_frame
 * /camera/realsense2_camera/depth_height: 480
 * /camera/realsense2_camera/depth_optical_frame_id: camera_depth_opti...
 * /camera/realsense2_camera/depth_width: 640
 * /camera/realsense2_camera/device_type: 
 * /camera/realsense2_camera/enable_accel: False
 * /camera/realsense2_camera/enable_color: True
 * /camera/realsense2_camera/enable_depth: True
 * /camera/realsense2_camera/enable_fisheye1: False
 * /camera/realsense2_camera/enable_fisheye2: False
 * /camera/realsense2_camera/enable_fisheye: False
 * /camera/realsense2_camera/enable_gyro: False
 * /camera/realsense2_camera/enable_infra1: False
 * /camera/realsense2_camera/enable_infra2: False
 * /camera/realsense2_camera/enable_infra: False
 * /camera/realsense2_camera/enable_pointcloud: False
 * /camera/realsense2_camera/enable_pose: False
 * /camera/realsense2_camera/enable_sync: False
 * /camera/realsense2_camera/filters: 
 * /camera/realsense2_camera/fisheye1_frame_id: camera_fisheye1_f...
 * /camera/realsense2_camera/fisheye1_optical_frame_id: camera_fisheye1_o...
 * /camera/realsense2_camera/fisheye2_frame_id: camera_fisheye2_f...
 * /camera/realsense2_camera/fisheye2_optical_frame_id: camera_fisheye2_o...
 * /camera/realsense2_camera/fisheye_fps: 30
 * /camera/realsense2_camera/fisheye_frame_id: camera_fisheye_frame
 * /camera/realsense2_camera/fisheye_height: 480
 * /camera/realsense2_camera/fisheye_optical_frame_id: camera_fisheye_op...
 * /camera/realsense2_camera/fisheye_width: 640
 * /camera/realsense2_camera/gyro_fps: 400
 * /camera/realsense2_camera/gyro_frame_id: camera_gyro_frame
 * /camera/realsense2_camera/gyro_optical_frame_id: camera_gyro_optic...
 * /camera/realsense2_camera/imu_optical_frame_id: camera_imu_optica...
 * /camera/realsense2_camera/infra1_frame_id: camera_infra1_frame
 * /camera/realsense2_camera/infra1_optical_frame_id: camera_infra1_opt...
 * /camera/realsense2_camera/infra2_frame_id: camera_infra2_frame
 * /camera/realsense2_camera/infra2_optical_frame_id: camera_infra2_opt...
 * /camera/realsense2_camera/infra_fps: 30
 * /camera/realsense2_camera/infra_height: 480
 * /camera/realsense2_camera/infra_width: 640
 * /camera/realsense2_camera/initial_reset: False
 * /camera/realsense2_camera/json_file_path: 
 * /camera/realsense2_camera/linear_accel_cov: 0.01
 * /camera/realsense2_camera/odom_frame_id: camera_odom_frame
 * /camera/realsense2_camera/pointcloud_texture_index: 0
 * /camera/realsense2_camera/pointcloud_texture_stream: RS2_STREAM_COLOR
 * /camera/realsense2_camera/pose_frame_id: camera_pose_frame
 * /camera/realsense2_camera/pose_optical_frame_id: camera_pose_optic...
 * /camera/realsense2_camera/publish_odom_tf: True
 * /camera/realsense2_camera/publish_tf: True
 * /camera/realsense2_camera/rosbag_filename: 
 * /camera/realsense2_camera/serial_no: 
 * /camera/realsense2_camera/tf_publish_rate: 0.0
 * /camera/realsense2_camera/topic_odom_in: odom_in
 * /camera/realsense2_camera/unite_imu_method: 
 * /camera/realsense2_camera/usb_port_id: 
 * /rosdistro: melodic
 * /rosversion: 1.14.9

NODES
  /camera/
    realsense2_camera (nodelet/nodelet)
    realsense2_camera_manager (nodelet/nodelet)

ROS_MASTER_URI=http://localhost:11311

process[camera/realsense2_camera_manager-1]: started with pid [4652]
process[camera/realsense2_camera-2]: started with pid [4653]
[ INFO] [1600981854.006229026]: Initializing nodelet with 4 worker threads.
[ INFO] [1600981854.305803603]: RealSense ROS v2.2.16
[ INFO] [1600981854.305901805]: Built with LibRealSense v2.37.0
[ INFO] [1600981854.305985748]: Running with LibRealSense v2.37.0
[ INFO] [1600981854.353822928]:  
[ INFO] [1600981854.785364758]: Device with serial number 935322071561 was found.

[ INFO] [1600981854.785492368]: Device with physical ID 2-2-5 was found.
[ INFO] [1600981854.785537034]: Device with name Intel RealSense D435 was found.
[ INFO] [1600981854.786710148]: Device with port number 2-2 was found.
[ INFO] [1600981854.790988626]: getParameters...
[ INFO] [1600981854.917387252]: setupDevice...
[ INFO] [1600981854.917492288]: JSON file is not provided
[ INFO] [1600981854.917540306]: ROS Node Namespace: camera
[ INFO] [1600981854.917593323]: Device Name: Intel RealSense D435
[ INFO] [1600981854.917641026]: Device Serial No: 935322071561
[ INFO] [1600981854.917685415]: Device physical port: 2-2-5
[ INFO] [1600981854.917730007]: Device FW version: 05.12.07.100
[ INFO] [1600981854.917778488]: Device Product ID: 0x0B07
[ INFO] [1600981854.917826172]: Enable PointCloud: Off
[ INFO] [1600981854.917864116]: Align Depth: Off
[ INFO] [1600981854.917907097]: Sync Mode: Off
[ INFO] [1600981854.918018188]: Device Sensors: 
[ INFO] [1600981854.974063812]: Stereo Module was found.
[ INFO] [1600981855.036507478]: RGB Camera was found.
[ INFO] [1600981855.036697420]: num_filters: 0
[ INFO] [1600981855.036758382]: Setting Dynamic reconfig parameters.
[ INFO] [1600981860.320295837]: Done Setting Dynamic reconfig parameters.
[ INFO] [1600981860.321876167]: depth stream is enabled - width: 640, height: 480, fps: 30, Format: Z16
[ INFO] [1600981860.323268463]: color stream is enabled - width: 640, height: 480, fps: 30, Format: RGB8
[ INFO] [1600981860.323422331]: setupPublishers...
[ INFO] [1600981860.329354917]: Expected frequency for depth = 30.00000
[ INFO] [1600981860.421995118]: Expected frequency for color = 30.00000
[ INFO] [1600981860.490951678]: setupStreams...
[ INFO] [1600981860.595667196]: insert Depth to Stereo Module
[ INFO] [1600981860.595827508]: insert Color to RGB Camera
[ INFO] [1600981860.850445539]: SELECTED BASE:Depth, 0
[ INFO] [1600981860.880829106]: RealSense Node Is Up!
 24/09 21:11:00,976 WARNING [281472275566976] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 24/09 21:11:01,145 WARNING [281472275566976] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 24/09 21:11:01,206 WARNING [281472275566976] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 24/09 21:11:01,267 WARNING [281472275566976] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 24/09 21:11:01,349 WARNING [281472275566976] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61
 24/09 21:11:01,531 WARNING [281472275566976] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61

Something i just noticed the Viewer version says 2.38.1 and the above log shows iBuilt with LibRealSense v2.37.0????

EDIT: RVIZ output:

[ INFO] [1601038052.023568522]: rviz version 1.13.13
[ INFO] [1601038052.023698224]: compiled against Qt version 5.9.5
[ INFO] [1601038052.023734224]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1601038052.038534003]: Forcing OpenGl version 0.
[ INFO] [1601038053.062331196]: Stereo is NOT SUPPORTED
[ INFO] [1601038053.062548046]: OpenGl version: 2.1 (GLSL 1.2).
MartyG-RealSense commented 4 years ago

I cannot see much wrong in the log, other than the control_transfer returned errors at the bottom. Are they continuously generating please (which would indicate a serious communication problem with the device if they were), or are there just that initial several after launch and then no more?

Also, are the depth and color topics being published and viewable in RViz?

mjs513 commented 4 years ago

Looks like only getting it on start of the node - not continuous

Using hz this is what I am seeing

ubuntu@ubuntu:~$ rostopic hz /camera/color/image_raw
subscribed to [/camera/color/image_raw]
average rate: 16.908
    min: 0.048s max: 0.065s std dev: 0.00502s window: 16
average rate: 16.765
    min: 0.048s max: 0.065s std dev: 0.00424s window: 33
average rate: 16.693
    min: 0.048s max: 0.066s std dev: 0.00402s window: 50
average rate: 16.676
    min: 0.048s max: 0.071s std dev: 0.00431s window: 66
^Xaverage rate: 16.643
    min: 0.048s max: 0.071s std dev: 0.00433s window: 83
average rate: 16.642
    min: 0.048s max: 0.071s std dev: 0.00422s window: 100
average rate: 16.637
    min: 0.044s max: 0.078s std dev: 0.00486s window: 116
^Caverage rate: 16.624
    min: 0.044s max: 0.078s std dev: 0.00485s window: 118
ubuntu@ubuntu:~$ rostopic hz /camera/extrinsics/depth_to_color
subscribed to [/camera/extrinsics/depth_to_color]
no new messages
no new messages
no new messages
^Cno new messages
ubuntu@ubuntu:~$ rostopic hz /camera/infra1/image_rect_raw
WARNING: topic [/camera/infra1/image_rect_raw] does not appear to be published yet
^CTraceback (most recent call last):
  File "/opt/ros/melodic/bin/rostopic", line 35, in <module>
    rostopic.rostopicmain()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rostopic/__init__.py", line 2132, in rostopicmain
    _rostopic_cmd_hz(argv)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rostopic/__init__.py", line 1524, in _rostopic_cmd_hz
    use_wtime=options.use_wtime, tcp_nodelay=options.tcp_nodelay)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rostopic/__init__.py", line 315, in _rostopic_hz
    rospy.Subscriber(real_topic, rospy.AnyMsg, rt.callback_hz, callback_args=topic, tcp_nodelay=tcp_nodelay)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 563, in __init__
    super(Subscriber, self).__init__(name, data_class, Registration.SUB)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 131, in __init__
    raise ValueError("topic name is not a non-empty string")
ValueError: topic name is not a non-empty string
ubuntu@ubuntu:~$ rostopic hz /camera/depth/image_rect_raw
subscribed to [/camera/depth/image_rect_raw]
average rate: 29.937
    min: 0.029s max: 0.039s std dev: 0.00282s window: 29
average rate: 30.013
    min: 0.025s max: 0.039s std dev: 0.00288s window: 59
average rate: 30.010
    min: 0.025s max: 0.039s std dev: 0.00298s window: 89
average rate: 30.000
    min: 0.025s max: 0.039s std dev: 0.00298s window: 119
^Caverage rate: 30.016
    min: 0.025s max: 0.040s std dev: 0.00293s window: 142
ubuntu@ubuntu:~$ rostopic hz /camera/extrinsics/depth_to_color
subscribed to [/camera/extrinsics/depth_to_color]
no new messages
no new messages
no new messages
no new messages
^Cno new messages
ubuntu@ubuntu:~$ rostopic hz /camera/color/image_raw
subscribed to [/camera/color/image_raw]
average rate: 16.757
    min: 0.052s max: 0.064s std dev: 0.00365s window: 16
average rate: 16.686
    min: 0.050s max: 0.069s std dev: 0.00405s window: 32
average rate: 16.645
    min: 0.050s max: 0.069s std dev: 0.00401s window: 49
average rate: 16.631
    min: 0.050s max: 0.069s std dev: 0.00398s window: 66
average rate: 16.643
    min: 0.050s max: 0.071s std dev: 0.00417s window: 82
^Caverage rate: 16.622
    min: 0.050s max: 0.071s std dev: 0.00405s window: 92
ubuntu@ubuntu:~$ rostopic hz /camera/depth/camera_info
subscribed to [/camera/depth/camera_info]
average rate: 29.968
    min: 0.030s max: 0.036s std dev: 0.00153s window: 28
average rate: 29.956
    min: 0.030s max: 0.039s std dev: 0.00174s window: 58
average rate: 29.913
    min: 0.028s max: 0.039s std dev: 0.00202s window: 88
^Caverage rate: 29.942
    min: 0.028s max: 0.039s std dev: 0.00213s window: 111
ubuntu@ubuntu:~$ 

Maybe I am doing something wrong with RVIZ

mjs513 commented 4 years ago

Screenshot from 2020-09-25 12-44-14

MartyG-RealSense commented 4 years ago

Does it display if you change Fixed Frame from 'map' to camera_link

mjs513 commented 4 years ago

No image received. Getting that message for camera status warning.

Some debug. Used realsense-viewer to make sure had a good connection before doing roslaunch/rviz. After closing rviz and roslauch windows did a realsense-viewer again and shows no connection.

Seems like it looses the connection along the way.

EDIT: Question = does it matter I am using ROS1?

MartyG-RealSense commented 4 years ago

It would not matter that you are using ROS1, as the RealSense ROS wrapper is fully compatible with ROS1.

After the camera becomes non-detectable, is the camera detection restored if you unplug the camera and plug it back in?

mjs513 commented 4 years ago

Evening @MartyG-RealSense Spent the day getting it working with Raspian-Buster, which it is now working but more on that later) and reread a few things on how rviz works. So went back to the Ubuntu install and repeated the test with RVIZ and it seems to be working, Just my ignorance - sorry, but did learn a lot; Here is a screen shot Screenshot from 2020-09-26 23-12-56

Pretty much seeing the same thing when I run it under Raspian.

Thanks for all your help and you patience.

Mike

PS> enable_sync:=true works to get rid of the time issue when running under Buster..

MartyG-RealSense commented 4 years ago

Thanks so much for the update @mjs513 - it is great to know that there may be a reliable solution for the Time is out of dual 32-bit range error now.

mjs513 commented 4 years ago

@MartyG-RealSense - Proably should document the steps somewhere :) One more question if I may.

How can I see the 2D depth Map with RVIZ? Not sure this is possible. Are there any other Demo's that can be run?

MartyG-RealSense commented 4 years ago

There was a case where a RealSense user published a depth map in RViz, though the process by which it was achieved was not described.

https://github.com/IntelRealSense/realsense-ros/issues/590

There is another case though where a method used to generate a depth map with ROS is described in the opening paragraph.

https://github.com/IntelRealSense/realsense-ros/issues/436

The depth map image generated in this particular case looks like this:

image

Below is a version that I brightened in art software to make it easier to see:

image

mjs513 commented 4 years ago

Morning @MartyG-RealSense Thanks for the references. Spent the day yesterday starting to collect references and techniques for using the D435 for SLAM and Obstacle Avoidance. Now going to take while to go through them all: Going to start with this one and then move on to the next: https://github.com/saifullah3396/vfh3d

Not sure you can answer me on this one since its a catkin question. Since I built everything from src's for libsense I already have the src files plus a devel plus a build directory in my catkin_ws folder. To build another package do i just leave the src alon directory alone and then delete the devel & build folders so I can do the next setup? This is what is in the link above:

cd ~/catkin_ws
catkin_make
source ~/catkin_ws/devel/setup.bash

Just confused on this point?

MartyG-RealSense commented 4 years ago

@mjs513 I will refer this question about catkin to @doronhi who will be able to provide a better answer than I can about this particular subject. Thanks for your patience!

mjs513 commented 4 years ago

@MartyG-RealSense Again - thanks for all your help. Now the real fun begins :)

doronhi commented 4 years ago

Sorry, too abstract for me.

mjs513 commented 4 years ago

@MartyG-RealSense , @doronhi Thanks again for all your help and patience in getting this working for me.

Going to go ahead and close the issue since its kind of been resolved. Maybe I will go back to Windows at some point and give it a try :).

MartyG-RealSense commented 4 years ago

Thanks very much for the update @mjs513 !