Jump to content
  • 0
Jacob R

GRC - OOT Modules, cannot find module

Question

I am creating an OOT block for GNURADIO-Companion using gr_modtool. The Process goes like this:

 

gr_modtool newmod <mod name>
gr_modtool add <block name>
add library paths to CMakeLists.txt in root of gr-<mod name> to include Wbt libraries
Edit the source file in /lib/<mod_block_impl.cc
mkdir build && cd build
cmake ..
make
sudo make install
gr_modtool makexml for new block
sudo ldconfig

 

When i install block using normal C++ libraries, everything runs smoothly and the flowchart in GRC open fine. 
When i install block using C++ and WBT libraries, everything compiles and installs fine, but when GRC opens i keep getting the following error:

------------------------------------------------------------------------------------
Executing: "/home/wbtdev/Documents/top_block.py"

Using Volk machine: ssse3_64
Traceback (most recent call last):
  File "/home/wbtdev/Documents/top_block.py", line 130, in <module>
    tb = top_block()
  File "/home/wbtdev/Documents/top_block.py", line 96, in __init__
    self.gps22_latitude1_0 = gps22.latitude1()
AttributeError: 'module' object has no attribute 'latitude1' 

---------------------------------------------------------------------------------------

   Do i need to include things to the CMakeLists.txt file?

 

UPDATE:

    The GRC blocks for the WBT have to be set up just right in order to load right. See the wbt_source block projects to add new blocks, they are in the project gr-wbt.

   You can add blocks to the module with gr_modtool add <module name> . Open the CMakeLists.txt file from the root directory of gr-wbt using QT-Creator and run Cmake. This is the process for adding new blocks. From there, the steps for creating an OOT block are the same- edit the source files in /lib and edit the GRC block XML file in /grc

   Build, then run make install && ldconfig in the build directory to install the blocks to GRC. You can alternately run QT creator as root and add make steps <make install> and <ldconfig> to build and install in one click from QT Creator. You will however, need to run "sudo chown -R wbtdev ~/.config" next time you run QT creator as a non-root user. 

   Anybody with questions can feel free to ask

Edited by rameyjm
UPDATE

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Question answer was in the edit by poster, thank you poster for adding the answer you determined.  I will be adding points to your reputation for this (and the other questions where you've done this!)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×