Skip to content

Commit

Permalink
Merge pull request #3 from pkok/single_identifier
Browse files Browse the repository at this point in the history
Allow user to connect by specifying either GUID or IP address.
  • Loading branch information
miquelmassot committed Oct 30, 2014
2 parents 25f9b73 + 0f9087d commit 12da131
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cfg/AvtVimbaCamera.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ sync_source_enum = gen.enum([ gen.const("GPO", str_t, "GPO", ""),
gen.const("LineIn2", str_t, "LineIn2", "")],"Sync-out signal")

# Name Type Reconfiguration level Description Default Min Max
gen.add("guid", str_t, SensorLevels.RECONFIGURE_CLOSE, "Global Unique ID of camera, XX-XXXXXXXXXX digits","50-0503328910")
gen.add("ip_address", str_t, SensorLevels.RECONFIGURE_CLOSE, "IP of camera, four pairs of two digits separated by points: 192.168.1.3","192.168.3.103")
gen.add("guid", str_t, SensorLevels.RECONFIGURE_CLOSE, "Global Unique ID of camera, XX-XXXXXXXXXX digits","")
gen.add("ip_address", str_t, SensorLevels.RECONFIGURE_CLOSE, "IP of camera, four pairs of two digits separated by points: 192.168.1.3","")
# ROS
gen.add("camera_info_url", str_t, SensorLevels.RECONFIGURE_RUNNING, "Camera calibration URL for this video_mode (uncalibrated if null).","camera_info.yaml")
gen.add("frame_id", str_t, SensorLevels.RECONFIGURE_RUNNING, "The optical camera TF frame set in message headers.", "camera")
Expand Down
3 changes: 3 additions & 0 deletions src/vimba_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ void VimbaROS::start(Config& config) {
// Only guid available
ROS_INFO_STREAM("Trying to open camera by ID: " << guid_str);
vimba_camera_ptr_ = openCamera(guid_str);
} else {
// No identifying info (GUID and IP) are available
ROS_ERROR("Can't connect to the camera: at least GUID or IP need to be set.");
}

// Get all cam properties we need for initialization
Expand Down

0 comments on commit 12da131

Please sign in to comment.