RoboticsAcademy icon indicating copy to clipboard operation
RoboticsAcademy copied to clipboard

[New Commers Issue] script deprecation warning

Open pawanw17 opened this issue 2 years ago • 48 comments

While building a miniRADI, there is a warning in an old script that we use that leads to 1 min wait time, replace this script with an ideal updated one.

RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs && npm install -g yarn

image

pawanw17 avatar Jan 02 '24 19:01 pawanw17

I would like to work on this issue. Just to ask one time, is this issue resolved or anyone else is working on this issue?

lavish123409 avatar Jan 14 '24 17:01 lavish123409

@lavish123409 Feel free to work on this issue, you can find the steps to build a miniRADI here: https://github.com/JdeRobot/RoboticsAcademy/blob/master/docs/generate_a_mini_radi.md

pawanw17 avatar Jan 14 '24 18:01 pawanw17

So according to my understanding, RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs && npm install -g yarn is the old script for which I have to search a new ideal one and then update it. Am I going right?

lavish123409 avatar Jan 14 '24 19:01 lavish123409

@lavish123409 Yes that's correct

pawanw17 avatar Jan 15 '24 17:01 pawanw17

@pawanw17 On digging up on the problem, I found out that it is trying to install the nodejJS version which is deprecated. So, I should change the version of node to either 21x, 20x or 18x as mentioned here. So, should I choose any specific version that does not break any code or we can use any node version?

lavish123409 avatar Jan 17 '24 17:01 lavish123409

Hi @lavish123409, we would prefer the latest version on node that doesn't break our code, I see that you have already done that, that's great! Can you also update the dependencies-humble docker file https://github.com/JdeRobot/RoboticsAcademy/blob/74e2848f9d2164b3ed65387348c834a683c9ad4f/scripts/mini_RADI/Dockerfile.dependencies_humble#L135

Make sure to locally test the UI

pawanw17 avatar Jan 21 '24 19:01 pawanw17

Hey @pawanw17, I have made that change in the file. https://github.com/JdeRobot/RoboticsAcademy/blob/74e2848f9d2164b3ed65387348c834a683c9ad4f/scripts/mini_RADI/Dockerfile.dependencies_humble#L135

Can you tell me how can I locally test the UI? Thanks

lavish123409 avatar Jan 28 '24 06:01 lavish123409

Hi @lavish123409 ,

take a look at the documentation for developers of RoboticsAcademy.

The CustomRobots repository has been renamed as RoboticsInfrastructure , which has now a CustomRobots directory. There are some updates to the documentation pending, but it is a good reference.

jmplaza avatar Jan 28 '24 09:01 jmplaza

It failed on my system. Don't know whether it is because of my change or some other problem. Here, is the error.

=> ERROR [10/26] RUN /bin/bash -c '. /opt/ros/$ROS_DISTRO/setup.bash; cd /catkin_ws; catkin build'                                                                                                  540.6s 
------                                                                                                                                                                                                      
 > [10/26] RUN /bin/bash -c '. /opt/ros/$ROS_DISTRO/setup.bash; cd /catkin_ws; catkin build':                                                                                                               
3.108 -----------------------------------------------                                                                                                                                                       
3.108 Profile:                     default                                                                                                                                                                  
3.108 Extending:             [env] /opt/ros/noetic                                                                                                                                                          
3.108 Workspace:                   /catkin_ws                                                                                                                                                               
3.108 -----------------------------------------------
3.108 Build Space:        [exists] /catkin_ws/build
3.108 Devel Space:        [exists] /catkin_ws/devel
3.108 Install Space:      [unused] /catkin_ws/install
3.108 Log Space:         [missing] /catkin_ws/logs
3.108 Source Space:       [exists] /catkin_ws/src
3.108 DESTDIR:            [unused] None
3.108 -----------------------------------------------
3.108 Devel Space Layout:          linked
3.108 Install Space Layout:        None
3.108 -----------------------------------------------
3.108 Additional CMake Args:       None
3.108 Additional Make Args:        None
3.108 Additional catkin Make Args: None
3.108 Internal Make Job Server:    True
3.108 Cache Job Environments:      False
3.108 -----------------------------------------------
3.108 Buildlisted Packages:        None
3.108 Skiplisted Packages:         None
3.108 -----------------------------------------------
3.108 Workspace configuration appears valid.
3.108 
3.108 NOTE: Forcing CMake to run for each package.
3.108 -----------------------------------------------
3.108 [build] Found 24 packages in 0.0 seconds.                                      
3.108 [build] Updating package table.                                                
3.108 Starting >>> catkin_tools_prebuild                                             
Finished <<< catkin_tools_prebuild                  [ 2.5 seconds ]            ld... 
5.621 Starting >>> drone_assets                                                      
5.621 Starting >>> drone_circuit_assets                                              
5.621 Starting >>> kobuki_gazebo_plugins                                             
5.621 Starting >>> mavlink                                                           
5.621 Starting >>> mavros_msgs                                                       
5.621 Starting >>> rqt_ground_robot_teleop                                           
5.621 Starting >>> stdr_msgs                                                         
5.621 Starting >>> stdr_resources                                                    
Finished <<< stdr_resources                         [ 4.0 seconds ]             0.1] 
Finished <<< drone_circuit_assets                   [ 4.1 seconds ]            4.... 
Finished <<< rqt_ground_robot_teleop                [ 5.2 seconds ]            in... 
Finished <<< mavlink                                [ 5.7 seconds ]            in... 
Finished <<< stdr_msgs                              [ 15.5 seconds ]           in... 
21.04 Starting >>> libmavconn                                                        
Finished <<< mavros_msgs                            [ 1 minute and 44.3 seconds ]... 
Finished <<< libmavconn                             [ 5 minutes and 54.9 seconds ].. 
Failed <<< drone_assets                           [ 6 minutes and 34.5 seconds ]e... 
400.6 Abandoned <<< mavros                                 [ Unrelated job failed ]  
400.6 Abandoned <<< stdr_parser                            [ Unrelated job failed ]  
400.6 Abandoned <<< stdr_samples                           [ Unrelated job failed ]  
400.6 Abandoned <<< stdr_server                            [ Unrelated job failed ]  
400.6 Abandoned <<< jderobot_drones                        [ Unrelated job failed ]  
400.6 Abandoned <<< drone_wrapper                          [ Unrelated job failed ]  
400.6 Abandoned <<< mavros_extras                          [ Unrelated job failed ]  
400.6 Abandoned <<< rotors_driver                          [ Unrelated job failed ]  
400.6 Abandoned <<< rqt_drone_teleop                       [ Unrelated job failed ]  
400.6 Abandoned <<< stdr_launchers                         [ Unrelated job failed ]  
400.6 Abandoned <<< stdr_robot                             [ Unrelated job failed ]  
400.6 Abandoned <<< stdr_gui                               [ Unrelated job failed ]  
400.6 Abandoned <<< stdr_simulator                         [ Unrelated job failed ]  
400.6 Abandoned <<< tello_driver                           [ Unrelated job failed ]  
400.6 Abandoned <<< test_mavros                            [ Unrelated job failed ]  
Finished <<< kobuki_gazebo_plugins                  [ 6 minutes and 34.9 seconds ].. 
401.0 [build] Summary: 9 of 25 packages succeeded.                                   
401.0 [build] Ignored: None.                                                         
401.0 [build] Warnings: None.                                                        
401.0 [build] Abandoned: 15 packages were abandoned.                                 
401.0 [build] Failed: 1 packages failed.                                             
401.0 [build] Runtime: 6 minutes and 37.9 seconds total.                             
401.0 [build] Note: Workspace packages have changed, please re-source setup files to use them.
401.0 _______________________________________________________________________________
401.0 Errors << drone_assets:make /catkin_ws/logs/drone_assets/build.make.000.log    
401.0 c++: fatal error: Killed signal terminated program cc1plus
401.0 compilation terminated.
401.0 make[2]: *** [CMakeFiles/wall1plugin.dir/build.make:63: CMakeFiles/wall1plugin.dir/plugins/wall1.cc.o] Error 1
401.0 make[1]: *** [CMakeFiles/Makefile2:268: CMakeFiles/wall1plugin.dir/all] Error 2
401.0 make[1]: *** Waiting for unfinished jobs....
401.0 c++: fatal error: Killed signal terminated program cc1plus
401.0 compilation terminated.
401.0 make[2]: *** [CMakeFiles/wall3plugin.dir/build.make:63: CMakeFiles/wall3plugin.dir/plugins/wall3.cc.o] Error 1
401.0 make[1]: *** [CMakeFiles/Makefile2:889: CMakeFiles/wall3plugin.dir/all] Error 2
401.0 c++: fatal error: Killed signal terminated program cc1plus
401.0 compilation terminated.
401.0 make[2]: *** [CMakeFiles/wall2plugin.dir/build.make:63: CMakeFiles/wall2plugin.dir/plugins/wall2.cc.o] Error 1
401.0 make[1]: *** [CMakeFiles/Makefile2:241: CMakeFiles/wall2plugin.dir/all] Error 2
401.0 make: *** [Makefile:141: all] Error 2
401.0 cd /catkin_ws/build/drone_assets; catkin build --get-env drone_assets | catkin env -si  /usr/bin/make --jobserver-auth=3,4; cd -
401.0 
401.0 ...............................................................................
401.0 Failed << drone_assets:make                       [ Exited with code 2 ]       
------
Dockerfile.mini_noetic:29
--------------------
  27 |     
  28 |     RUN cd /catkin_ws && rosdep update && rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y
  29 | >>> RUN /bin/bash -c '. /opt/ros/$ROS_DISTRO/setup.bash; cd /catkin_ws; catkin build'
  30 |     
  31 |     #ROScontrol and LIDAR
--------------------
ERROR: failed to solve: process "/bin/sh -c /bin/bash -c '. /opt/ros/$ROS_DISTRO/setup.bash; cd /catkin_ws; catkin build'" did not complete successfully: exit code: 1

lavish123409 avatar Jan 28 '24 13:01 lavish123409

Hi @lavish123409, This error doesn't look like it came from your change, I am looking into it, meanwhile you can test the UI without building the RADI using the steps given here https://github.com/JdeRobot/RoboticsAcademy/blob/master/docs/InstructionsForDevelopers.md

Until only step 5 and you should be able to open the UI on a browser at 0.0.0.0:7164

pawanw17 avatar Feb 01 '24 05:02 pawanw17

@lavish123409 Unfortunately I am not seeing this issue while building the RADI, I believe you used parameters of humble in the build.sh script while building noetic.

To build for noetic please use something like ./build.sh -f --academy master --infra noetic-devel --ram main --ros noetic --tag noetic_master

pawanw17 avatar Feb 01 '24 06:02 pawanw17

@lavish123409 It seems that our code breaks on the latest script

pawanw17 avatar Feb 01 '24 07:02 pawanw17

Hey @pawanw17, I think that the UI is working fine.

image I am supposing that I would not be able to open any exercise without the RADI. image

Regarding this comment, Is there anything that I can do on my side?

lavish123409 avatar Feb 01 '24 15:02 lavish123409

Hi @lavish123409 I have checked again by building the RADI, the version seems to break the UI, you might be using an old version on your machine while testing the UI, please confirm the output of

node -v

image

pawanw17 avatar Feb 02 '24 05:02 pawanw17

Yes @pawanw17, indeed it is an older version of node.

$ node -v
v12.22.9

What version of node should I upgrade to in order to see the error or should I just change the version of node in the Dockerfile, so that the error resolves?

lavish123409 avatar Feb 02 '24 15:02 lavish123409

Removing and Installing different node versions on your primary machine could mess things up for you. I suggest changing the node version in a docker image and try building our UI and see which version doesn't break it. The steps for building the UI can be found here: https://github.com/JdeRobot/RoboticsAcademy/blob/master/docs/InstructionsForDevelopers.md

pawanw17 avatar Feb 02 '24 16:02 pawanw17

I ran the build script again with node 20x in Dockerfile but I faced same error again. On seeing this error, I realised that it is a different error from mine and it is happening after that command which is giving my error.

I am facing error at this command in Dockerfile

RUN /bin/bash -c '. /opt/ros/$ROS_DISTRO/setup.bash; cd /catkin_ws; catkin build'

and I don't have any idea about what does this command do and how to resolve it? Any suggestions @pawanw17

lavish123409 avatar Feb 03 '24 07:02 lavish123409

@lavish123409 How are you running the script can you share the command?

pawanw17 avatar Feb 03 '24 07:02 pawanw17

Just the ./build.sh command

$ ./build.sh
ROBOTICS_ACADEMY:-------------:master
ROBOTICS_INFRASTRUCTURE:------:noetic-devel
RAM:--------------------------:main
ROS_DISTRO:-------------------:noetic
IMAGE_TAG:--------------------:test

===================== BUILDING noetic BASE IMAGE =====================
Building base using Dockerfile.dependencies_noetic for ROS noetic
[+] Building 85.7s (34/34) FINISHED  

lavish123409 avatar Feb 03 '24 11:02 lavish123409

@lavish123409 I have a hunch that this is because something went wrong while building the base image can you try

./build.sh -F

This will force rebuilding of the base RADI

pawanw17 avatar Feb 03 '24 13:02 pawanw17

The output of command is this.

$ ./build.sh
ROBOTICS_ACADEMY:-------------:master
ROBOTICS_INFRASTRUCTURE:------:noetic-devel
RAM:--------------------------:main
ROS_DISTRO:-------------------:noetic
IMAGE_TAG:--------------------:test

===================== BUILDING noetic BASE IMAGE =====================
Building base using Dockerfile.dependencies_noetic for ROS noetic
[+] Building 85.7s (34/34) FINISHED                                                                                                                                                    docker:desktop-linux
 => [internal] load build definition from Dockerfile.dependencies_noetic                                                                                                                               0.5s
 => => transferring dockerfile: 10.76kB                                                                                                                                                                0.0s
 => [internal] load .dockerignore                                                                                                                                                                      0.4s
 => => transferring context: 2B                                                                                                                                                                        0.1s
 => [internal] load metadata for docker.io/nvidia/opengl:1.2-glvnd-runtime-ubuntu20.04                                                                                                                 3.9s
 => [ 1/30] FROM docker.io/nvidia/opengl:1.2-glvnd-runtime-ubuntu20.04@sha256:4480cecadba0bd3763d7c4934225620210527e3d985dff0e34855cb87e2fc1db                                                         0.0s
 => CACHED [ 2/30] RUN apt-get clean &&     apt-get update &&     apt-get install --no-install-recommends -y locales &&     rm -rf /var/lib/apt/lists/* &&     locale-gen en_US.UTF-8                  0.0s
 => CACHED [ 3/30] RUN apt-get update && apt-get install -y         software-properties-common         apt-utils         build-essential make gcc git         ca-certificates         curl wget        0.0s
 => CACHED [ 4/30] RUN tasksel install lubuntu-core lubuntu-desktop                                                                                                                                    0.0s
 => CACHED [ 5/30] RUN wget --no-check-certificate https://deac-fra.dl.sourceforge.net/project/virtualgl/3.0/virtualgl_3.0_amd64.deb &&     wget --no-check-certificate https://kumisystems.dl.source  0.0s
 => CACHED [ 6/30] RUN git clone https://github.com/novnc/noVNC.git -b v1.2.0 &&  cd noVNC/utils &&  git clone https://github.com/novnc/websockify websockify -b v0.9.0                                0.0s
 => CACHED [ 7/30] RUN apt-get update && apt-get install -y --no-install-recommends         dbus-x11         libdbus-c++-1-0v5 &&     rm -rf /var/lib/apt/lists/*                                      0.0s
 => CACHED [ 8/30] RUN apt-get update && apt-get -y --quiet --no-install-recommends install         bzip2         ca-certificates         ccache         cmake         cppcheck         curl           0.0s
 => CACHED [ 9/30] RUN apt-get update && apt-get install -y libgtest-dev cmake &&     cd /usr/src/gtest  && mkdir build && cd build  && cmake .. && make -j$(nproc)  && find . -name *.a -exec cp {}   0.0s
 => CACHED [10/30] RUN python3 -m pip install --upgrade pip==23.2.1 wheel==0.41.2 setuptools==68.2.2                                                                                                   0.0s
 => CACHED [11/30] RUN python3 -m pip install argparse==1.4.0 argcomplete==3.1.2 coverage==7.3.2 cerberus==1.3.5 empy==3.3.4 jinja2==3.1.2 kconfiglib==14.1.0   matplotlib==3.0.* numpy nunavut==1.1.  0.0s
 => CACHED [12/30] RUN ln -sf /usr/bin/ccache /usr/lib/ccache/cc  && ln -sf /usr/bin/ccache /usr/lib/ccache/c++                                                                                        0.0s
 => CACHED [13/30] RUN wget -q https://downloads.sourceforge.net/project/astyle/astyle/astyle%203.1/astyle_3.1_linux.tar.gz -O /tmp/astyle.tar.gz  && cd /tmp && tar zxf astyle.tar.gz && cd astyle/s  0.0s
 => CACHED [14/30] RUN wget -q "https://services.gradle.org/distributions/gradle-6.3-rc-4-bin.zip" -O /tmp/gradle-6.3-rc-4-bin.zip  && mkdir /opt/gradle  && cd /tmp  && unzip -d /opt/gradle gradle-  0.0s
 => CACHED [15/30] RUN git clone https://github.com/eProsima/foonathan_memory_vendor.git /tmp/foonathan_memory  && cd /tmp/foonathan_memory  && mkdir build && cd build  && cmake ..  && cmake --buil  0.0s
 => CACHED [16/30] RUN git clone --recursive https://github.com/eProsima/Fast-DDS.git -b v2.1.0 /tmp/FastRTPS-2.1.0  && cd /tmp/FastRTPS-2.1.0  && mkdir build && cd build  && cmake -DTHIRDPARTY=ON   0.0s
 => CACHED [17/30] RUN git clone --recursive https://github.com/eProsima/Fast-DDS-Gen.git -b v1.0.4 /tmp/Fast-RTPS-Gen-1.0.4  && cd /tmp/Fast-RTPS-Gen-1.0.4  && gradle assemble  && gradle install    0.0s
 => CACHED [18/30] RUN wget --quiet http://packages.osrfoundation.org/gazebo.key -O - | apt-key add -  && sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -sc` m  0.0s
 => CACHED [19/30] RUN apt-get update && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654  && sh -c 'echo "deb http://packages.ros.org/ros/u  0.0s
 => CACHED [20/30] RUN pip3 install -U     osrf-pycommon                                                                                                                                               0.0s
 => CACHED [21/30] RUN apt-get update &&     apt upgrade -y --quiet --no-install-recommends libignition-common3-graphics                                                                               0.0s
 => CACHED [22/30] RUN git clone --recursive https://github.com/PX4/PX4-Autopilot.git -b v1.11.3     && cd /PX4-Autopilot     && DONT_RUN=1 make px4_sitl gazebo                                       0.0s
 => CACHED [23/30] RUN apt-get update && apt-get -y --quiet --no-install-recommends install   ros-noetic-kobuki-msgs   xmlstarlet   ros-noetic-turtlebot3-description  && apt-get -y autoremove  && a  0.0s
 => CACHED [24/30] RUN pip3 install websocket_server posix-ipc django==4.1.7 djangorestframework==3.13.1 django-webpack-loader==1.5.0 django-cors-headers==3.14.0                                      0.0s
 => CACHED [25/30] RUN python3.8 -m pip install websockets==11.0.3 asyncio==3.4.3                                                                                                                      0.0s
 => CACHED [26/30] RUN python3.8 -m pip install transitions==0.9.0 pydantic==2.4.2 websocket-client==1.6.4                                                                                             0.0s
 => CACHED [27/30] RUN pip install pylint==2.17.7                                                                                                                                                      0.0s
 => CACHED [28/30] RUN apt-get update && apt-get --no-install-recommends install -y   x11vnc   xterm   xserver-xorg-video-dummy   x11-apps  && apt-get -y autoremove  && apt-get clean autoclean  &&   0.0s
 => CACHED [29/30] RUN wget https://xpra.org/xorg.conf     && rm -rf /tmp/*                                                                                                                            0.0s
 => [30/30] RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -   && apt-get install -y nodejs   && npm install -g yarn                                                                       77.1s
 => exporting to image                                                                                                                                                                                 3.2s 
 => => exporting layers                                                                                                                                                                                3.0s 
 => => writing image sha256:989fbf33f2a5458227464c0f7aae3e891d3272df858edcf27306cd437685ab0d                                                                                                           0.1s 
 => => naming to docker.io/jderobot/robotics-applications:dependencies-noetic                                                                                                                          0.1s 
                                                                                                                                                                                                            
What's Next?                                                                                                                                                                                                
  1. Sign in to your Docker account → docker login
  2. View a summary of image vulnerabilities and recommendations → docker scout quickview

So, I think the base image is getting created without any errors. Basically, I deleted the created image in docker-desktop and then running this command, so it is building the base image first, I believe. Also, I wanted to ask that is there any chat channel for conversation as I am thinking this issue thread is getting too long. :sweat_smile:

lavish123409 avatar Feb 03 '24 16:02 lavish123409

@lavish123409, Did the above command also result in an error? it is supposed to build the noetic RADI after the base image

We do not have a chat channel, However you can always initiate discussions here https://github.com/orgs/JdeRobot/discussions

It's okay to have long threads, github doesn't complain and neither do we ;)

pawanw17 avatar Feb 03 '24 19:02 pawanw17

Yes @pawanw17, ./build.sh -F command also resulted in error at same point like in this error. Although, the base image is being able to build compeletly without errors.

lavish123409 avatar Feb 04 '24 10:02 lavish123409

I am continuously receiving this error of not able to connect to deac-fra.dl.sourceforge.net because of which the build of mini RADI image is failing.

image

It is failing after this. image

And, neither I am able to access it on the browser. image

I do not know, like I was able to access it earlier and it was failing at catkin build command but suddenly I am not able to access it. Any suggestions on how to resolve that?

lavish123409 avatar Feb 12 '24 03:02 lavish123409

Hey @pawanw17 @jmplaza, I am still receiving this error and after searching on the internet a lot, I think maybe it is because of shortage of disk space.

image

Can anyone tell me how much space would the RADI image require, so that I can allocate that much space in docker desktop? Thanks

lavish123409 avatar Feb 18 '24 07:02 lavish123409

Hi @lavish123409, I am not able to reproduce your error. I use docker CLI and AFAIK space is allocated dynamically from the system as per the image's requirements.

pawanw17 avatar Feb 18 '24 09:02 pawanw17

uhm... @lavish123409 , RoboticsAcademy requires some HardDrive space to store the RADI and some RAM memory space while running.

Regarding hard drive space, running "docker images" at my Linux computer tells these sizes for the RADIs

REPOSITORY                  TAG                           IMAGE ID       CREATED         SIZE
jderobot/robotics-academy   3.4.29                        68a606c2f52a   9 days ago      12GB
jderobot/robotics-academy   4.4.27                        3d7263a8d639   2 months ago    14.7GB

At RADI DockerHub they are compressed. Some illustrative sizes: RADI 4.4.32, 6.07 GB RADI 3.4.30, 4.77 GB

On execution I successfully run RoboticsAcademy on my computer with 32GB RAM, and I know of successful executions in 8GB RAM. Maybe 4GB are too short to be fluent...

jmplaza avatar Feb 18 '24 09:02 jmplaza

@lavish123409 , can you share more about your system's OS, RAM, cores etc. To help debug this behaviour?

pawanw17 avatar Feb 18 '24 10:02 pawanw17

Here, are my system specs

image Hope, it would help in debugging

lavish123409 avatar Feb 18 '24 12:02 lavish123409

@lavish123409 RoboticsAcademy should work like a charm on that machine. Have you used it? (not with the developer deployment, just as a regular user:

  1. download the RADI from DockerHub. For instance 3.4.30, with docker pull jderobot/robotics-academy:3.4.30
  2. launch the RADI. For instance with docker run --rm -it -p 7164:7164 -p 2303:2303 -p 1905:1905 -p 8765:8765 -p 6080:6080 -p 1108:1108 -p 7163:7163 jderobot/robotics-academy:3.4.30
  3. start a browser and access to the https://127.0.0.1:7164/

jmplaza avatar Feb 18 '24 14:02 jmplaza