当前位置:网站首页>Gnuradio 3.9 using OOT custom module problem record
Gnuradio 3.9 using OOT custom module problem record
2022-07-08 01:22:00 【You roll, I don't roll】
Recently due to GR3.8 If there is a problem with the convolutional coding module in GR3.9 , Find out GR3.9 It can be used normally. , About GR3.8 Why the convolutional coding module in can't be used, let's not delve into it first , Before written GR3.8 To write OOT The process of , GR3.9 To write OOT Follow 3.8 Not much difference , But some modifications need attention .
Catalog
1、 The issue of relying on versions
2、 Every time you modify the public header file, you need to re bind binding
3、 Everything has passed the compilation , There is a problem when using
1、 The issue of relying on versions
(GNURadio3.9.3 There is a problem , but 3.9.4 This problem has been solved , If you want to save trouble, you can directly change to a new version ~)
GR3.9 And GR3.8 A very important difference is python And C++ The way of interface has changed , GR3.8 It uses swig , and GR3.9 It uses pybind11, If you don't know these two, it's not a problem , Relevant interfaces will be provided by gr_modtool Done automatically , We don't need to care about how to achieve it . But according to the tutorial on the official website , GR3.9 need pybind11 Version of >= 2.5.0,
Above said ubuntu20.04 Medium pybind11 Has been upgraded to 2.5.0, But what I checked was 2.4.3 Version of , As for why we don't know , So simply install a new source code , It's not too much trouble ~ The process is as follows :
curl -Lo pybind11.tar.gz https://github.com/pybind/pybind11/archive/v2.5.0.tar.gz
mkdir pybind11 && tar xzf pybind11.tar.gz -C pybind11 --strip-components=1 && cd pybind11
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF
make
sudo make install
Note that the first line of command is to download the compressed package file from the specified website and rename it pybind11.tar.gz. However, the download may fail due to network reasons , At this time, you can download manually. The download address is the one in the command line :
https://github.com/pybind/pybind11/archive/v2.5.0.tar.gz
Please rename it to pybind11.tar.gz Then execute the following commands .
2、 Every time you modify the public header file, you need to re bind binding
Don't ask me what is a public header , I'm not sure ... Literally, my understanding is that you may have created module Of include/ The header file in the folder is the public header file , Because the files here can be used by all the files you create later block Use , I'm really smart / dog's head . That is to say, every time you modify the contents of the header file here, you should execute the following command to rebind :
gr_modtool bind [blockname]
hold [blockname] Change to the corresponding block That's the name of . The reason can be explained on the official website .
This is a bit of a hole , If you don't notice, it will be CMake When I encountered a problem like the following :
......
CMake Error at /usr/local/lib/cmake/gnuradio/GrPybind.cmake:201 (message):
Python bindings for my_header_payload_demux.h are out of sync
Call Stack (most recent call first):
python/bindings/CMakeLists.txt:34 (GR_PYBIND_MAKE_OOT)
......
You think it's over ? No , There may be bug Waiting for you , I'm doing bind Encountered the following problem when :
Error: Can't parse input signature.
Error: Can't parse output signature.
Writing binding code to ./python/bindings/my_header_payload_demux_python.cc
Writing binding code to ./python/bindings/docstrings/my_header_payload_demux_pydoc_template.h
It's these two error , I can't parse my input and output ? Before, in my This blog Similar problems have been recorded in , But the solution at that time can't be used now , I didn't care about him , Because look at the back log The information was successful , Later facts prove , These two error It really doesn't matter , Let them put off the show , Let's take it as if we didn't see it .
3、 Everything has passed the compilation , There is a problem when using
The error of my question is like this :
AttributeError: 'myDemux.myDemux_python.my_header_payload_demux' object has no attribute 'to_basic_block'
Just like shape. :AttributeError: '×××' object has no attribute 'to_basic_block' Such a mistake , This is again binding There's something wrong with the document ( Mo panic ,bind Just these questions , No other problems have been found so far ), The solution is still on the official website :
Just need to put python/bindings/[blockname]_python.cc Add these parameters to the corresponding positions in the file :
gr::sync_block,
gr::block,
gr::basic_block,
Let me show you the effect after I finish :
Did you find that I commented out one gr::sync_block Parameters , you 're right , If I don't comment out this parameter , When I recompile the code, the following will appear bug :
/home/wsx/USRPworkarea/mymodule/gr-myDemux/python/bindings/my_header_payload_demux_python.cc:37:23: error: ‘sync_block’ is not a member of ‘gr’
37 | gr::sync_block,
| ^~~~~~~~~~
/home/wsx/USRPworkarea/mymodule/gr-myDemux/python/bindings/my_header_payload_demux_python.cc:37:23: error: ‘sync_block’ is not a member of ‘gr’
Then I commented it out , Then recompile and install it again , I won't delve into the specific reasons .
Reference resources :
GNU Radio 3.9 OOT Module Porting Guide - GNU Radio
Re: issues porting C++ OOT to 3.9 - fails at runtime import
https://github.com/gnuradio/gnuradio/issues/4773
( Brothers, if you encounter relevant problems, welcome to communicate ~)
边栏推荐
- Several frequently used OCR document scanning tools | no watermark | avoid IQ tax
- Getting started STM32 -- how to learn stm32
- 5. Contrôle discret et contrôle continu
- 2022 safety officer-a certificate free examination questions and safety officer-a certificate mock examination
- Common effects of line chart
- Ag9310meq ag9310mfq angle two USB type C to HDMI audio and video data conversion function chips parameter difference and design circuit reference
- Mathematical modeling -- knowledge map
- swift获取url参数
- Scheme selection and scheme design of multifunctional docking station for type C to VGA HDMI audio and video launched by ange in Taiwan | scheme selection and scheme explanation of usb-c to VGA HDMI c
- 4. Cross entropy
猜你喜欢
2022 chemical automation control instrument examination summary and chemical automation control instrument simulation examination questions
2022 high voltage electrician examination skills and high voltage electrician reexamination examination
Redis master-slave replication
Y59. Chapter III kubernetes from entry to proficiency - continuous integration and deployment (III, II)
Cs5261type-c to HDMI alternative ag9310 | ag9310 alternative
6.Dropout应用
2022 new examination questions for crane driver (limited to bridge crane) and question bank for crane driver (limited to bridge crane) operation examination
11. Recurrent neural network RNN
14. Draw network model structure
For the first time in China, three Tsinghua Yaoban undergraduates won the stoc best student thesis award
随机推荐
130. 被围绕的区域
133. Clone map
General configuration title
Four digit nixie tube display multi digit timing
Frrouting BGP protocol learning
Mathematical modeling -- knowledge map
8. Optimizer
Chapter VIII integrated learning
Ag7120 and ag7220 explain the driving scheme of HDMI signal extension amplifier | ag7120 and ag7220 design HDMI signal extension amplifier circuit reference
Chapter 5 neural network
2022 tea master (intermediate) examination questions and tea master (intermediate) examination skills
2022 high altitude installation, maintenance and demolition examination materials and high altitude installation, maintenance and demolition operation certificate examination
Multi purpose signal modulation generation system based on environmental optical signal detection and user-defined signal rules
swift获取url参数
Arm bare metal
General configuration tooltip
10.CNN应用于手写数字识别
Definition and classification of energy
4. Strategic Learning
Chapter 16 intensive learning