Open priyablue opened 6 years ago
Can you please update the branch with this code and tell me how to reproduce these errors exactly? I'll be able to understand it better if I see the exact nature of the error.
Clone the "error_branch" in the GX repo and run the build using "make posix_sitl_default".
Ok, I will check. Please give me a half an hour to get back.
ok also we found some issues yesterday in this error for some codes in src/drivers/ folder. the error goes as follows. error: 'struct esc_status_s' has no member named 'esc'
for example, that error happened in /src/drivers/mkblctrl/mkblctrl.cpp . but we havent touched any in this code or any related to esc_status. look into this also and kindly do let me know the inputs from your side.
the above error came when we ran "make px4fmu-v3_default"
Ok, noted. I will run both builds and check the errors.
ok
For the sake of safer build & fault finding, i uploaded the version which had unmodified tools folder and others. Kindly ignore it , as all were removed in final build. To know where the error files are linked and to have a better understanding this build has been uploaded.
Ok, its uploaded in the error_branch, right?
yes.
In the src/modules/mavlink/mavlink_tests/mavlink_ftp_test.h file, the file solely depends on unit_test (in src/modules path).
if we remove unit_test then the mavlink_tests folder has to be removed . so can we include unit_tests in module path or remove the mavlink_tests folder?
Kindly advise on this.
Like I mentioned in another issue thread earlier, we can keep unit_test
, since it may impact many other modules. It provides a framework for running unit tests, so its preferred to keep it.
I am working on sensors/rc_update.cpp
error. Please give me a couple of hours. I will also check other errors, and get back.
Hi, I have pushed the changes to sensors module. I removed the RC calibration part from this module, since it is a flight stack functionality and not strictly sensor functionality.
I've also removed the px4_simple_app
from posix_sitl_default
build in cmake, since it was using vehicle_attitude
message which is removed now.
This will still not build correctly, since I am getting errors corresponding to unit_test
. This module will be required by all the parts in the overall code where testing is performed. Since there a too many of them, I think you need to bring back unit_test
module.
ok also we found some issues yesterday in this error for some codes in src/drivers/ folder. the error goes as follows. error: 'struct esc_status_s' has no member named 'esc'
for example, that error happened in /src/drivers/mkblctrl/mkblctrl.cpp . but we havent touched any in this code or any related to esc_status. look into this also and kindly do let me know the inputs from your side.
You can remove this error by doing following:
esc_report
uORB message in the msg directory.esc_report[8] esc
from esc_status.msg
.ok will do the necessary changes.
ok i will remove rc_update.cpp , rc_update.h from sensor directory and will add the esc_report.msg as mentioned.
you only mentioned in the document to remove the msg file, ok then i need to check all for once and from your side give the final list of modules/uorb to retained as adding / removing these in the middle making us to take more time. this will again leads to delay. So look again into the codes,modules and uorb and give us the final list.
let make that final so that we need to close this as earlier as final
Yes, I understand that it makes things harder, but even I don't have a global idea of what is needed and what is not needed. It has to be an iterative process, where if you find that something is creating a problem, we have re-visit it and decide. If I had known about everything in advance, I could've done all the changes myself.
I will go through the code again once more and compile the list, but please keep working on our current list, and let me know about the errors you are getting. I will try to solve them as fast as I can.
We have now uploaded the working build in the "error_branch" again, that builds successfully without any error or warning. Now you clone the error branch and run the build steps as usual and let us know if you find any error.
Ok, thanks!
Great, everything is building fine!
I have the following suggestion: Can you please make the change in cmake so that the build directories are build/posix
and build/px4fmu-v3
? You had done it before (for phase2 branch). That's a nicer directory structure.
In the meanwhile, I will start our testing with this build. I will need the Pixhawk for it, since that's the only one we have available for testing. Can I send someone over to pick it up today evening? Or would you like to do any more testing with it?
Now the biggest thing you have left is removing git submodules and replacing them with static directories. I anticipate some problems in that process, since git seems to be very deeply integrated in the code. Let me know if you face any errors in that process that you want me to help with.
Ok we will do it as you said. We need to do the complete test along with the MATLAB. You can send your person by tomorrow morning by 11:00am to collect the pixhawk kit.
the git is making much impact in the build as many / each package in src/drivers src / modules is depending git.
For example if you goto accelsim in src /drivers it says it depends some git module . Removing that line in the respective code will make any change ?
Yes, that's what I was expecting. Can you tell me where exactly? I can see that in src/platforms/posix/drivers/accelsim/CMakeLists.txt
, it includes git_jmavsim in dependencies, but functionally I don't think it should depend on that. If you just remove that line, check if it builds correctly.
Similarly, in other places, try removing dependencies and building. If it gives errors, let me know.
For example, (Gx) folder you have CmakeLists.txt in that you can see in line number 383 where the git is dependent on some target git modules....
Like this there are many dependent modules,you let me know what has to be done. So that I will follow the same for everything.
See, there are two separate issues here.
We don't want to delete all the directories which are git submodules. We just don't want them to be git submodules. For example, in the line 383 that you mentioned above, the dependency is on git_genmsg
. This is the module found in Tools/genmsg
. We want to retain this module, but we simply don't want it to be git submodule. Instead, we want it to be a static directory. The git_genmsg
target is defined in line 199 of CMakeLists.txt. This will not change.
The second issue is that some of the git submodules should not be required anymore, since they implement functionality that is not required. These submodule directories we have to delete completely. If you see, currently we have the following 13 git submodules:
_cmake/cmakehexagon mavlink/include/mavlink/v1.0 mavlink/include/mavlink/v2.0 NuttX src/drivers/gps/devices src/lib/DriverFramework src/lib/ecl src/lib/matrix src/modules/uavcan/libuavcan Tools/gencpp Tools/genmsg Tools/jMAVSim _Tools/sitlgazebo
Out of the above list, only the 3 modules marked in bold and italics need to be deleted. All other module directories will be present, but they will be static folders instead of git submodules. For this, check the following links: https://stackoverflow.com/questions/1759587/un-submodule-a-git-submodule https://gist.github.com/r24y/9fb333760e217c3425c728a1c2a99db4 You can google, you may find better links than this.
At the end of this process, we should not need a .gitmodules
file.
These things are done. The thing you need to clarify is , after removing the .gitmodules in CMakeLists.txt and px4_base.cmake and other respective paths and folders , the code still has syntax like depend git_jmavsim . so how to modify this syntax in such a way that these will run using the static folders and is this is way to change all the files like these?
The "git_" part in syntax is not a problem. The main goal is to not have to rely at all on git in any way. Finally, the software will be in our internal version control, so it should run without git dependencies.
As for the dependency for the modules which have to be deleted (git_jmavsim, git_gazebo, git_cmake_hexagon etc.), try deleting this dependency from the CMakeLists.txt files, and see if it builds correctly. If you get any errors, let me know. A quick search tells me that these dependencies are added only in simulator module, but you should be able to remove it without any problems.
Please call me if you have any questions today, since I won't have access to internet for the rest of the day.
While building the final build , we are encountering the build errors in src/modules/sensors/parameters.cpp and src/modules/sensors/rc_update.cpp
in these , the major errors occurred due to nullifying / removing the lines related to "rc_parameter_map" "manual_control_setpoint" (as these were needed to be removed as the files for these in modules and uorb section are removed earlier).
Advise is needed on importance of these values for your requirement if any or those two cpp files can be completely removed?