moriarty / ros-ev3

How to install ROS (ros_comm) on an ev3 with ev3dev
GNU General Public License v2.0
24 stars 19 forks source link

Trying in Docker #16

Open MadsFox opened 7 years ago

MadsFox commented 7 years ago

Have tried following your instructions, but in docker and god this error when installing ROS through the catkin file: `-- Install configuration: "Release" CMake Error at cmake_install.cmake:38 (file): file problem creating directory: /opt/ros/indigo

Makefile:66: recipe for target 'install' failed make: *** [install] Error 1 <== Failed to process package 'catkin': Command '['make', 'install']' returned non-zero exit status 2

Reproduce this error by running: ==> cd /home/compiler/ros_comm/build_isolated/catkin && make install

Command failed, exiting. compiler@24d92cc7270f:~/ros_comm$ `

moriarty commented 7 years ago

likely /opt/ros didn't exist or isn't user writable... Usually when you install with sudo apt-get you run as super user and that will create /opt/ros...

try:

sudo mkdir -p /opt/ros
sudo chown -r $USER:$USER /opt/ros

which will make the directory, and then change ownership to your user ( if $USER isn't set, put your username there)

MadsFox commented 7 years ago

After being advised to use a stretch image, i have tried to follow the instructions but on a stretch docker image(ev3dev/ev3dev-stretch-ev3-generic). First i have to log on as root to be able to use apt-get update: $ apt-get update Reading package lists... Done W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted) E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/

Then when logged in on root i get this error when trying to run the bash script. `

bash ros-dependencies.debs

Reading package lists... Done Building dependency tree
Reading state information... Done Package liblog4cxx10 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: liblog4cxx10v5

E: Package 'liblog4cxx10' has no installation candidate `

Tried to continue anyway, but didn't have pip installed: pip install -U rosdep rosinstall_generator wstool rosinstall catkin_pkg rospkg bash: pip: command not found

Installed pip via easy_install pip and then it installed the python packages. After running the install script: INSTALL_ROOT=/usr/local sh install.sh it shows this message: Documentation: man /usr/local/share/man/man1/sbcl.1 /bin/cp: cannot stat 'doc/manual/*.info': No such file or directory /bin/cp: cannot stat 'doc/manual/*.info-*': No such file or directory /bin/cp: cannot stat 'doc/manual/*.pdf': No such file or directory /bin/cp: cannot stat 'doc/manual/sbcl.html': No such file or directory /bin/cp: cannot stat 'doc/manual/asdf.html': No such file or directory

Ran the rosdep init and added the reference to the yaml script and ran rosdep update. But when running rosdep i get this message: rosdep check --from-paths src --ignore-src --rosdistro indigo -y --os=debian:jessie dpkg-query: no packages found matching python-nose dpkg-query: no packages found matching liblog4cxx10-dev dpkg-query: no packages found matching python-yaml dpkg-query: no packages found matching python-empy dpkg-query: no packages found matching python-netifaces dpkg-query: no packages found matching libtinyxml-dev dpkg-query: no packages found matching python-paramiko dpkg-query: no packages found matching python-coverage dpkg-query: no packages found matching libbz2-dev dpkg-query: no packages found matching python-mock dpkg-query: no packages found matching python-numpy dpkg-query: no packages found matching libapr1-dev dpkg-query: no packages found matching libconsole-bridge-dev dpkg-query: no packages found matching libboost-all-dev dpkg-query: no packages found matching libgtest-dev dpkg-query: no packages found matching python-imaging dpkg-query: no packages found matching libaprutil1-dev dpkg-query: no packages found matching liblz4-dev System dependencies have not been satisified: apt python-yaml apt python-paramiko apt cmake apt libboost-all-dev apt python-empy apt python-netifaces apt libtinyxml-dev apt python-numpy apt python-mock apt libgtest-dev apt python-imaging apt libapr1-dev apt python-nose apt python-coverage apt liblz4-dev apt libconsole-bridge-dev apt pkg-config apt libaprutil1-dev apt libbz2-dev apt python-dev apt liblog4cxx10-dev

Continued and tried to install anyway, but get this message: ==> Processing catkin package: 'catkin' ==> Creating build directory: 'build_isolated/catkin' ==> cmake /home/robot/ros_comm/src/catkin -DCATKIN_DEVEL_PREFIX=/home/robot/ros_comm/devel_isolated/catkin -DCMAKE_INSTALL_PREFIX=/opt/ros/indigo -DCMAKE_BUILD_TYPE=Release -G Unix Makefiles in '/home/robot/ros_comm/build_isolated/catkin' Unhandled exception of type 'OSError': Traceback (most recent call last): File "./src/catkin/bin/../python/catkin/builder.py", line 965, in build_workspace_isolated number=index + 1, of=len(ordered_packages) File "./src/catkin/bin/../python/catkin/builder.py", line 665, in build_package destdir=destdir, use_ninja=use_ninja File "./src/catkin/bin/../python/catkin/builder.py", line 397, in build_catkin_package run_command_colorized(cmake_cmd, build_dir, quiet, add_env=add_env) File "./src/catkin/bin/../python/catkin/builder.py", line 187, in run_command_colorized run_command(cmd, cwd, quiet=quiet, colorize=True, add_env=add_env) File "./src/catkin/bin/../python/catkin/builder.py", line 205, in run_command raise OSError("Failed command '%s': %s" % (cmd, e)) OSError: Failed command '['cmake', '/home/robot/ros_comm/src/catkin', '-DCATKIN_DEVEL_PREFIX=/home/robot/ros_comm/devel_isolated/catkin', '-DCMAKE_INSTALL_PREFIX=/opt/ros/indigo', '-DCMAKE_BUILD_TYPE=Release', '-G', 'Unix Makefiles']': [Errno 2] No such file or directory <== Failed to process package 'catkin': Failed command '['cmake', '/home/robot/ros_comm/src/catkin', '-DCATKIN_DEVEL_PREFIX=/home/robot/ros_comm/devel_isolated/catkin', '-DCMAKE_INSTALL_PREFIX=/opt/ros/indigo', '-DCMAKE_BUILD_TYPE=Release', '-G', 'Unix Makefiles']': [Errno 2] No such file or directory Command failed, exiting.

I am really beginning to be desperat for a way to make this work, my next step is to down grade everything and try to follow the directions to the point and ignore every message of things being outdated, obsolete or deprecated.

moriarty commented 7 years ago

I've dusted off my EV3 and logged in for the first time in over a year...

robot@192.168.178.29's password: 
             _____     _
   _____   _|___ /  __| | _____   __
  / _ \ \ / / |_ \ / _` |/ _ \ \ / /
 |  __/\ V / ___) | (_| |  __/\ V /
  \___| \_/ |____/ \__,_|\___| \_/

Debian jessie on LEGO MINDSTORMS EV3!

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Apr 11 21:46:47 2016 from 192.168.88.238
robot@ev3dev:~$ uname -a
Linux ev3dev.local 3.16.7-ckt21-9-ev3dev-ev3 #1 PREEMPT Tue Dec 15 15:16:17 CST 2015 armv5tejl GNU/Linux
robot@ev3dev:~$ 

I'll run through the steps which @dlech mentioned in https://github.com/ev3dev/ev3dev/issues/854#issuecomment-333884901

moriarty commented 7 years ago

Before I wipe my brick I was just looking at what is on it, and found this quick proof-of-concept cpp test node: https://github.com/moriarty/ev3dev_ros_demo

But like was already mentioned in another issue, I only checked a basic publisher/subscriber, apparently ros services, and maybe some large data structures will not work.

moriarty commented 7 years ago

Wow. @dlech the whole EV3 + ROS process now seems so simple. @IanTheEngineer (I think) we were discussing ROS+EV3? I'm tagging you here to let you know the process now seems really simple... maybe worth dusting off your EV3 too.

To recap, all you need to do to install ROS should be...

  1. Flash an SD card with ev3dev-stretch
  2. Boot it
  3. Connect the EV3 to the Internet
  4. Open an SSH terminal
  5. sudo apt update
  6. sudo apt install ros-robot

It's currently on step 6, and I'll go to sleep before it finishes.

I was already impressed when I followed: http://www.ev3dev.org/docs/getting-started/#step-2-flash-the-sd-card and saw Etcher for the first time and thought, wow no more dd 👍

robot@ev3dev:~$ sudo apt install ros-robot
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  bash-completion binutils catkin cmake cmake-data cpp cpp-6
  docutils-common docutils-doc fonts-liberation gcc gcc-6
  googletest graphviz joint-state-publisher libactionlib0d libann0
  libapr1 libaprutil1 libarchive13 libasan3 libatomic1
  libbondcpp0d libboost-atomic1.62.0 libboost-date-time1.62.0
  libboost-filesystem1.62.0 libboost-program-options1.62.0
  libboost-regex1.62.0 libboost-signals1.62.0 libc-dev-bin
  libc6-dev libcc1-0 libcdt5 libcgraph6 libclass-loader0d
  libconsole-bridge0.2v5 libcpp-common0d libcurl3 libgcc-6-dev
  libgd3 libgtest-dev libgts-0.7-5 libgts-bin libgvc6 libgvpr2
  libisl15 libjsoncpp1 liblog4cxx10v5 libltdl7
  libmessage-filters1d libmpc3 libmpfr4 libnodeletlib-tools
  libnodeletlib0d libpaper-utils libpaper1 libpathplan4
  libpocofoundation46 librosbag-storage1d librosbag2d
  librosconsole2d libroscpp-serialization0d libroscpp1d
  libroslib0d libroslz4-1d librospack0d librostime0d libtf0d
  libtf2-0d libtf2-ros0d libtinyxml2.6.2v5 libtopic-tools1d
  libubsan0 libuv1 libxaw7 libxdot4 libxmlrpcpp1d libxmu6 libxpm4
  libxt6 linux-libc-dev make manpages manpages-dev
  python-catkin-pkg python-cffi-backend python-chardet
  python-cryptography python-dateutil python-defusedxml
  python-docutils python-empy python-enum34 python-funcsigs
  python-genmsg python-genpy python-geometry-msgs python-idna
  python-ipaddress python-message-filters python-mock
  python-netifaces python-paramiko python-pbr python-pil
  python-pyasn1 python-pygments python-roman python-rosbag
  python-rosclean python-roscpp-msgs python-rosgraph
  python-rosgraph-msgs python-roslaunch python-roslib
  python-roslz4 python-rosmaster python-rosmsg python-rosnode
  python-rosparam python-rospkg python-rospy python-rosservice
  python-rostopic python-roswtf python-sensor-msgs python-std-msgs
  python-tf python-yaml ros-base ros-core rosbash rosout sgml-base
  tf-tools tf2-tools topic-tools xml-core
Suggested packages:
  binutils-doc codeblocks eclipse ninja-build cpp-doc
  gcc-6-locales gcc-multilib autoconf automake libtool flex bison
  gdb gcc-doc gcc-6-doc libgcc1-dbg libgomp1-dbg libitm1-dbg
  libatomic1-dbg libasan3-dbg liblsan0-dbg libtsan0-dbg
  libubsan0-dbg libcilkrts5-dbg libmpx2-dbg libquadmath0-dbg
  gsfonts graphviz-doc lrzip glibc-doc libgd-tools zip make-doc
  man-browser python-cryptography-doc python-cryptography-vectors
  fonts-linuxlibertine | ttf-linux-libertine texlive-lang-french
  texlive-latex-base texlive-latex-recommended python-enum34-doc
  python-funcsigs-doc python-mock-doc python-gssapi python-pil-doc
  python-pil-dbg doc-base ttf-bitstream-vera sgml-base-doc
  debhelper
The following NEW packages will be installed:
  bash-completion binutils catkin cmake cmake-data cpp cpp-6
  docutils-common docutils-doc fonts-liberation gcc gcc-6
  googletest graphviz joint-state-publisher libactionlib0d libann0
  libapr1 libaprutil1 libarchive13 libasan3 libatomic1
  libbondcpp0d libboost-atomic1.62.0 libboost-date-time1.62.0
  libboost-filesystem1.62.0 libboost-program-options1.62.0
  libboost-regex1.62.0 libboost-signals1.62.0 libc-dev-bin
  libc6-dev libcc1-0 libcdt5 libcgraph6 libclass-loader0d
  libconsole-bridge0.2v5 libcpp-common0d libcurl3 libgcc-6-dev
  libgd3 libgtest-dev libgts-0.7-5 libgts-bin libgvc6 libgvpr2
  libisl15 libjsoncpp1 liblog4cxx10v5 libltdl7
  libmessage-filters1d libmpc3 libmpfr4 libnodeletlib-tools
  libnodeletlib0d libpaper-utils libpaper1 libpathplan4
  libpocofoundation46 librosbag-storage1d librosbag2d
  librosconsole2d libroscpp-serialization0d libroscpp1d
  libroslib0d libroslz4-1d librospack0d librostime0d libtf0d
  libtf2-0d libtf2-ros0d libtinyxml2.6.2v5 libtopic-tools1d
  libubsan0 libuv1 libxaw7 libxdot4 libxmlrpcpp1d libxmu6 libxpm4
  libxt6 linux-libc-dev make manpages manpages-dev
  python-catkin-pkg python-cffi-backend python-chardet
  python-cryptography python-dateutil python-defusedxml
  python-docutils python-empy python-enum34 python-funcsigs
  python-genmsg python-genpy python-geometry-msgs python-idna
  python-ipaddress python-message-filters python-mock
  python-netifaces python-paramiko python-pbr python-pil
  python-pyasn1 python-pygments python-roman python-rosbag
  python-rosclean python-roscpp-msgs python-rosgraph
  python-rosgraph-msgs python-roslaunch python-roslib
  python-roslz4 python-rosmaster python-rosmsg python-rosnode
  python-rosparam python-rospkg python-rospy python-rosservice
  python-rostopic python-roswtf python-sensor-msgs python-std-msgs
  python-tf python-yaml ros-base ros-core ros-robot rosbash rosout
  sgml-base tf-tools tf2-tools topic-tools xml-core
0 upgraded, 139 newly installed, 0 to remove and 2 not upgraded.
Need to get 40.1 MB of archives.
After this operation, 173 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
gavanderhoorn commented 7 years ago

I believe I suggested using upstream Debian pkgs to get ROS onto the brick (in #14), and it does make things rather easy - especially when compared to building things from source.

But as easy as it is, it is important to remember that the Debian pkgs are essentially 'frozen', ie: snapshots of a certain state of ROS that will not get any (many?) of the updates that the regular ROS packages will see during the time a particular ROS release is supported.

It's also not entirely clear which ROS release the upstream packages are compatible with (to me, at least).

Finally: for basic comms this will probably not matter much, as the core hasn't changed that much the past couple years, but it is important to keep all of this in mind.

moriarty commented 7 years ago

Thanks @gavanderhoorn !

AnushRobotics commented 4 years ago

E: Failed to fetch http://httpredir.debian.org/debian/pool/main/a/apr/libapr1_1.5.2-5_armel.deb Hash Sum mismatch what is behind this error and how to solve this error? @moriarty please help us