Skip to content

Basler cameras

Requirements

Make sure to add also the Vision Module component to your component setup. This is required to show the camera image in the drag&bot Studio and perform the calibration.

Requirements

Any pylon 5 or higher Basler compatible camera is required. Although all models are theoretically supported, tests where made with the models acA1440-73gm, daA1600-60uc and acA2440-35um. In case of doubt, please contact support@dragandbot.com us to know if an specific camera model is supported.

For ethernet cameras it may be required an ethernet power injector. Using an ethernet switch would be recommended to allow adding more ethernet hardware components to the IPC in the future.

1. Installation

Basler provides two types of ROS compatible cameras:

  • USB Cameras
  • Ethernet Cameras

Cameras can be physically attached at the robot flange or statically attached to the cell. In case of the camera attached to the flange, we recommend that they are pointing in the same direction as the Z component of the tool transformation.

1.1. USB cameras installation

USB cameras

The USB cameras work plug-and-play. Just connect the camera to any USB port. We suggest using an available USB 3.0 port in order to achieve maximal transfer speed and therefore better framerate.

1.2. Ethernet cameras installation

Ethernet cameras

  1. Connect the ethernet cable from the camera to the power injector. Please be sure that the power injector is powered.
  2. Connect a second ethernet cable from the power injector directly to a ethernet port at the IPC or to an ethernet switch.
  3. Configure the IP address of your network adapter and your camera. Generally, there are two approaches to configuring a network adapter: "Fixed IP Address" or "DHCP / Auto IP (LLA) sometimes also referred to as APIPA (Automatic Private IP Addressing)".

We strongly recommend to change the camera to a fix IP in the range of other ethernet components (e.g. robot ip) as it is explained in Change IP from Linux section.

Camera IP can be configured from Windows PC or from a Linux PC (e.g. drag&bot IPC). For advance configuration details please refer to the Basler website.

1.2.1. Fast configuration from Linux

You have two options, connect the camera directly to the IPC or through a network switch.

Option 1: direct
  1. Connect the Basler ethernet cable directly from the power injector to a free ethernet port.
  2. Create a new configuration with a fix IP inside the range starting from 169.254.0.0 to 169.254.255.255 and with a netmask of 255.255.0.0. IP config step 1 IP config step 2 IP config step 3
  3. Restart drag&bot Runtime after network configuration.
  4. Open the Camera Tab in the Operators panel. The camera image should now be shown.
Option 2: through switch

If you have connected the IPC to a switch you can create a second IP using the same ethernet port.

  1. Follow the steps 1-2 in the Option 1.
  2. Afterwards you need to click Add to add a second line of Address and Netmask. II config step 4
  3. Please be sure for both IPs the netmask is 255.255.0.0 (16) and they don't collide in range.
  4. Restart drag&bot Runtime after network configuration.
  5. Open the Camera Tab in the Operators panel. The camera image should now be shown.

1.2.2. Change IP from Linux (Advance configuration)

You need to install the Pylon Suite in order to change the IP address. You can download the debian package from:

After downloading the software follow these steps:

  1. Double click to start installation.
  2. Please click Install Ethernet cameras
  3. Write the computer password when requested (typically: dragandbot) .

After the installation two applications will be available:

  • pylon Viewer
  • pylon IP Configurator

After following 1.2.1. Fast configuration from Linux section, you will be able to change the IP address of the camera through pylon IP Configurator Basler application which will be installed in your Linux (Ubuntu) system. Yo can change the ip and the mask to the same range you are using with other devices. This will enable using the camera through a network switch.

IP camera config step 1 IP camera config step 2 IP camera config step 3

Note

After changing the IP to a new range the program will be unresponsive. This means the IP was changed and therefore the current connection breaks. Then you will need to change your computer IP range to connect to the camera again.

The Basler component inside drag&bot will discover any camera IP in range automatically and therefore Running will be displayed after network restart / drag&bot Runtime restart.

Basler component running IP camera config step 4

1.2.3. Advance configuration from Windows

To configure your network adapter, please follow the procedure described in chapter "Installing a GigE Camera" of the current Install and Setup Guide for Cameras Used with pylon for Windows.

To change your camera’s IP configuration, you can use the pylon IP Configurator. This tool was automatically installed when you installed the pylon Viewer and selected the GigE interface. Detailed information about using the IP Configuration Tool can also be found in the "Installation Guide" mentioned above.

2. Basler component configuration

Once the camera is detected the component will display Running in the drag&bot Component-Manager. There are two configuration parameters available:

  • Startup user set: The profile of camera configuration which will be loaded at the component start.
  • MTU parameter. Advance configuration parameter. Please don't change it unless you are an expert.

Basler component running

3. Camera control panel

Once the camera is up and running a new wizard will be available in the Operator Panel together with Robot, Gripper, etc. The camera configuration can be modified from this panel. The current picture will be also live displayed. Please read the tool tips directly available in the panel for further usage information.

Basler camera operator panel below are a short description of the basler control panel parameters, for more details refer to your Basler camera manual.

Important

The deactivated features in the camera Control Panel means that your camera is not supporting them.

Image Tab

01

Parameters Description
Brightness
  • In order to have a specific brightness value, you need to activate the Auto exposure or/and Auto gain.
  • When you try to set a new brightness value, the camera will search the exposure range/gain range (based on which is activated) to find the exposure/gain value that can provide the targeted brightness then the exposure/gain value will be changed based on that.
  • Please note that the new setted brightness can be guarantee for the environment condition when it was setted, any change in the environment condition (such as lights, position of the camera,...etc) will leads to change the brightness value.
  • Setting new brightness, usually take few seconds as it's including the exposure/gain range checking.
Continuous brightness
  • This feature will activated the continuous brightness value checking, so the camera will continuous change the exposure/gain values in order to keep a fix brightness.
  • Activating this feature can effect negatively the picture frame rate.
Auto exposure
  • Automatically adjusts the exposure time within specified limits until a target brightness has been reached.
  • The Exposure Time specifies how long the image sensor is exposed to light during image acquisition.
Auto gain
  • Automatically adjusts the gain within specified limits until a target brightness value has been reached.
  • Increasing the gain will increases all pixel values of the image.
Exposure
  • Specifies how long the image sensor is exposed to light during image acquisition.
  • Changing of this value will leads to change the Brightness value.
  • The Gain Auto auto function must be set to Off. Otherwise, setting the gain has no effect
Gain
  • Increasing the gain will increases all pixel values of the image.
  • Changing of this value will leads to change the Brightness value.
  • The Gain Auto auto function must be set to Off. Otherwise, setting the gain has no effect
Black Level
  • Allows you to change the overall brightness of an image by changing the gray values of the pixels by a specified amount.
  • The minimum black level setting is 0. The maximum setting depends on the camera model.
Gamma
  • Allows you to optimize the brightness of acquired images for display on a monitor.
  • For best results, set the black level to 0 (zero) before you adjust gamma.
  • Gamma = 1: The overall brightness remains unchanged.
  • Gamma < 1: The overall brightness increases.
  • Gamma > 1: The overall brightness decreases.
  • The parameter's value range is 0 to ≈4. (depends on the camera model)
Reverse X
  • Allow you to mirror acquired images horizontally.
  • Reverse X is available on all camera models.
Reverse Y
  • Allow you to mirror acquired images vertically.
  • Reverse Y is available on selected camera models.
Sleeping Stop publishing the Image as far as its activate.
Pixel format
  • Allows you to choose the format of the image data transmitted by the camera.
  • There are different pixel formats depending on the model of your camera and whether it is a color or a mono camera.
  • Changing the pixel format will leads to stop the image grabbing and start it after few seconds.
  • Only ROS supported formats can be selected, selection of non ROS supported format will leads to automatically selecting Mono8 or RGB8 as a drop down depends on your camera model.

Qualit control Tab

02

Parameters Description
PGI Mode
  • Allows you to optimize the quality of your images.
  • The main purpose of the PGI feature set is to optimize images to meet the needs of human vision. It combines up to four image optimization processes (Noise Reduction, Improved Sharpness, and Demosaicing).
Demosaicing
  • 5×5 demosaicing (also called "debayering") carries out color interpolation on regions of 5×5 pixels on the sensor and is therefore more elaborate than the "simple" 2×2 demosaicing used otherwise by the camera.
  • Will be activated (if available) when the PGI mode is active.
Noise reduction
  • The noise reduction (also called "denoising") reduces random variations in brightness or color information in your images.
  • Will be activated (if available) when the PGI mode is active.
Sharpness
  • This optimization increases the sharpness of the images. The higher the sharpness, the more distinct the contours of the image objects will be. This is especially useful in applications where cameras must correctly identify numbers or letters.
  • Will be activated (if available) when the PGI mode is active.
Light source preset Allows you to correct color shifts caused by certain light sources.
Balance white auto Automatically corrects color shifts in images acquired.

Acquisition Tab

03

Parameters Description
Sensor readout mode
  • Allows you to choose between sensor readout modes that provide different sensor readout times.
  • Decreasing the sensor readout time can increase the camera's frame rate.
  • Option Normal: The readout time for each row of pixels remains unchanged.
  • Option Fast: The readout time for each row of pixels is reduced, compared to normal readout. Accordingly, the overall sensor readout time is reduced and the camera can operate at higher frame rates. This can, however, result in reduced image quality.
Acquisition frame count The number of images per camera trigger (Refer to Trigger selector : AcquisitionStart)
Trigger selector
  • Allows you to select the trigger type, once selected, you can use the trigger type for a number of camera configuration tasks, e.g., enabling hardware triggering.
  • Option FrameStart : is used to start the acquisition of a single image. Every time the camera receives a Frame Start trigger signal, the camera starts the acquisition of exactly one image.
  • Option AcquisitionStart : start the acquisition of a series of images (a "burst" of images). Every time the camera successfully receives a Frame Burst Start trigger signal, the camera starts the acquisition of a series of images (specified in Acquisition frame count).
Trigger mode
  • When active, the driver continuously generate and send a software trigger signals to the camera.
  • When deactivate, the free run mode of the camera (in case of trigger source = software) will be activated, in this mode the camera generate its trigger signal automatically.
Trigger source
  • Allows you to configure how the currently selected trigger can be triggered.
  • Options Line1, Line2, Line3, Line4: If available, the trigger selected can be triggered by applying an electrical signal to I/O line 1, 2, 3, or 4.
  • If the I/O line is a GPIO line, the line must be configured for input.
Trigger Activation
  • Allows you to specify whether a trigger becomes active when the trigger signal rises or when it falls.
  • This feature has effect when the Trigger source sets to hardware triggering.
Trigger delay
  • Allows you to add a delay between the receipt of a hardware trigger signal or an action command signal and the moment the trigger becomes active.
  • The minimum value is 0 μs (no delay). The maximum value is 1,000,000 μs (1 s).
Generate software trigger Allows you to trigger the camera by executing a software command.
Start grabbing Start the image grapping.
Stop grabbing Stop the image grabbing.

Important

Changing of some camera parameters will required to manually stop the image grabbing Stop grabbing , change the parameter(s), then start image grabbing Start grabbing

ROI Tab

04

Parameters Description
ROI
  • Allows you to specify the part of the sensor array that you want to use for image acquisition.
  • ROI is short for region of interest (formerly AOI = area of interest).
  • If an image ROI has been specified, the camera will only transmit pixel data from within that region. On most cameras, this increases the camera's maximum frame rate significantly.
  • Use the following parameters to specify the size of the image ROI: Width, Height.
  • Use the following parameters to specify the position of the image ROI: OffsetX, OffsetY.
  • The origin of the image ROI is in the top left corner of the sensor array (column 0, row 0).
Offset X Specify the X position of the image ROI
Offset Y Specify the Y position of the image ROI
Width Specify the width size of the image ROI
Height Specify the height size of the image ROI

Important

The ROI parameters (Offset X, Offset Y, Width, and Height) are setted all as a one parameter group.

User Tab

05

Parameters Description
User selector
  • Allows you to save or load camera settings into user sets.
  • Options User Set 1, User Set2, and User Set 3 support the saving and loading of the camera settings.
  • Other options : allow the load of the camera setting only.
  • Initially, the user sets (User Set 1, User Set2, and User Set 3) contain the same parameter values as the Default user set. You can overwrite those values with your own settings to create a user set that is customized for your application.
Load Allow you to load camera parameters that are stored in the selected user selector
Save Allow you to save the current camera parameters to a user set, work only in case of User Set 1, User Set2, and User Set 3