Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadSpecialModules
Commits
0e2239cc
Commit
0e2239cc
authored
Apr 17, 2020
by
Locatelli
Browse files
Merge remote-tracking branch 'origin/V3.2_191' into ploty2
parents
33b6d4f3
4ee2d1b2
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
src/controllers/vexp/VEXPController.cpp
View file @
0e2239cc
...
...
@@ -506,44 +506,44 @@ std::string VEXPController::getSpyData() {
writer
.
StartObject
();
writer
.
Key
(
"as"
);
writer
.
Double
(
as
());
writer
.
Key
(
"bs"
);
writer
.
Double
(
bs
());
writer
.
Key
(
"cs"
);
writer
.
Double
(
cs
());
writer
.
Key
(
"aa"
);
writer
.
Double
(
aa
());
writer
.
Key
(
"bb"
);
writer
.
Double
(
bb
());
writer
.
Key
(
"cc"
);
writer
.
Double
(
cc
());
writer
.
Key
(
"ax"
);
writer
.
Double
(
ax
());
writer
.
Key
(
"ay"
);
writer
.
Double
(
ay
());
writer
.
Key
(
"az"
);
writer
.
Double
(
az
());
writer
.
Key
(
"bx"
);
writer
.
Double
(
bx
());
writer
.
Key
(
"by"
);
writer
.
Double
(
by
());
writer
.
Key
(
"bz"
);
writer
.
Double
(
bz
());
writer
.
Key
(
"qh"
);
writer
.
Double
(
qh
());
writer
.
Key
(
"qk"
);
writer
.
Double
(
qk
());
writer
.
Key
(
"ql"
);
writer
.
Double
(
ql
());
writer
.
Key
(
"en"
);
writer
.
Double
(
en
());
writer
.
Key
(
"qm"
);
writer
.
Double
(
qm
());
writer
.
Key
(
"as"
);
writer
.
Double
(
toDouble
(
as
())
)
;
writer
.
Key
(
"bs"
);
writer
.
Double
(
toDouble
(
bs
())
)
;
writer
.
Key
(
"cs"
);
writer
.
Double
(
toDouble
(
cs
())
)
;
writer
.
Key
(
"aa"
);
writer
.
Double
(
toDouble
(
aa
())
)
;
writer
.
Key
(
"bb"
);
writer
.
Double
(
toDouble
(
bb
())
)
;
writer
.
Key
(
"cc"
);
writer
.
Double
(
toDouble
(
cc
())
)
;
writer
.
Key
(
"ax"
);
writer
.
Double
(
toDouble
(
ax
())
)
;
writer
.
Key
(
"ay"
);
writer
.
Double
(
toDouble
(
ay
())
)
;
writer
.
Key
(
"az"
);
writer
.
Double
(
toDouble
(
az
())
)
;
writer
.
Key
(
"bx"
);
writer
.
Double
(
toDouble
(
bx
())
)
;
writer
.
Key
(
"by"
);
writer
.
Double
(
toDouble
(
by
())
)
;
writer
.
Key
(
"bz"
);
writer
.
Double
(
toDouble
(
bz
())
)
;
writer
.
Key
(
"qh"
);
writer
.
Double
(
toDouble
(
qh
())
)
;
writer
.
Key
(
"qk"
);
writer
.
Double
(
toDouble
(
qk
())
)
;
writer
.
Key
(
"ql"
);
writer
.
Double
(
toDouble
(
ql
())
)
;
writer
.
Key
(
"en"
);
writer
.
Double
(
toDouble
(
en
())
)
;
writer
.
Key
(
"qm"
);
writer
.
Double
(
toDouble
(
qm
())
)
;
writer
.
Key
(
"fx"
);
writer
.
Int
(
fx
());
writer
.
Key
(
"ss"
);
writer
.
Int
(
ss
());
writer
.
Key
(
"ki"
);
writer
.
Double
(
ki
());
writer
.
Key
(
"kf"
);
writer
.
Double
(
kf
());
writer
.
Key
(
"ki"
);
writer
.
Double
(
toDouble
(
ki
())
)
;
writer
.
Key
(
"kf"
);
writer
.
Double
(
toDouble
(
kf
())
)
;
writer
.
Key
(
"qhScan"
);
writer
.
Double
(
qhScan
());
writer
.
Key
(
"qkScan"
);
writer
.
Double
(
qkScan
());
writer
.
Key
(
"qlScan"
);
writer
.
Double
(
qlScan
());
writer
.
Key
(
"enScan"
);
writer
.
Double
(
enScan
());
writer
.
Key
(
"qhScan"
);
writer
.
Double
(
toDouble
(
qhScan
())
)
;
writer
.
Key
(
"qkScan"
);
writer
.
Double
(
toDouble
(
qkScan
())
)
;
writer
.
Key
(
"qlScan"
);
writer
.
Double
(
toDouble
(
qlScan
())
)
;
writer
.
Key
(
"enScan"
);
writer
.
Double
(
toDouble
(
enScan
())
)
;
writer
.
Key
(
"dqhScan"
);
writer
.
Double
(
dqhScan
());
writer
.
Key
(
"dqkScan"
);
writer
.
Double
(
dqkScan
());
writer
.
Key
(
"dqlScan"
);
writer
.
Double
(
dqlScan
());
writer
.
Key
(
"denScan"
);
writer
.
Double
(
denScan
());
writer
.
Key
(
"dqhScan"
);
writer
.
Double
(
toDouble
(
dqhScan
())
)
;
writer
.
Key
(
"dqkScan"
);
writer
.
Double
(
toDouble
(
dqkScan
())
)
;
writer
.
Key
(
"dqlScan"
);
writer
.
Double
(
toDouble
(
dqlScan
())
)
;
writer
.
Key
(
"denScan"
);
writer
.
Double
(
toDouble
(
denScan
())
)
;
writer
.
Key
(
"nbPointsScan"
);
writer
.
Int
(
nbPointsScan
());
writer
.
Key
(
"kiScan"
);
writer
.
Double
(
kiScan
());
writer
.
Key
(
"kfScan"
);
writer
.
Double
(
kfScan
());
writer
.
Key
(
"kiScan"
);
writer
.
Double
(
toDouble
(
kiScan
())
)
;
writer
.
Key
(
"kfScan"
);
writer
.
Double
(
toDouble
(
kfScan
())
)
;
writer
.
Key
(
"fxScan"
);
writer
.
Int
(
fxScan
());
writer
.
Key
(
"ssScan"
);
writer
.
Int
(
ssScan
());
...
...
src/drivers/gigecam/genericcam/CameraHandler.cpp
View file @
0e2239cc
...
...
@@ -273,7 +273,7 @@ bool CCameraControl::ExposureFeatureBGAPI() {
// check if the feature is writeable and write new value
if
(
exposure_node
->
IsWriteable
())
{
exposure_node
->
SetDouble
(
exposure_time_
);
std
::
cout
<<
"e>>>>>>>>>>>>>>>>exposure_time_ OK "
<<
camera_pointer_
->
GetRemoteNode
(
"ExposureTimeRaw"
)
->
GetValue
()
<<
std
::
endl
;
//
std::cout <<"e>>>>>>>>>>>>>>>>exposure_time_ OK "<<camera_pointer_->GetRemoteNode("ExposureTimeRaw")->GetValue() << std::endl;
}
BGAPI2
::
Node
*
exposure_gain
=
camera_pointer_
->
GetRemoteNode
(
"GainRaw"
);
...
...
@@ -281,16 +281,16 @@ bool CCameraControl::ExposureFeatureBGAPI() {
if
(
exposure_gain
->
IsWriteable
())
{
exposure_gain
->
SetInt
(
exposure_gain_
);
}
std
::
cout
<<
"e>>>>>>>>>>>>>>>>GainRaw OK "
<<
camera_pointer_
->
GetRemoteNode
(
"GainRaw"
)
->
GetValue
()
<<
std
::
endl
;
//
std::cout <<"e>>>>>>>>>>>>>>>>GainRaw OK "<<camera_pointer_->GetRemoteNode("GainRaw")->GetValue() << std::endl;
BGAPI2
::
Node
*
pixel_format
=
camera_pointer_
->
GetRemoteNode
(
"PixelFormat"
);
std
::
cout
<<
"e>>>>>>>>>>>>>>>>pixel format OK "
<<
camera_pointer_
->
GetRemoteNode
(
"PixelFormat"
)
->
GetValue
()
<<
std
::
endl
;
//
std::cout <<"e>>>>>>>>>>>>>>>>pixel format OK "<<camera_pointer_->GetRemoteNode("PixelFormat")->GetValue() << std::endl;
// check if the feature is writeable and write new value
if
(
pixel_format
->
IsWriteable
())
{
pixel_format
->
SetString
(
"YUV422_YUYV_Packed"
);
}
std
::
cout
<<
"e>>>>>>>>>>>>>>>>pixel format OK "
<<
camera_pointer_
->
GetRemoteNode
(
"PixelFormat"
)
->
GetValue
()
<<
std
::
endl
;
//
std::cout <<"e>>>>>>>>>>>>>>>>pixel format OK "<<camera_pointer_->GetRemoteNode("PixelFormat")->GetValue() << std::endl;
// write some status information
std
::
lock_guard
<
std
::
mutex
>
lock
(
feature_command_message_list_lock_
);
feature_command_message_list_
.
clear
();
...
...
@@ -424,7 +424,7 @@ bool CCameraControl::CaptureBGAPIImages(const bool * abort_flag, unsigned int nu
// loop over the number of images to capture
do
{
// fetch the buffers
BGAPI2
::
Buffer
*
buffer
=
datastream_pointer
->
GetFilledBuffer
(
exposure_time_
+
1000
);
BGAPI2
::
Buffer
*
buffer
=
datastream_pointer
->
GetFilledBuffer
(
exposure_time_
);
if
(
buffer
)
{
std
::
cout
<<
"GetFilledBuffer OK "
<<
number_of_captured_images_
<<
" of "
<<
number_of_images_
<<
std
::
endl
;
FillBufferInformation
(
datastream_pointer
,
buffer
);
...
...
@@ -478,8 +478,9 @@ bool CCameraControl::StartStreamingBGAPI() {
datastream_pointer
->
GetBufferList
()
->
DiscardAllBuffers
();
datastream_pointer
->
GetBufferList
()
->
FlushAllToInputQueue
();
// start the acquisition on the host side with the selected number of images
datastream_pointer
->
StartAcquisition
(
number_of_images_
);
// start the acquisition on the device side
datastream_pointer
->
StartAcquisitionContinuous
();
// datastream_pointer->StartAcquisition(number_of_images_);
// start the acquisition on the device side
// to work with this example the device must be in free running mode
if
(
camera_pointer_
->
GetRemoteNode
(
"AcquisitionStart"
)
->
IsWriteable
())
{
camera_pointer_
->
GetRemoteNode
(
"AcquisitionStart"
)
->
Execute
();
...
...
src/drivers/gigecam/genericcam/GenericCamDriver.cpp
View file @
0e2239cc
...
...
@@ -130,6 +130,9 @@ void GenericCamDriver::execute(const std::string& aCommand) {
}
GenericCamState
*
currentState
=
dynamic_cast
<
GenericCamState
*>
(
getCurrentState
());
// Check command
cout
<<
"GenericCamDriver::stop() "
<<
aCommand
<<
endl
;
if
(
aCommand
==
driver
::
INIT_COMMAND
)
{
// Init command
currentState
->
init
();
...
...
src/drivers/gigecam/genericcam/Module.xml
View file @
0e2239cc
...
...
@@ -4,7 +4,15 @@
<link
lib=
"opencv_core"
/>
<link
lib=
"opencv_calib3d"
/>
<link
lib=
"opencv_highgui"
/>
<link
path=
"/opt/pylon/lib"
lib=
"GenApi_gcc_v3_1_Basler_pylon"
/>
<link
path=
"/opt/pylon/lib"
lib=
"pylonbase"
/>
<link
path=
"/opt/pylon/lib"
lib=
"GCBase_gcc_v3_1_Basler_pylon"
/>
<link
path=
"/opt/pylon/lib"
lib=
"pylonutility"
/>
<link
lib=
"opencv_core"
/>
<link
lib=
"opencv_calib3d"
/>
<link
lib=
"opencv_highgui"
/>
<include
path=
"/opt/baumer-gapi-sdk/include/bgapi2_genicam"
/>
<include
path=
"/opt/pylon/include"
/>
<include
path=
"$(NOMAD_HOME)/../NomadModules/src"
/>
</module>
src/drivers/gigecam/genericcam/RealGenericCamDriver.cpp
View file @
0e2239cc
This diff is collapsed.
Click to expand it.
src/drivers/gigecam/genericcam/RealGenericCamDriver.h
View file @
0e2239cc
...
...
@@ -30,6 +30,7 @@
#include "DoubleBufferHandler.h"
#include "GenericCamDef.h"
#include "GenericCamState.h"
#include </opt/pylon/include/pylon/PylonIncludes.h>
namespace
genericcam
{
...
...
@@ -116,6 +117,8 @@ public:
// int32 GetAvailableGenericCameras();
// std::string getConfigFile(BGAPI2::Device* device);
private:
...
...
@@ -219,8 +222,8 @@ private:
// perform a mean value calculation used by the calculation thread
void
DoCalculation
(
CCameraControl
*
camera_control
);
void
stopLiveAcq
();
void
startLiveAcq
();
// instantiate the camera handler
CCameraHandler
m_camera_handler
;
...
...
@@ -245,6 +248,13 @@ private:
Counter
m_TimeCounter
;
Pylon
::
CInstantCamera
*
camera
=
nullptr
;
int64
cameraNum_
=
1
;
//��ǰ������������ܸ���
std
::
string
cameraName_
;
};
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment