Open jgvictores opened 6 years ago
Will be focusing on other robots for now, namely RD Ambassador https://github.com/asrob-uc3m/rd-ambassador/issues/1 as it is easy to build (you buy the chassis). :smile:
import->export to https://github.com/asrob-uc3m/rd2
The command protocol has changed in the last months; therefore, the robot server device run aboard the RD2 robot needs to be updated. Sadly, the CPU is a kinda old RasPi v2 with one single core and outdated packages, for instance, CMake 2.8.9. This means that a git pull
of the yarp-devices repo will deliver code that cannot be built with that software. The long term goal should be either migrating to a newer SO (not sure how this goes in the RasPi world) or replacing the CPU with, say, a modern RasPi V3(B). In the meantime, I'll try to backport the new interface/protocol in the commit tree that still worked on YARP 2.3.68.
From https://github.com/asrob-uc3m/robotDevastation-robots/issues/44 I see that for RD Ambassador at https://github.com/asrob-uc3m/rd-ambassador/issues/1 we have newer Raspis (v2 or even v3b) with Raspian Stretch. Raspian versions are equal to Debian's so https://packages.debian.org/stretch/cmake says we would have a nice cmake 3.7.2-1.
In the meantime, I'll try to backport the new interface/protocol in the commit tree that still worked on YARP 2.3.68.
I'd start with the repo state previous to commit https://github.com/asrob-uc3m/yarp-devices/commit/9f777d1b0eea82ffad8769307abc37f3361af598 (CMake bumped from 2.8.9 to 3+) and cherry pick https://github.com/asrob-uc3m/yarp-devices/commit/341a73c99f794567cf872485c04e159583a0f2f8.
Due to working with a one-core Raspi v2, I thought it would be nice to switch SDs with a Raspi v3, but that one only handles MicroSD, while RD2 has a full-sized SD. Apart from that, I have switched from gcc-4.6 to gcc-4.8 (C++11 feature-ready).
We could work with the microSD on Raspi v3, then fit it in an adapter (there are some in locker 1) for the SD of Raspi v2.
At the time of writing, RD2 runs CMake 3.5.2 (no ccmake, yet), YARP 2.3.72.1 with opencv_grabber and the mjpeg carrier, and latest rd-robots and yarp-devices repos. A linker issue was solved via https://github.com/asrob-uc3m/yarp-devices/commit/7db08bd3433396097e43ef8fc3906a62d2387a94. However, https://github.com/asrob-uc3m/rd2/issues/2 and https://github.com/asrob-uc3m/rd2/issues/3 are now blocking further progress.
We could work with the microSD on Raspi v3, then fit it in an adapter (there are some in locker 1) for the SD of Raspi v2.
I forgot to say that this didn't work due to not being able to log in the RasPi v3 (this solution suggested by @jgvictores on chat would require a working keyboard+display). I decided to spend a few hours compiling stuff (CMake took circa 1.5 hours, YARP was 2+).
However, #2 and #3 are now blocking further progress.
Done. Was caused by some obsolete .ini files, which leads us to...
Incorporate custom https://github.com/asrob-uc3m/robotDevastation-robots/tree/develop/scripts
In the first place, I think we should import robotDevastation-robots/share/launch, which actually holds the RD2-related port names and pinout configuration. However, this repository (as other similar robot-oriented) stores 3D models, schematics, pictures, etc. which I'm not especially eager to clone into the onboard RD2's storage just for the sake of copying a few tiny launcher scripts into some system location. Perhaps all config files should remain in robotDevastation-repos, conveniently renamed so that name clashes and conflicts are avoided? @jgvictores I believe you share some of my concerns given https://github.com/asrob-uc3m/robotDevastation-developer-manual/issues/12.
PS see https://github.com/asrob-uc3m/robotDevastation-developer-manual/issues/12#issuecomment-441367312.
8GB SDHC (large)
Attaching pic of this 8GB SDHC (large) (EDIT: Currently has Rasbian 7, we want 9)
It's really large! (You can fit so many wonders into 8 GB.)
Updated description on Prototype status: in robotera.
- Other issues are regarding number of USBs (only 2, used by camera and wifi) and not accesible without unscrewing
Attaching pic that illustrates this fact
Also attaching pic of electronics (we're note really sure if it's correct, but at least for now it hasn't crashed on init nor smelt like burnt)
EDIT: Connection seems correct given pinout in inner row:
Copying Raspi v3b+ contents from microSD to Toshiba 16 GB SD (preserving Lexar 8 GB SD) as explained at http://wiki.asrob.uc3m.es/index.php/Crear_SD_con_Raspbian_y_robotDevastation-robots/raspi_software_(avanzado:_de_cero).
Note: Pending https://github.com/asrob-uc3m/robotDevastation-developer-manual/issues/13) where documentation is being migrated to https://github.com/asrob-uc3m/robotDevastation-developer-manual/tree/master/robots (perma).
Replicated steps with big Toshiba 16 GB SD (fsarchiver
and fdisk
as explained staring at https://github.com/asrob-uc3m/rd-ambassador/issues/1#issuecomment-503223715) and got booting Raspian 9. :tada:
Turned on today. Raspian 9.8 (stretch). Regarding the two USB ports:
wlan0
interface is up!Raspian 9.8 (stretch) comes with cmake version 3.7.2, while YARP requires CMake 3.12 or higher. As https://apt.kitware.com/ PPA looks very Ubuntu-oriented, https://packages.debian.org/stretch-backports/cmake providing 3.16.3-1~bpo9+1
looks like a reasonable option.
Raspian doesn't release official backports. Ended up compiling cmake
(v3.17.2) from source. More than 6 hours on a single-core Raspi 1 (following https://github.com/roboticslab-uc3m/installation-guides/blob/31a01a0390b681f3ce4151d8cba1b8512ae3693c/install-cmake.md#openssl-support-older-distros-and-building-from-sources):
real 368m59.732s
user 330m55.951s
sys 24m16.750s
On branch yarp-3.3:
[100%] Building CXX object src/yarpdatadumper/CMakeFiles/yarpdatadumper.dir/main.cpp.o
/home/pi/repos/yarp/src/yarpdatadumper/main.cpp: In member function ?virtual void DumpThread::run()?:
/home/pi/repos/yarp/src/yarpdatadumper/main.cpp:489:52: error: ?fourcc? is not a member of ?cv::VideoWriter?
videoWriter.open(videoFile.c_str(),cv::VideoWriter::fourcc('H','F','Y','U'),
^~
src/yarpdatadumper/CMakeFiles/yarpdatadumper.dir/build.make:82: recipe for target 'src/yarpdatadumper/CMakeFiles/yarpdatadumper.dir/main.cpp.o' failed
make[2]: *** [src/yarpdatadumper/CMakeFiles/yarpdatadumper.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:5759: recipe for target 'src/yarpdatadumper/CMakeFiles/yarpdatadumper.dir/all' failed
make[1]: *** [src/yarpdatadumper/CMakeFiles/yarpdatadumper.dir/all] Error 2
Makefile:171: recipe for target 'all' failed
make: *** [all] Error 2
real 267m51.271s
user 245m42.829s
sys 14m15.315s
Via cmake .. -DYARP_COMPILE_yarpdatadumper:BOOL=OFF
(continuing single-core make
from where left off):
[100%] Built target yarpmanager-console
real 0m50.334s
user 0m31.973s
sys 0m16.286s
After installing dependencies, asrob-uc3m/yarp-devices
was:
[100%] Built target RobotServer
real 9m45.548s
user 8m42.032s
sys 0m43.627s
Wow! Raspi 3 B+ (nproc=4
) compiled cmake
(v3.17.2) in less than 20 min (compare to the more than 6 hours on Raspi 1 at https://github.com/asrob-uc3m/rd2/issues/1#issuecomment-629841963).
Compiling on Raspi 3 B+ but same setup as https://github.com/asrob-uc3m/rd2/issues/1#issuecomment-630006626; yes, yarp-3.3
compiles without GUIs, but it turns out there is an issue with the MJPEG carrier (for the record, using libjpeg8-dev
):
/home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.cpp:66:80: error: ‘JCS_EXT_RGBA’ was not declared in this scope
{VOCAB_PIXEL_RGBA , JCS_EXT_RGBA},
^~~~~~~~~~~~
/home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.cpp:67:80: error: ‘JCS_EXT_BGRA’ was not declared in this scope
{VOCAB_PIXEL_BGRA , JCS_EXT_BGRA},
^~~~~~~~~~~~
/home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.cpp:68:79: error: ‘JCS_EXT_BGR’ was not declared in this scope
{VOCAB_PIXEL_BGR , JCS_EXT_BGR} };
^~~~~~~~~~~
/home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.cpp:68:92: error: no matching function for call to ‘std::map<int, J_COLOR_SPACE>::map(<brace-enclosed initializer list>)’
{VOCAB_PIXEL_BGR , JCS_EXT_BGR} };
^
In file included from /usr/include/c++/6/map:61:0,
from /home/pi/repos/yarp/src/libYARP_sig/src/yarp/sig/Image.h:19,
from /home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegStream.h:18,
from /home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.h:16,
from /home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.cpp:45:
/usr/include/c++/6/bits/stl_map.h:273:9: note: candidate: template<class _InputIterator> std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator, const _Compare&, const allocator_type&)
map(_InputIterator __first, _InputIterator __last,
^~~
/usr/include/c++/6/bits/stl_map.h:273:9: note: template argument deduction/substitution failed:
/home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.cpp:68:92: note: candidate expects 4 arguments, 6 provided
{VOCAB_PIXEL_BGR , JCS_EXT_BGR} };
^
In file included from /usr/include/c++/6/map:61:0,
from /home/pi/repos/yarp/src/libYARP_sig/src/yarp/sig/Image.h:19,
from /home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegStream.h:18,
from /home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.h:16,
from /home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.cpp:45:
/usr/include/c++/6/bits/stl_map.h:256:9: note: candidate: template<class _InputIterator> std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator)
map(_InputIterator __first, _InputIterator __last)
^~~
/usr/include/c++/6/bits/stl_map.h:256:9: note: template argument deduction/substitution failed:
/home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.cpp:68:92: note: candidate expects 2 arguments, 6 provided
{VOCAB_PIXEL_BGR , JCS_EXT_BGR} };
^
In file included from /usr/include/c++/6/map:61:0,
from /home/pi/repos/yarp/src/libYARP_sig/src/yarp/sig/Image.h:19,
from /home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegStream.h:18,
from /home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.h:16,
from /home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.cpp:45:
/usr/include/c++/6/bits/stl_map.h:239:9: note: candidate: template<class _InputIterator> std::map<_Key, _Tp, _Compare, _Alloc>::map(_InputIterator, _InputIterator, const allocator_type&)
map(_InputIterator __first, _InputIterator __last,
^~~
/usr/include/c++/6/bits/stl_map.h:239:9: note: template argument deduction/substitution failed:
/home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.cpp:68:92: note: candidate expects 3 arguments, 6 provided
{VOCAB_PIXEL_BGR , JCS_EXT_BGR} };
^
In file included from /usr/include/c++/6/map:61:0,
from /home/pi/repos/yarp/src/libYARP_sig/src/yarp/sig/Image.h:19,
from /home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegStream.h:18,
from /home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.h:16,
from /home/pi/repos/yarp/src/carriers/mjpeg_carrier/MjpegCarrier.cpp:45:
/usr/include/c++/6/bits/stl_map.h:233:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(std::initializer_list<std::pair<const _Key, _Tp> >, const allocator_type&) [with _Key = int; _Tp = J_COLOR_SPACE; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, J_COLOR_SPACE> >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const int, J_COLOR_SPACE> >]
map(initializer_list<value_type> __l, const allocator_type& __a)
^~~
/usr/include/c++/6/bits/stl_map.h:233:7: note: candidate expects 2 arguments, 6 provided
/usr/include/c++/6/bits/stl_map.h:227:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(std::map<_Key, _Tp, _Compare, _Alloc>&&, const allocator_type&) [with _Key = int; _Tp = J_COLOR_SPACE; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, J_COLOR_SPACE> >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const int, J_COLOR_SPACE> >]
map(map&& __m, const allocator_type& __a)
^~~
/usr/include/c++/6/bits/stl_map.h:227:7: note: candidate expects 2 arguments, 6 provided
/usr/include/c++/6/bits/stl_map.h:223:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(const std::map<_Key, _Tp, _Compare, _Alloc>&, const allocator_type&) [with _Key = int; _Tp = J_COLOR_SPACE; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, J_COLOR_SPACE> >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const int, J_COLOR_SPACE> >]
map(const map& __m, const allocator_type& __a)
^~~
/usr/include/c++/6/bits/stl_map.h:223:7: note: candidate expects 2 arguments, 6 provided
/usr/include/c++/6/bits/stl_map.h:219:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(const allocator_type&) [with _Key = int; _Tp = J_COLOR_SPACE; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, J_COLOR_SPACE> >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const int, J_COLOR_SPACE> >]
map(const allocator_type& __a)
^~~
/usr/include/c++/6/bits/stl_map.h:219:7: note: candidate expects 1 argument, 6 provided
/usr/include/c++/6/bits/stl_map.h:211:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(std::initializer_list<std::pair<const _Key, _Tp> >, const _Compare&, const allocator_type&) [with _Key = int; _Tp = J_COLOR_SPACE; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, J_COLOR_SPACE> >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const int, J_COLOR_SPACE> >]
map(initializer_list<value_type> __l,
^~~
/usr/include/c++/6/bits/stl_map.h:211:7: note: candidate expects 3 arguments, 6 provided
/usr/include/c++/6/bits/stl_map.h:196:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(std::map<_Key, _Tp, _Compare, _Alloc>&&) [with _Key = int; _Tp = J_COLOR_SPACE; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, J_COLOR_SPACE> >]
map(map&& __x)
^~~
/usr/include/c++/6/bits/stl_map.h:196:7: note: candidate expects 1 argument, 6 provided
/usr/include/c++/6/bits/stl_map.h:185:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(const std::map<_Key, _Tp, _Compare, _Alloc>&) [with _Key = int; _Tp = J_COLOR_SPACE; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, J_COLOR_SPACE> >]
map(const map& __x)
^~~
/usr/include/c++/6/bits/stl_map.h:185:7: note: candidate expects 1 argument, 6 provided
/usr/include/c++/6/bits/stl_map.h:174:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map(const _Compare&, const allocator_type&) [with _Key = int; _Tp = J_COLOR_SPACE; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, J_COLOR_SPACE> >; std::map<_Key, _Tp, _Compare, _Alloc>::allocator_type = std::allocator<std::pair<const int, J_COLOR_SPACE> >]
map(const _Compare& __comp,
^~~
/usr/include/c++/6/bits/stl_map.h:174:7: note: candidate expects 2 arguments, 6 provided
/usr/include/c++/6/bits/stl_map.h:162:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::map() [with _Key = int; _Tp = J_COLOR_SPACE; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, J_COLOR_SPACE> >]
map()
^~~
/usr/include/c++/6/bits/stl_map.h:162:7: note: candidate expects 0 arguments, 6 provided
src/carriers/mjpeg_carrier/CMakeFiles/yarp_mjpeg.dir/build.make:95: recipe for target 'src/carriers/mjpeg_carrier/CMakeFiles/yarp_mjpeg.dir/MjpegCarrier.cpp.o' failed
make[2]: *** [src/carriers/mjpeg_carrier/CMakeFiles/yarp_mjpeg.dir/MjpegCarrier.cpp.o] Error 1
CMakeFiles/Makefile2:5724: recipe for target 'src/carriers/mjpeg_carrier/CMakeFiles/yarp_mjpeg.dir/all' failed
make[1]: *** [src/carriers/mjpeg_carrier/CMakeFiles/yarp_mjpeg.dir/all] Error 2
Makefile:171: recipe for target 'all' failed
make: *** [all] Error 2
Interesting, it probably deserves an upstream issue. Did you manage to compile previous YARP versions on that same HW/SW?
AFAIK (or recall), all previous working YARP versions were on Raspian 7, and these are the first attempts with Raspian 9. Nothing serious. It all boils down to:
yarpdatadumper
issue described above. We do not need this (for what it's worth, or any other GUI) on Raspi. In fact, the OS is headless and I installed a whole bunch of deps just to compile the GUIs. I'd leave it as a won't-fix/low-priority, if we ever run into it again, here it is.sudo apt install libjpeg62-turbo-dev
(previously removing other failed versions: both libjpeg8-dev
and libjpeg9-dev
)! (thanks: Larry the Git Cow
"Depend on 'media-libs/libjpeg-turbo' instead of 'virtual/jpeg', since 'media-libs/jpeg' causes issues such as build failures. Also remove the use of the patch specific to jpeg-9, which is no longer needed after this change." at https://bugs.gentoo.org/648200)At least in terms of RD/RD2, I think we're good to go with yarp-3.3
.
From @jgvictores on May 13, 2018 10:18
RD2 revival
Robot: https://github.com/asrob-uc3m/robotDevastation-robots/tree/develop/rd2 (permalink).
Prototype status: in robotera.
Raspi 1 screwed to chassis
Uses large SD card, has 8GB SDHC (large), seems functional but has Raspian 7 (not 9)
Other issues are regarding number of USBs (only 2, used by camera and wifi) and not accesible without unscrewing
[ ] Incorporate custom https://github.com/asrob-uc3m/robotDevastation-robots/tree/develop/scripts
[ ] Update documentation accordingly
[x] Fix camera (https://github.com/asrob-uc3m/rd2/issues/2)
[x] Fix motor controller (https://github.com/asrob-uc3m/rd2/issues/3)
Copied from original issue: asrob-uc3m/robotDevastation#134