PX4 / PX4-Flow

Firmware for PX4FLOW board
231 stars 340 forks source link

<uavcan/protocol/GetNodeInfo.hpp> not detected #130

Open akvavit01 opened 3 years ago

akvavit01 commented 3 years ago

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

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

RPFey commented 3 years ago

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!

sbaccam90 commented 3 years ago

@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.