-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial commit for Botui QT5 and Tello Support #73
Conversation
This commit is the initial commit incorporating Tello support into Botui. Tello support is a work-in-progress. With these patches to Botui along with the Tello support patches for libwallaby, one should be able to (1) start a Tello, (2) command that Tello start transmitting video, (3) then go the video page and see video output from the Tello. QT5 Support An artifact of adding Tello support is that Botui now uses QT5. This seems to perform quite well. Issues: (1) Need to integrate the code that finds and commands the Tello to start sending video into Botui. (2) Several graphics such as sensor output, etc. do not appear. Fixing these should be no problem for a QT expert. (3) The Qt4->Qt5 conversion was done by hand w/o the Qt tools, so there may be a couple of data structures that the Author did not get quite right. (4) This is not an all-inclusive list of issues, but we now have a working example of Botui using Qt5. Signed-off-by: Eugene Myers <cedarhouse@comcast.net>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Have a note about printf use, but everything else looks great. Thanks for putting this together!
@@ -87,6 +91,9 @@ void CvWidget::scaleImage() | |||
|
|||
cv::Mat resized; | |||
cv::resize(m_image, resized, cv::Size(width(), height())); | |||
::printf("CvWidget::scaleImage - width() %d height() %d\n", width(), height());fflush(NULL); | |||
::printf("CvWidget::scaleImage - m_image.rows %d cols %d resized.rows %d cols %d\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put these behind a DEBUG #ifdef
or remove them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And switching them to C++ style cout or qDebug() messages would also be great.
This gives the same result as Braden and I's attempts at updating to Qt5. It happens before any of the main program is even started (the seg fault exits before my print statement at the beginning of main). The stack error is the same as both of the previous attempts as well. It's almost certainly a dependency that was installed way back in development that does not play well with Qt5. I'm gonna try a few more things and hopefully try building all the software from a fresh image so I know all the dependencies are good and see if that will fix it. This is why I don't like the idea of just propagating the same OS image and snowballing bugs/errors/issues. Here is the gdb output: Program received signal SIGILL, Illegal instruction. (gdb) backtrace |
I ran into exactly this problem when I put this together. Give me a couple of days, because there is something there that I was able to take out the resolved this issue. I did have to beat this thing into submission to get everything to work... the onus is on me to let you know which stick I used. Also, the illegal instruction issue is a problem with gdb interacting with the nuances of libcrypto. Try doing a continue when you see this. Hopefully, you will get to the real problem. |
to get past gdb/ssl do this: Program received signal SIGILL /lib/arm-linux-gnueabihf/libcrypto.so.1.0.0 (gdb) handle SIGILL nostop noprint will allow your program to continue, gdb will just tell you that the signal was received. |
I rebuilt OpenSSL from source using the following steps. If you follow this, it would probably be better to use version 1.1.1k and not 1.0.2o #Mumbo Jumbo
sudo apt update
sudo apt install checkinstall zlib1g-dev -y
#Extract
cd /usr/local/src/
wget https://www.openssl.org/source/openssl-1.0.2o.tar.gz
tar -xf openssl-1.0.2o.tar.gz
cd /usr/local/src/openssl-1.0.2o
#Build
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib
make
make test
sudo make install
cd /etc/ld.so.conf.d/
echo "/usr/local/ssl/lib" > openssl-1.0.2o.conf
#Reload Dynamic Libraries (output should have libcrypto and libssl at 1.0.0 under /usr/local/ssl/lib)
sudo ldconfig -v
#Make some backups
mv /usr/bin/c_rehash /usr/bin/c_rehash.BEKUP
mv /usr/bin/openssl /usr/bin/openssl.BEKUP
#Setup env
vim /etc/environment
Paste This:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/ssl/bin"
source /etc/environment
#Check install
echo $PATH
which openssl
openssl version -a
|
After testing the UI the things that don't work are:
|
Good to see that you got it working. The (similar) problem I had when it crashed at that stage was that the qt4 and qt5 libraries got mixed and some shared libraries did not linked. I will test the camera view with a USB camera this weekend to see how it goes. I do need to fix the viewing size and there is a wierd bug in it that I have to resolve. Note: this has only been tested with the Tello camera. To get that all to work I needed to (1) update ffmpeg (needed the hardware codecs to support Tello), (2) update openCV (because the new ffmpeg did not play well with the loaded openCV), (3) the camera functions in libwallaby have been updated as well. I'm working to get this out as well. I'm thinking of using the ardrone widgets as a model to allow to switching between the USB camera and the Tello as well. |
This commit is the initial commit incorporating Tello support
into Botui. Tello support is a work-in-progress. With these
patches to Botui along with the Tello support patches for
libwallaby, one should be able to (1) start a Tello, (2) command
that Tello start transmitting video, (3) then go the video page
and see video output from the Tello.
QT5 Support
An artifact of adding Tello support is that Botui now uses QT5.
This seems to perform quite well.
Issues:
(1) Need to integrate the code that finds and commands the Tello
to start sending video into Botui.
(2) Several graphics such as sensor output, etc. do not appear.
Fixing these should be no problem for a QT expert.
(3) The Qt4->Qt5 conversion was done by hand w/o the Qt tools, so
there may be a couple of data structures that the Author did not
get quite right.
(4) This is not an all-inclusive list of issues, but we now have
a working example of Botui using Qt5.
Signed-off-by: Eugene Myers cedarhouse@comcast.net