Basler接口:
千兆网(GigE Vision) 或Camera Link接口
支持PoE的千兆网(GigE)、支持PoCL的Camera Link、USB 3.0
相机符合GigE Vision、USB3 Vision和Camera Link标准协议,具有极佳的稳定性和灵活性
USB3 Vision 接口标准
设备标识 设备控制 流技术 技术细节
物理层 链路层 协议层 USB3 Vision
带宽 供电能力 效率 稳定
getChunkTimestamp
括事件产生时间戳 inPixelTimestamp ,
事件输出时间戳 offPixelTimestamp ,
还有机器(例如ROS)收到时的时间戳 rosTs
触发方式
内触发模式: 相机通过设备内部给出的信号采集图像。
外触发模式: 相机通过外部给出的信号采集图像。
外部信号可以是软件信号,也可以是硬件信号,主要包含软触发和硬件触发
曝光
叠曝光和非交叠曝光相比,交叠曝光可以减少曝光时间对出图时间的影响
The frame transmission time
delay duration
相机上的图像采集过程包括两个截然不同的部分。
第一部分是exposure 曝光。曝光完成后,Exposure Time
第二部分Readout过程 即从传感器的寄存器中读出数据并传送出去(Readout过程)
曝光时间
“non-overlapped”的曝光和“overlapped”的曝光。
01.在非重叠(“non-overlapped”)模式中,每个图像采集的周期中,相机在下一个图像采集开始前,均要完成曝光/读出整个过程
02.在“overlapped”曝光模式下 相机读出数据和下一帧曝光开始出现重叠的情况,在同一个时刻内,相机执行两个操作,导致在同样的单位时间内,
可以采集到更多的图片,即相机的帧率更高
overlapped”的曝光模式下: FramePeriod ≤Exposure Time + ReadoutTime
“non-overlapped”的曝光模式下:FramePeriod > Exposure Time + Readout Time
PTP
setting their internal clocks based on the same reference clock which is the GPS clock,
using chronyd, gpsd, and IEEE 1588 PTP protocols,
the timestamps provided alongside with the information
PTP(Precision Time Protocol,精确时间同步协议)应运而生,最新协议是IEEE1588v2,可实现亚微秒量级的时间同步精度。
PTP 是一种高精度时间同步协议 , 可以到达亚微秒级精度 , 有资料说可达到 30 纳秒左右的偏差精
时间戳一般为10位和13位,10位的单位是秒,13位的是毫秒 1秒=1000毫秒(ms) 1秒=1,000,000 微秒(μs) 1秒=1,000,000,000 纳秒(ns)
stamp:
secs: 1582203535
nsecs: 456908823
NTP(Network Time Protocol) 局域网内计算机利用NTP协议进行时间同步,时间同步精度在5ms左右
数据块+ 元数据
1.Chunk --》 data chunks
chunk1 图像数据块 image data payload 图像有效载荷数据
chunk1 ID
chunk1 长度
chunk2 Gain块
这些数据帧中的记录信息的原始数据就是有效载荷数据,即 payload data
头和尾都加上一定的辅助信息,比如这一批数据量的大小,校验位等,这样就相当于给已经分批原始数据加一些外套,
这些外套起到标示作用,使得原始数据不易丢失
Exposure Time Chunk
If this chunk is enabled, the camera appends the exposure time used for image acquisition to every image.
2.Metadata --》 grab result data or pylon chunk parser
image height, image width, the image ROI offset, and the pixel format used.
###时间戳数据块
The Timestamp camera feature counts the number of ticks generated by the camera's internal device clock
Timestamp Chunk#
If this chunk is enabled, the camera appends an internal timestamp (in ticks) of a certain event to every image.
BslChunkTimestampValue or ChunkTimestamp
current image started
ChunkTimestamp
For Basler cameras, this means that their GevTimestampValue parameter values will be as identical as possible.
3.时间戳
时间戳一般为10位和13位,10位的单位是秒,13位的是毫秒
1秒=1000毫秒(ms) 1秒=1,000,000 微秒(μs) 1秒=1,000,000,000 纳秒(ns)
stamp:
secs: 1582203535
nsecs: 456908823
The nodes “TimestampControlLatch”,
“TimestampTickFrequency”,
Timestamp Value”
and “TimestampControlReset” are used to retrieve the timestamp
GevTimestampTickFrequency
## aca1920-48gc
执行 GevTimestampControlLatch 命令。获取相机当前时间戳值的“快照”。
获取 GevTimestampValue 参数的值。该参数的值表示执行 GevTimestampControlLatch 命令的时间点
相机型号
#include <GenApi/GenApi.h>
// Take a "snapshot" of the camera's current timestamp value
camera.TimestampLatch.Execute();
// Get the timestamp value
int64_t i = camera.TimestampLatchValue.GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Take a "snapshot" of the camera's current timestamp value
CCommandParameter(nodemap, "TimestampLatch").Execute();
// Get the timestamp value
int64_t i = CIntegerParameter(nodemap, "TimestampLatchValue").GetValue();
参考
https://docs.baslerweb.com/timestamp#__tabbed_2_1
相机型号 按C选择型号 GevTimestampControlReset command aca1920-48gc
cam_->ChunkTimestamp.GetValue();
// Take a "snapshot" of the camera's current timestamp value
camera.GevTimestampControlLatch.Execute();
// Get the timestamp value
int64_t i = camera.GevTimestampValue.GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Take a "snapshot" of the camera's current timestamp value
CCommandParameter(nodemap, "GevTimestampControlLatch").Execute();
// Get the timestamp value
int64_t i = CIntegerParameter(nodemap, "GevTimestampValue").GetValue();
驱动代码
bool PylonCameraNode::grabImage()
{
boost::lock_guard<boost::recursive_mutex> lock(grab_mutex_);
// Store current time before the image is transmitted for a more accurate grab time estimation
ros::Time grab_time = ros::Time::now();
if ( !pylon_camera_->grab(img_raw_msg_.data) )
{
return false;
}
img_raw_msg_.header.stamp = grab_time;
return true;
}
GenApi::INodeMap& node_map = cam_->GetNodeMap();
GenApi::INodeMap& node_map = dev.GetNodeMap();
Pylon::CCommandParameter
Execute(bool Verify =true) //Execute the command.
Pylon::CIntegerParameter
GetValue(bool Verify =false, bool IgnoreCache =false) //Get node value.
bool setChunkEnableCallback(std_srvs::SetBool::Request &req, std_srvs::SetBool::Response &res);
/**
* Service callback for getting the Value of the timestamp when the image was acquired - Applies to: GigE and ace USB..
* @param req request
* @param res response
* @return true on success
*/
bool getChunkTimestampCallback(camera_control_msgs::GetIntegerValue::Request &req, camera_control_msgs::GetIntegerValue::Response &res);
ros::ServiceServer get_chunk_timestamp_srv;
int PylonCameraImpl<CameraTraitT>::getChunkTimestamp() {
cam_info->header.stamp = img_raw_msg_.header.stamp;
ros::Time grab_time = ros::Time::now();
img_raw_msg_.header.stamp = grab_time;
// Store current time before the image is transmitted for a more accurate grab time estimation
img.header.stamp = ros::Time::now();
格式化转换
ros::Time int64_t
#include <string>
ros::Time timesamp2rostime(int64_t timesamp){
std::string suanz = std::to_string(timesamp);
std::string sec_string = suanz.substr(0,10);
std::string nsec_string = suanz.substr(10,9);
while(nsec_string.length() < 9){
nsec_string += "0";
}
return ros::Time(std::stoi(sec_string),std::stoi(nsec_string));
}
stamp:
secs: 1582203535
nsecs: 456908823
ROS的时间戳是很大的一个数值,所以在计算时, 用 double 类型,而不能用float
project
A basic CMakeLists.txt CMake file could look like this:
project (grab)
## Locate pylon.
find_package(pylon 7.1.0 REQUIRED)
add_executable(grab Grab.cpp)
target_link_libraries(grab pylon::pylon)
相位锁定功能,也就是输入PPS,但PPS上升沿到来时,激光雷达的激光束恰好旋转到一定的角度
行业
金融-银行
追求安全记录的记录型电子数据与追求数据流通效率的交换型电子数据
可信时间戳技术(文件属性里的创建、修改、访问时间。其作用在于为用户提供一份电子证据,以证明用户的某些数据的产生时间)
可信时间戳是由联合信任时间戳服务中心根据国际时间戳标准《RFC3161》签发的,
能证明数据电文(各种电子文件和电子数据)在一个时间点是已经存在的、完整的、可验证的并具备法律效力的电子凭证,
其核心服务技术是通过将用户电子数据的Hash值和权威时间源绑定提供司法待证事实信息和客观存证功能。
电力-电网
200纳秒的服务器以太网输出
交通-自动驾驶
航天-航空
记一次设备调整
VGA分配器连接19寸显示器分辨率不对的问题产生原因,
硬件问题不外乎三种情况,VGA视频源问题,分配器问题、显示器问题
1.VGA视频信号源即电脑显卡问题 可采取直连的方式判断,如果直接用显卡连接显示器,输出是正常的话,说明你的显卡不存在问题。
2、VGA分配器问题 主要看VGA分配.---采用替换法,用两个或者三个VGA分配器轮流测试
3.系统软件和驱动器程序
驱动程序以及显示器尺寸决定
软件配置问题-系统配置问题 ,在网页输入c:
盒子配置
桌面云系统配置
操作系统显示器配置
参考
https://www.baslerweb.com/en/products/cameras/area-scan-cameras/ace/aca1920-40gc/
https://zh.docs.baslerweb.com/aca1920-48gc
https://docs.baslerweb.com/pylonapi/cpp/class_pylon_1_1_c_command_parameter
https://blog.csdn.net/wyf826459/article/details/104783394
激光雷达与相机时间同步问题的低成本完整解决方案 https://blog.csdn.net/qq_24972557/article/details/115049024