-
1. Re: SR300 SDK on Ubuntu 14.04
MartyG Aug 21, 2017 12:32 AM (in response to RichieLi)First, I will reprint the guide I linked you to in another message for launching RealSense with ROS in an RVIZ environment, as the original message was too old for the forum to display the update on the forum's front page and others may benefit from it.
Running Intel RealSense R200 ROS nodelet and RViz – Robotics. And other stuff too.
I'll also link back to your other message to help other people who are reading this and may wish to offer advice.
Re: Intel Realsense SR300 dynamic configuration in ROS
Regarding your question here: if you are using Ubuntu with an SR300 then Librealsense - which you said that you have already successfully installed in your other message - would be the correct choice.
As you are new to the SR300 and ROS, rather than diving straight into the deep end with depth sensing, I would recommend trying the Librealsense example program cpp-capture first. This displays four boxes on your screen with RGB, depth and IR streams in them.
librealsense/cpp-capture.cpp at master · IntelRealSense/librealsense · GitHub
You can generate pre-built 'binary' versions of the samples that can be run. Although I have not tried it myself, the process is apparently to:
1. Navigate to the root folder of Librealsense
2. Use this instruction:
make && sudo make install
3. You should then be able to find the demos, samples and tests in the folder called /usr / local / bin
-
2. Re: SR300 SDK on Ubuntu 14.04
RichieLi Aug 25, 2017 8:15 AM (in response to MartyG)Hi MartyG,
Thank you for you suggestion, that helps me a lot!
By now, I have tried the example/.cpp-capture. But I still dont know how to use SR300 to do face recognition on ROS, Ubuntu 14.04 system.
Because the released RealSense SDK for face Rcongnition and Tracking is only for Windows, as far as I find out.
So I am not sure whether I can do it on Ubuntu. Can you give me some soggestions?
Thanks a lot,
Ruiqi
-
3. Re: SR300 SDK on Ubuntu 14.04
MartyG Aug 25, 2017 8:26 AM (in response to RichieLi)ROS has a face recognition module, though it seems to be designed for general webcams rather than RealSense specifically. That is not necessarily a problem, since RealSense F200 and SR300 cameras can act as an ordinary RGB webcam too.
-
4. Re: SR300 SDK on Ubuntu 14.04
RichieLi Sep 12, 2017 2:20 AM (in response to MartyG)Thanks a lot, Marty!
Sorry for replying late because the system miscategorized this email as a spam so I did not find it until today I clear my mailbox.And may I ask you another question?
I have successfully run RViz to detect depth image by using SR300 camera. But I really don't know how to export the depth image data to a file(like distance, pixels, height, width...)
Do you have any suggestion?
Best regards,
Ruiqi
-
5. Re: SR300 SDK on Ubuntu 14.04
MartyG Sep 12, 2017 3:12 AM (in response to RichieLi)If you are using Librealsense, your main option for exporting RealSense data to a file is likely to be to create a .mat format file in conjunction with OpenCV.
-
6. Re: SR300 SDK on Ubuntu 14.04
RichieLi Sep 12, 2017 4:58 AM (in response to MartyG)Thanks. I do think OpenCV mat is enough for me since I can put it straightly into OpenCV model and run the models.
And the key point is, how can I get the OpenCV mat? By now, what I have is only show depth image on RViz but I have no idea how to see the image data behind the image.
So could you please give me some suggestions?
-
7. Re: SR300 SDK on Ubuntu 14.04
MartyG Sep 12, 2017 5:48 AM (in response to RichieLi)Apologies for the delay in responding. It is difficult to find easy to understand resources about converting a RealSense image to OpenCV .mat. In previous discussions about OpenCV mat, the link below has been recommended more than once as an easy introduction, and has a link to a YouTube tutorial .
-
8. Re: SR300 SDK on Ubuntu 14.04
RichieLi Sep 12, 2017 6:52 AM (in response to MartyG)Thank you for the reply.
Just saw the video, does the rviz on ROS only can present a visualization of the depth image? It means there is no way to connect rviz with OpenCV mat and what I can only do is just forget the rviz and use other ways like C++ code to get depth image data.
Is what I think right?
-
9. Re: SR300 SDK on Ubuntu 14.04
MartyG Sep 12, 2017 7:15 AM (in response to RichieLi)Rviz is a topic that is largely outside of my knowledge. You may find some useful insight in this document though that discusses its use with RealSense.
It is formatted as one long web page, so to find the RealSense section with the Rviz info quickly, do a page find for the world 'realsense'.
Here's an image grab from the RealSense section for your easy reference
-
10. Re: SR300 SDK on Ubuntu 14.04
RichieLi Sep 12, 2017 7:20 AM (in response to MartyG)Thanks a lot.
I will try it.
-
11. Re: SR300 SDK on Ubuntu 14.04
RichieLi Sep 15, 2017 7:32 PM (in response to MartyG)Hi Marty,
Thank you for your suggestion. I have tried and another problem raised, how can I save the depth image captured by the real sense camera SR300 to my local file? Also, how to take photos using real sense camera since it is like for video?
Regards,
Richie
-
12. Re: SR300 SDK on Ubuntu 14.04
MartyG Sep 16, 2017 12:05 AM (in response to RichieLi)Regarding recording to a local file, please see this page.
The new SR300-compatible RealSense SDK 2.0 that was released this week also has record and playback built into it.
GitHub - IntelRealSense/librealsense at development
Regarding taking a static snapshot, this Librealsense tutorial may help.
-
13. Re: SR300 SDK on Ubuntu 14.04
RichieLi Sep 16, 2017 12:20 AM (in response to MartyG)Thank you, Marty.
It seems that most of the code is written in C++. Is there any function or library in Python can do the data export work? Export the image captured by real sense camera as jpg or some other image files.
-
14. Re: SR300 SDK on Ubuntu 14.04
MartyG Sep 16, 2017 1:33 AM (in response to RichieLi)I am not aware of a specific Python function for RealSense data export. You can though use Python with Librealsense in general using the Pyrealsense wrapper. It comes with an example for capturing still color with matplotlib.
GitHub - toinsson/pyrealsense: Cross-platform ctypes/Cython wrapper to the librealsense library -