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 1717devel
1818~devel /lib /datacollection_neu /* .xml
1919.catkin_workspace
20+ include /spinnaker_sdk_camera_driver /spinnaker_configure.h
2021
2122# ignore doc/notes.txt, but not doc/server/arch.txt
2223# doc/*.txt
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ namespace acquisition {
5959 // void setTrigMode();
6060 // void setTriggerOverlapOff();
6161
62+ string get_node_value (string node_string);
6263 string get_id ();
6364 void make_master () { MASTER_ = true ; ROS_DEBUG_STREAM ( " camera " << get_id () << " set as master" ); }
6465 bool is_master () { return MASTER_; }
Original file line number Diff line number Diff line change 22
33acquisition::Camera::~Camera () {
44
5- pCam_ = NULL ;
5+ pCam_ = nullptr ;
66 timestamp_ = 0 ;
77
88}
@@ -292,15 +292,19 @@ void acquisition::Camera::trigger() {
292292
293293}
294294
295- string acquisition::Camera::get_id ( ) {
295+ string acquisition::Camera::get_node_value (string node_string ) {
296296 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 ());
300300 }
301301 return " " ;
302302}
303303
304+ string acquisition::Camera::get_id () {
305+ return get_node_value (" DeviceSerialNumber" );
306+ }
307+
304308void acquisition::Camera::targetGreyValueTest () {
305309 CFloatPtr ptrExpTest =pCam_->GetNodeMap ().GetNode (" AutoExposureTargetGreyValue" );
306310 // CFloatPtr ptrExpTest=pCam_->GetNodeMap().GetNode("ExposureTime");
Original file line number Diff line number Diff line change @@ -22,8 +22,7 @@ acquisition::Capture::~Capture(){
2222 camList_.Clear ();
2323
2424 ROS_INFO_STREAM (" Releasing camera pointers..." );
25- for (int i=0 ; i<cams.size (); i++)
26- cams[i].~Camera ();
25+ cams.clear ();
2726
2827 ROS_INFO_STREAM (" Releasing system instance..." );
2928 system_->ReleaseInstance ();
@@ -130,6 +129,7 @@ void acquisition::Capture::init_variables_register_to_ros() {
130129 read_parameters ();
131130
132131 // Retrieve singleton reference to system object
132+ ROS_INFO_STREAM (" *** SYSTEM INFORMATION ***" );
133133 ROS_INFO_STREAM (" Creating system instance..." );
134134 system_ = System::GetInstance ();
135135
@@ -166,8 +166,10 @@ void acquisition::Capture::load_cameras() {
166166
167167 for (int i=0 ; i<numCameras_; i++) {
168168 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+ }
171173
172174 bool master_set = false ;
173175 int cam_counter = 0 ;
You can’t perform that action at this time.
0 commit comments