[Documentation] [TitleIndex] [WordIndex

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Configuring the Prosilica GigE for the PR2

Description: This tutorial covers configuring the Prosilica camera for a PR2 and viewing images.

Keywords: prosilica, PR2, configuration

Tutorial Level: BEGINNER

Compiling

Start by getting the dependencies and compiling the driver.

$ rosdep install prosilica_camera image_view
$ rosmake prosilica_camera image_view

Camera Preliminaries (things you do only once for each camera)

This section is for brand-new, just-out-of-the-box cameras. Cameras on PR2s should already be configured correctly.

Set the IP address

The camera must be given a fixed IP address so we can find it over the PR2 ethernet network. First power on the camera and connect it to any computer. Wait for both the green and orange LEDs on the camera ethernet port to stay lit. [Note: if you are reconfiguring a camera which has already been given a fixed IP address, connecting through a hub will not work. You will need to connect the camera to a dedicated ethernet port. See Host Computer Configuration.]

Run ListCameras to make sure the camera is visible. ListCameras will repeatedly discover cameras on the network until you exit with Ctrl-C.

$ rosrun prosilica_gige_sdk ListCameras

The ROS launch scripts expect to find the camera at address 10.68.X.20, where X is the subnet of the robot. We'll assume our robot has IP address 10.68.0.2, so our camera should have address 10.68.0.20. Configure the camera using this command, substituting the desired IP address:

$ rosrun prosilica_camera set_ip 10.68.0.20

Now let's verify success. Since we have just changed the IP address of the camera, if you are using a non-robot host computer you will probably need to add an alias to the new subnet of the camera as described in Host Computer Configuration.

The camera may no longer be visible to ListCameras, so we will ping it directly:

$ rosrun prosilica_gige_sdk Ping 10.68.0.20

If you instead see:

$ rosrun prosilica_gige_sdk Ping 10.68.0.20

something has gone wrong, and you should ask Patrick.

Save pr2-specific settings

While exposing, the camera must send a sync signal to inhibit the stereo light projector. This step ensures that the camera always powers on with the proper settings to do so.

Configure the camera using this command, substituting the IP address from the previous step:

$ rosrun prosilica_camera set_inhibition 10.68.0.20

Host Computer Configuration

If you connect the camera to a non-robot host computer, you will need to configure the computer's network stack so that it can find the camera.

Shared Ethernet Port

Use these instructions if you are using the same ethernet interface to communicate with the camera and with another network. (For example, your desktop computer is connected to a hub that is connected to the LAN and to the camera.)

Figure out which network interface the camera is connected to (ifconfig or route may help). In this example we will assume that the camera is connected to eth0.

Create an alias through which the camera's IP address can be accessed:

$ sudo ifconfig eth0:0 10.68.X.99 netmask 255.255.255.0

You should now be able to ping the camera as described above.

Dedicated Ethernet Port

Figure out which interface the camera is connected to. In this example, it is connected to eth1.

Setup the interface so that it can communicate with the camera:

$ sudo ifconfig eth1 10.68.X.99 netmask 255.255.255.0

You should now be able to ping the camera as described above.

Software Bringup

To start the Prosilica camera node in continuous mode, create the launch file below using the prosilica IP:

Viewing Images

To view images coming from the camera:

$ rosrun image_view image_view image:=/prosilica/image_raw


2019-11-09 13:06