Open priyablue opened 6 years ago
To setup Qt creator in MAC OS follow the steps below.
type the following commands assuming the project directory path is ~/src/Firmware
$cd ~/src/Firmware $mkdir -p build/creator $cd build/creator $cmake ../.. -G "CodeBlocks - Unix Makefiles"
.... wait for the configure to get done ....
I am doing that, but where do you specify the target in the project menu?
after opening projects menu , in the build column look for cmake column
under this look for build directory .
in that give the path as follows:
/Users/saipriya/src/Firmware/build_creator (change as per your path)
and wait for the configuration to sum up in box given below
in that look for path and add the path /usr/local/bin and goto to run column
Ok, and where do you give "px4fmu-default" option? In Build settings somewhere or Run settings?
Now in the run goto run configuration ----> add ----> custom executable.
in executable column give "make"
in cmd line arguments column give "px4fmu-v3_default"
now click run (play) button in the left pane and look for progress in compile output sessions and if you get any error let me know
Ok I'll try, thanks!
Ok it's working now. I was making a small error earlier. Thanks!
ok good. Check with your matlab program and let us know whether you are getting mavlink messages. Get back to us for any errors. thanks
What are the settings to get values in Matlab? If I upload the current firmware version from phase2 branch, and connect the Pixhawk to USB, should I start receiving messages? What baud rate?
Yes you will receive at the baud rate 57600
Can you please tell me which Simulink block you used to receive USB data? There is a "serial receive" block but it needs Instrument Control Toolbox, which we don't currently have.
You can check the below link for alternative serial receive.
http://in.mathworks.com/help/supportpkg/arduino/ref/serialreceive.html
Will ask rajan sir to send the screen shot for your reference.
Hi, I have some questions about the Qt Creator project, which I will put here along with images.
Firstly, when we import the CMakeLists.txt file, the project is configured. In the Build Steps menu, what are all the Targets? Most of these targets seem unnecessary (starting with gazebo, jmavsim, or containing specific airframes). Can we remove the unnecessary targets? You can ask me which ones to keep if you have any doubts.
Similarly, in Run Settings, what are the Run configurations? Can we have only relevant run configurations here, and can we make the process of building and running the code more straightforward by defining the configurations we want (such as "make posix_sitl_default" and "make px4fmu-v3_default")?
It would be great to change the Makefile and cmake configurations so that they are more straight-forward for use in our context. Of course, we would require help from you in documenting the process, so that if we want to add more targets and configurations in future, we can do that.
We have many doubts in this deviation of works as itseems much irrelevant to the work phase you gave. We went through your requirements in the previous issue, you havent informed this earlier before starting of the project. We cross checked the work documents prepared by us and also by you. There is no where related to this customization of Qt creator(only the build has to be tested for any errors) anywhere. The same way about the MATLAB (ie the customization of PSP px4fmu-v3), the requirement provided by you is to receive the sensor data logging.
You can summarize these as the next set of works and we can start this as a new one after finishing the 5 phases.
This is not customisation of Qt Creator. Qt Creator does not do anything new, it only reads the configurations from CMakeLists.txt. If we modify the cmake configuration correctly, these targets will not show up in Qt Creator at all. And I hope you would agree that changing the cmake configuration to remove all unwanted targets is very much within the scope of the project. For example, can you please tell me where "px4_iris", "px4_plane" etc. are defined as targets in the cmake process? If you show that after you clean up the cmake, these targets will not show up in Qt Creator, that's sufficient for me. Similarly, in build configuration, all targets starting with "gazebo" and "jmavsim" are not relevant, if they stop showing up when you clean up the build, that is good enough for me.
At no point will you have to change anything about Qt Creator. Qt Creator is simply how I'm reading this information, since I don't know cmake sufficiently to read all this information in CMakeLists.txt or Makefile.
As for Matlab, I did not know at the start of the project that their current toolbox does not work for our hardware. I've already written to them for assistance, and if you are not able to proceed on that front, I can accept that. In that case, we need to decide how exactly you will establish an interface with Matlab.
Interfacing with Matlab has been a part of the project scope from the beginning. It is required because we expect that the connection with QGC will not work once we have removed all the flight stack. Therefore, we need to make an interface where we can receive and send basic data to Pixhawk. We can discuss this over phone.
For Qt creator , CMakeLists modifications we will go through it and let you know.
For MATLAB interface issues, We will prepare up a small code for sensor data logging with the available toolbox. You let me know your purchased tool box details, so that we will check if there is any serial package in that.
In the meantime we will try installing Arduino package for simulink, and try to use the serial component in that to receive messages.
If you are able to install the Pixhawk Target Block on Matlab R2016b, it has a "Serial Read/Write" block. It may work with our hardware, I will check it today when I can get a spare Pixhawk to test. You can check on your end too.
As we checked last week, The pixhawk target block works only upto px4fmu-v2_default configuration, (PIXHAWK2 and not PIXHAWK2.1) (they have the toolbox files which automatically detect pixhawk2 and also its non-editable to modify for our case) . So if you find procedure for our pixhawk version do let us know so that we will proceed to check with it
Kindly paste the error you receive while building it in QT for "px4fmu-default" to analyse it
@aditya00j