Skip to content

Use realsense camera

jianqiaol edited this page Mar 3, 2016 · 4 revisions

To use realsense camera, you need two workstations: W1 running windows and W2 running Ubuntu. You need to plug the camera into USB 3.0 port(it has an extra "SS" label) on W1 and use it as a server to broadcast data, which can be received on W2. The reason for doing this is that the driver gives us a good match between RGB and depth data only works on windows.

Note: I was able to use workstation 1,2,3 and 5 as W1. Somehow the realsense camera doesn't work on workstation 4. But you can use any one as W2.

On W1:

1.There is a RealSenseService application on your desktop. Right click it and chose properties to check the IP setting, as shown below:

The structure is tcp://IPaddress:Port. Port can be set to any number you like, but we use 3457 as default. You can check your IP address by run "ipconfig" in a terminal (cmd on windows). It should be 10.236.XX.XXX.

2.After you check the IP setting, you can double click it. If you are lucky, you should see something like this:

This means everything is working. However, it is very likely(>50%) that you get some error like "Failed to locate any video stream". Somehow the USB connection is not very stable for realsense camera. The way to solve this is just unplug and plug the camera again, or use another USB 3.0 port, or switch to another workstation... Sometimes you just need to wait for a few minutes and it will just work. Be patient.

On W2:

1.Open a terminal, run

$ roscore

This will start ros system and get it ready to receive data.

2.Open a new terminal, run

$ cd ece490-s2016/common
$ ./Realsense_ROS_Emitter tcp://10.236.xx.xxx:3457 realsense

Here the IP address should be the IP for W1. Now you should see the terminal showing a lot of "Read rate:xxxmb/s, xxx images/s".

3.Open a new terminal, run

$ rostopic list

You should see /realsense/depth, /realsense/pc,/realsense/rgb. These are the topics you can use from realsense camera. For example, if you want to see the point cloud, run

$ rosrun rviz rviz

This will open an application that can display data from realsense. When you first open it, you need to add pointcloud2 as shown below:

After add that, choose /realsense/pc at Topic and change Fixed Frame to "realsense". Now you should see the point cloud!