YonoArc pipeline libgcc issue

Dear Yonohub Team,

I created a custom block in My Blocks based on a python ros package after fixing the issue described here. When trying to run a pipeline containing my custom block as below, I get an error message related to libgcc (also below) in the log file of my custom block (cnn_pkg/cnn.py). Unfortunately, I cannot figure out what the problem is exactly. Would you please help me out ?
pipeline

Thanks,
Rizanne

I assume that you don’t mean custom blocks which only supports Python 3 and Octave (not ROS).

It looks to me that your environment is missing a library that is used by your block. I would suggest the following:

  • Try use your block with YonoCommons - CPU if it contains all what you need. If you are using a custom environment, it may be missing essential packages.
  • Try running your block in Jupyter to debug it easier.

Please let me know if that helps.

Thanks for the reply.

I choose Python2/C++ block option when creating the block.

Actually, I use a custom environment because of some specific libraries I need, so I can’t use YonoCommons-CPU.

Ok, thanks for the suggestion will try to debug and see how it goes. Would you please give me a link for a tutorial for using Jupyter for debugging if available?

Thanks,
Rizanne

Jupyter Notebook is a pinned custom app on the main view of all users. You can find how to deal with custom apps in general here and Jupyter Notebook in particular here.

We don’t have a specific tutorial for debugging using Jupyter Notebook.

Can you double check that your custom environment contains all the relevant items from YonoCommons - CPU?

Also, what is the base of your custom environment? Since you are dealing with ROS nodes in Python, your base should be Ubuntu 18.04, Python 2.

Thanks for the reply.

It turned out the base of the environment was wrong as you suggested. I changed it to Python 2 and this solved the initial issue. However, inside the block code I try to access block properties using “get_property” as is done with non-ros blocks. This results in an AttributeError ‘ClassName’ object has no attribute ‘get_property’ where ClassName is the name of the Python class. Can ros-based blocks have attributes? If yes, how can I access these inside the block code if get_property is not valid?

Thanks,
Rizanne

Great to hear that your issue is resolved. I will close this issue then.

Regarding your question about dealing with properties in ROS nodes, get_property is part of our Python 3 API, so it can’t be used with ROS nodes.

For the alternative in ROS nodes, please refer to the ROS Name attribute under Properties in the Block Attributes section in this page:

ROS Name is the ROS parameter name. This will be used for parameter remapping when the ROS node is launched. For example, if you set ROS Name to _threshold, YonoArc runs your ROS node using the command: rosrun package_name node_name _threshold:=3. In this case you can get the value of the property (i.e., 3 in this case) in your code using rospy.get_param(‘~threshold’) since it is a private parameter. For more information, please visit the ROS documentation.

Thanks a lot for the help.
I use get_param as suggested and it worked !