File tree Expand file tree Collapse file tree 4 files changed +17
-9
lines changed
include/spinnaker_sdk_camera_driver Expand file tree Collapse file tree 4 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 17
17
devel
18
18
~devel /lib /datacollection_neu /* .xml
19
19
.catkin_workspace
20
+ include /spinnaker_sdk_camera_driver /spinnaker_configure.h
20
21
21
22
# ignore doc/notes.txt, but not doc/server/arch.txt
22
23
# doc/*.txt
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ namespace acquisition {
59
59
// void setTrigMode();
60
60
// void setTriggerOverlapOff();
61
61
62
+ string get_node_value (string node_string);
62
63
string get_id ();
63
64
void make_master () { MASTER_ = true ; ROS_DEBUG_STREAM ( " camera " << get_id () << " set as master" ); }
64
65
bool is_master () { return MASTER_; }
Original file line number Diff line number Diff line change 2
2
3
3
acquisition::Camera::~Camera () {
4
4
5
- pCam_ = NULL ;
5
+ pCam_ = nullptr ;
6
6
timestamp_ = 0 ;
7
7
8
8
}
@@ -292,15 +292,19 @@ void acquisition::Camera::trigger() {
292
292
293
293
}
294
294
295
- string acquisition::Camera::get_id ( ) {
295
+ string acquisition::Camera::get_node_value (string node_string ) {
296
296
INodeMap& nodeMap = pCam_->GetTLDeviceNodeMap ();
297
- CStringPtr ptrDeviceSerialNumber = nodeMap.GetNode (" DeviceSerialNumber " );
298
- if (IsReadable (ptrDeviceSerialNumber )){
299
- return string (ptrDeviceSerialNumber ->GetValue ());
297
+ CStringPtr ptrNodeValue = nodeMap.GetNode (node_string. c_str () );
298
+ if (IsReadable (ptrNodeValue )){
299
+ return string (ptrNodeValue ->GetValue ());
300
300
}
301
301
return " " ;
302
302
}
303
303
304
+ string acquisition::Camera::get_id () {
305
+ return get_node_value (" DeviceSerialNumber" );
306
+ }
307
+
304
308
void acquisition::Camera::targetGreyValueTest () {
305
309
CFloatPtr ptrExpTest =pCam_->GetNodeMap ().GetNode (" AutoExposureTargetGreyValue" );
306
310
// CFloatPtr ptrExpTest=pCam_->GetNodeMap().GetNode("ExposureTime");
Original file line number Diff line number Diff line change @@ -22,8 +22,7 @@ acquisition::Capture::~Capture(){
22
22
camList_.Clear ();
23
23
24
24
ROS_INFO_STREAM (" Releasing camera pointers..." );
25
- for (int i=0 ; i<cams.size (); i++)
26
- cams[i].~Camera ();
25
+ cams.clear ();
27
26
28
27
ROS_INFO_STREAM (" Releasing system instance..." );
29
28
system_->ReleaseInstance ();
@@ -130,6 +129,7 @@ void acquisition::Capture::init_variables_register_to_ros() {
130
129
read_parameters ();
131
130
132
131
// Retrieve singleton reference to system object
132
+ ROS_INFO_STREAM (" *** SYSTEM INFORMATION ***" );
133
133
ROS_INFO_STREAM (" Creating system instance..." );
134
134
system_ = System::GetInstance ();
135
135
@@ -166,8 +166,10 @@ void acquisition::Capture::load_cameras() {
166
166
167
167
for (int i=0 ; i<numCameras_; i++) {
168
168
acquisition::Camera cam (camList_.GetByIndex (i));
169
- ROS_INFO_STREAM (" -" <<cam.get_id ());
170
- }
169
+ ROS_INFO_STREAM (" -" << cam.get_id ()
170
+ <<" " << cam.get_node_value (" DeviceModelName" )
171
+ <<" " << cam.get_node_value (" DeviceVersion" ) );
172
+ }
171
173
172
174
bool master_set = false ;
173
175
int cam_counter = 0 ;
You can’t perform that action at this time.
0 commit comments