Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to connect by specifying either GUID or IP address. #3

Merged
merged 1 commit into from
Oct 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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