This is demostration codes for developer who work on ALG's PCIE Card utilizations.
For more information check the website
-
Windows
- CMake 3.5 or newer
- Mingw64 gcc version 7.3-posix-seh-rev0
- Optional : Opencv 3.4.9 (for image display), GStreamer V1.21 (for V4L2/RTP), CUDA Toolkit V11.6 (for Video Codec)
-
Linux (Ubuntu)
- CMake 3.5 or newer
- gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
- Optional : Opencv 3.4.9 (for Image Display), GStreamer V1.21 (for V4L2/RTP), CUDA Toolkit V11.6 (for Video Codec)
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=<install path> ..
to build with image display add option :-DBUILD_IMAGE_DISP=ON
to build with codec add option :-DWITH_GSTREAMER=ON
and-DWITH_CUDA=ON
make
make install
cd <install path>
sudo ./pcie_sdk_demo_init -s
or use Python :
sudo python init_sdk.py
for all types sensor (use json file)
python set_sensor_from_json.py --json_file=<path to json file> --channel=xx
cd <src/python>
Stream on
python stream_on_by_channel.py --channel='x,y'
Stream off
python stream_off.py
cd <install path>
sudo ./pcie_sdk_demo_client -image <topic_name>
cd <install path>
display all images :
sudo ./pcie_sdk_demo_image_disp -all
display image from select channel :
sudo ./pcie_sdk_demo_image_disp -c <topic_name>
cd <install path>
display all images :
sudo ./pcie_sdk_demo_gl_disp -all
display image from select channel :
sudo ./pcie_sdk_demo_gl_disp -c <topic_name>
cd <src/python>
Set System Time:
python set_time.py --device=xx --time_mode=1 --utc_time=2022:08:23:15:25:30 --unix_time=1660972543000000 --relative_time=0
Get System Time:
python get_time.py --device=xx
cd <src/python>
Set Trigger Mode (Int Trigger) :
python set_trigger_mode.py --device=xx --mode=2
Set Trigger Mode (Ext Trigger) :
python set_trigger_mode.py --device=xx --mode=1
Set Trigger Parameters :
python set_trigger_mode.py --channel=xx,yy --mode=2 --delay_time=0 --valid_time=1000 --polarity=0 --freq=30
- Install ROS melodic.
- After installation, add ROS libraries to PATH:
source /opt/ros/melodic/setup.bash
- Add option
-DWITH_ROS=ON
in cmake:cmake -DWITH_ROS=ON ..
make & make install
- Start roscore, open Terminal and run :
roscore &
- Init SDK :
sudo ./pcie_sdk_demo_init -s
- Set Sensor Config :
python set_sensor_from_json.py --json_file=<path to json file> --channel=xx
- Stream on :
python stream_on_by_channel.py --channel='x,y'
- Run Rospub :
sudo ./pcie_sdk_demo_rospub -all
ROS Topic Name : /image_data/stream/xx
(xx is channel id starting from 00)
To display image of channel 0, use image_view :
rosrun image_view image_view image:=/image_data/stream/00
- Install ROS2 humble.
- After installation, add ROS2 libraries to PATH:
source /opt/ros/humble/setup.bash
- Add option
-DWITH_ROS2=ON
in cmake:cmake -DWITH_ROS2=ON ..
make & make install
- Init SDK :
sudo ./pcie_sdk_demo_init -s
- Set Sensor Config :
python set_sensor_from_json.py --json_file=<path to json file> --channel=xx
- Stream on :
python stream_on_by_channel.py --channel='x,y'
- Run Rospub :
sudo ./pcie_sdk_demo_ros2pub -all
ROS2 Topic Name : /image_data/stream/ch_xx
(xx is channel id starting from 00)
To display image of channel 0, use rviz2 :
topic=/image_data/stream/ch_00
contact : [email protected]