PX4-Flow icon indicating copy to clipboard operation
PX4-Flow copied to clipboard

<uavcan/protocol/GetNodeInfo.hpp> not detected

Open akvavit01 opened this issue 4 years ago • 2 comments

When building using make all, GetNodeInfo,hpp is not found

Screenshot from 2020-10-15 17-59-29

akvavit01 avatar Oct 15 '20 11:10 akvavit01

Hi, I encounter a similar problem. I can't find file NodeStatus.hpp. I find the same module libuavcan in PX4 repo Firmware and I can build it. So I believe the building environment is wrong. I check the build output and find the python generator fail. I disable the conda environment and use python 2.7 to build, and it pass. I think you should check the building environment according to PX4 Guide and use the same environment to build PX4-FLOW. Good Luck!

RPFey avatar Jan 04 '21 03:01 RPFey

@akvavit01 and @RPFey I think I solved it. The problem happens with the new versions of Python; I am using the 3.8.5 which comes with Ubuntu 20.04, here more information. Specifically, you need to handle the stopIteration exception version in /PX4-Flow/src/lib/uavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/init.py since after Python 3.6 this will end up in an error. In this case, the error stops the generation process of some files such as Nodeinfo.hpp. Specifically, I modified the line 300 in init.py for handling the exception: try: last = next(it) except StopIteration: return

Excuse me for the identation, be careful with that since Python is very picky.

sbaccam90 avatar May 13 '21 15:05 sbaccam90