This image is designed to support NPS ME4823
There's more documentation here: https://wiki.nps.edu/display/MRC/CloudSim
A repository with a dockerfile for testing novnc deployments
License: Apache License 2.0
This image is designed to support NPS ME4823
There's more documentation here: https://wiki.nps.edu/display/MRC/CloudSim
Using a multistage build process reduces the Matlab image size from 44GiB to 29GiB. It's hard to get smaller than this for a full install of Matlab because /usr/local/MATLAB
is 26GiB all by itself. Here is the breakdown:
4.0K /usr/local/MATLAB/VersionInfo.xml
106M /usr/local/MATLAB/appdata
7.4G /usr/local/MATLAB/bin
144M /usr/local/MATLAB/cefclient
63M /usr/local/MATLAB/derived
2.8G /usr/local/MATLAB/examples
9.4M /usr/local/MATLAB/extern
4.9G /usr/local/MATLAB/help
2.2M /usr/local/MATLAB/interprocess
185M /usr/local/MATLAB/java
84K /usr/local/MATLAB/license_agreement.txt
1.2G /usr/local/MATLAB/mcr
16K /usr/local/MATLAB/patents.txt
14M /usr/local/MATLAB/polyspace
148K /usr/local/MATLAB/remote
242M /usr/local/MATLAB/resources
13M /usr/local/MATLAB/rtw
1.1M /usr/local/MATLAB/runtime
2.1M /usr/local/MATLAB/simulink
939M /usr/local/MATLAB/sys
7.9G /usr/local/MATLAB/toolbox
4.0K /usr/local/MATLAB/trademarks.txt
132M /usr/local/MATLAB/ui
The only way I can think of to reduce space is to avoid a full install, but I'm not sure which modules we do and do not need. I will post the whole list below, and if we want to try to slim down we can pick out specific products that are required.
Running the build.bash
script gets all the way to end of the rocker
command and then exits with the following error:
sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
The test_novnc
image is built from the latest master, and the virtual environment is built from scratch. One minor deviation that I don't think is causing the problem is that when I pip install rocker.git@cuda
I initially get an error related to bdist_wheel
which I resolved with pip install wheel
.
Attempting to bring the image up manually with the command:
docker run --rm -it -p 8080:8080 --gpus all <hash>
exits with the same error.
Could we add https://github.com/tfoote/test_novnc/issues
to the basrc file for the developer user?
Working on the matlab-small image. It appears to not have RVIZ installed.
Could we add....
sudo apt install ros-noetic-rqt-rviz
A student anecdotally reported that they would loose connection with their cloudsim image periodically. Until today, I had not seen this behavior - and it will be hard to debug since it sounds like it is infrequent and we don't yet have any suspicions for causes or correlations.
Something similar may have happened to me. The image was running for a few hours and now I cannot connect via novnc.
Here is the output of the REST status call...
curl -X GET -H "Private-Token: ${TOKEN}" https://staging-cloudsim-nps.ignitionrobotics.org/1.0/simulations/${GROUPID}
{"created_at":"0001-01-01T00:00:00Z","owner":"","name":"npstest","groupid":"6038eff4-95e0-4f06-8d41-e6809f904da6","status":"Removing instance.","image":"tfoote/test_novnc:main","args":"","uri" REMOVED"}
I'll leave the machine running for a bit in case some one would like to debug and can look more deeply at the status of the machine.
When I run the VORC localization example from https://github.com/osrf/vorc/wiki/sensors
roslaunch vorc_gazebo marina.launch verbose:=true
and then
roslaunch vorc_gazebo localization_example.launch
I get the SPAM Warnings below.
Perhaps we should switch the image back to Melodic to minimize new issues with VORC?
SPAM Warnings
Warning: Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_engine_link at time 18.340000 according to authority unknown_publisherTF_REPEATED_DATA ignoring data with redundant timestamp for frame right_engine_link at time 18.340000 according to authority unknown_publisher
at line at line 278278 in in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp/tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_propeller_link at time 18.340000 according to authority unknown_publisher
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_propeller_link at time 18.340000 according to authority unknown_publisher
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_engine_link at time 18.940000 according to authority unknown_publisher
at line 278 in TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_engine_link at time 18.940000 according to authority unknown_publisher/tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_propeller_link at time 18.940000 according to authority unknown_publisher
at line 278 in
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_propeller_link at time 18.940000 according to authority unknown_publisher
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp/tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_engine_link at time 18.940000 according to authority unknown_publisher
at line TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_engine_link at time 18.940000 according to authority unknown_publisher278
in at line /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp278
in Warning: /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_propeller_link at time 18.940000 according to authority unknown_publisherWarning:
at line TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_propeller_link at time 18.940000 according to authority unknown_publisher278
in at line /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp278
in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
[ WARN] [1619374392.793045111, 19.210000000]: Could not obtain transform from cora/imu_link to cora/base_link. Error was "cora/base_link" passed to lookupTransform argument target_frame does not exist.
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_engine_link at time 19.340000 according to authority unknown_publisher
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_propeller_link at time 19.340000 according to authority unknown_publisher
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_engine_link at time 19.340000 according to authority unknown_publisher
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_propeller_link at time 19.340000 according to authority unknown_publisher
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_engine_link at time 19.340000 according to authority unknown_publisher
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_propeller_link at time 19.340000 according to authority unknown_publisher
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_engine_link at time 19.340000 according to authority unknown_publisher
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_propeller_link at time 19.340000 according to authority unknown_publisher
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_engine_link at time 19.640000 according to authority unknown_publisherTF_REPEATED_DATA ignoring data with redundant timestamp for frame left_engine_link at time 19.640000 according to authority unknown_publisher
at line at line 278278 in in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp/tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_propeller_link at time 19.640000 according to authority unknown_publisher
at line Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_propeller_link at time 19.640000 according to authority unknown_publisher
278 at line in 278/tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp in
/tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_engine_link at time 19.640000 according to authority unknown_publisherTF_REPEATED_DATA ignoring data with redundant timestamp for frame right_engine_link at time 19.640000 according to authority unknown_publisher
at line at line 278278 in in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
/tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cppWarning:
TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_propeller_link at time 19.640000 according to authority unknown_publisher
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_propeller_link at time 19.640000 according to authority unknown_publisher
at line 278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_engine_link at time 20.240000 according to authority unknown_publisher
at line 278 in Warning: /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cppTF_REPEATED_DATA ignoring data with redundant timestamp for frame left_engine_link at time 20.240000 according to authority unknown_publisher
at line Warning: 278TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_propeller_link at time 20.240000 according to authority unknown_publisher in
/tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp at line
278 in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cppWarning:
TF_REPEATED_DATA ignoring data with redundant timestamp for frame left_propeller_link at time 20.240000 according to authority unknown_publisher
at line Warning: 278TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_engine_link at time 20.240000 according to authority unknown_publisher in
/tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp at line
278 in Warning: /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cppTF_REPEATED_DATA ignoring data with redundant timestamp for frame right_engine_link at time 20.240000 according to authority unknown_publisher
at line 278Warning: in TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_propeller_link at time 20.240000 according to authority unknown_publisher/tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
at line Warning: TF_REPEATED_DATA ignoring data with redundant timestamp for frame right_propeller_link at time 20.240000 according to authority unknown_publisher
278 at line in 278/tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp in /tmp/binarydeb/ros-noetic-tf2-0.7.5/src/buffer_core.cpp
When a user commits to a github repository from the cloudsim image without first setting the user and email, the commit doesn't fail as expected. It instead seems to default to an identity that is somehow connected to the person who created the image. For example, commits from the image tfoote/test_novnc showed up as being committed by Tully Foote:
And commits from the image I created showed up as:
Which is my last name, but not my username on Github.
This is a minor issue and probably caused by user error, but the relationship is not obvious to me. Running
git config --list
returns nothing, showing that these variables are not set, so I'm not sure where they are being pulled from.
Using s3fs to mount aws buckets is convenient because it automatically syncs local changes back to the bucket, but because these changes happen synchronously the user experience is very bad for many common tasks. Practically, this means:
(Note that all times given below are rough tests using a local development environment on a network that has a 250Mbps connection up and down. I still need to verify that running in cloudsim gives similar performance.)
ls -R
find
are very slow because s3fs only requests file info when it is needed, so queries go all the way out to the bucket, one at a time.rm -rf
are even worse, since they require querying the bucket and then writing back to it.git status
in an unmodified clone of vrx tookls -R
took 44s, and deleting it took 3m48s.ls -R
for the first time in a workspace in which the VORC environment had been built took over 10 minutes. Running a second time right away took 86 seconds, so there is a considerable benefit from caching, but not enough to provide a good user experience.Would it be possible to automatically execute the AWS configuration (access keys) on startup with out a security issue?
To use VRX/VORC, we need these package added to the image - see https://github.com/osrf/vrx/blob/master/docker/Dockerfile
DIST="noetic"
sudo apt install -y \
ros-${DIST}-xacro \
ros-${DIST}-gazebo-ros \
ros-${DIST}-gazebo-ros-control \
ros-${DIST}-gazebo-ros-pkgs \
ros-${DIST}-gazebo-plugins \
ros-${DIST}-hector-gazebo-plugins \
ros-${DIST}-joint-state-publisher \
ros-${DIST}-joint-state-controller \
ros-${DIST}-position-controllers \
ros-${DIST}-rqt \
ros-${DIST}-rviz \
ros-${DIST}-rqt-common-plugins \
ros-${DIST}-geographic-msgs \
ros-${DIST}-velodyne-simulator
[Msg] directions: [Msg] 0.921061 -0.389418; [Msg] 1 0; [Msg] 0.921061 0.389418; [Msg]
[Err] [Plugin.hh:178] Failed to load plugin libgazebo_ros_camera.so: libgazebo_ros_camera.so: cannot open shared object file: No such file or directory
[ INFO] [1619373475.624122638, 0.195000000]: Velodyne laser plugin missing <organize_cloud>, defaults to false
[ INFO] [1619373475.624226251, 0.195000000]: Velodyne laser plugin missing <min_range>, defaults to 0
[ INFO] [1619373475.624250264, 0.195000000]: Velodyne laser plugin missing <max_range>, defaults to infinity
[ INFO] [1619373475.624295952, 0.195000000]: Velodyne laser plugin missing <gaussianNoise>, defaults to 0.0
[ INFO] [1619373475.625713335, 0.195000000]: Velodyne GPU laser plugin ready, 16 lasers
[Wrn] [msgs.cc:1842] Conversion of sensor type[gpu_ray] not supported.
[Err] [Plugin.hh:178] Failed to load plugin libgazebo_ros_camera.so: libgazebo_ros_camera.so: cannot open shared object file: No such file or directory
[ INFO] [1619373475.755970315, 0.195000000]: Thruster namespace <cora/>
[Err] [Plugin.hh:178] Failed to load plugin libhector_gazebo_ros_gps.so: libhector_gazebo_ros_gps.so: cannot open shared object file: No such file or directory
[Err] [Plugin.hh:178] Failed to load plugin libhector_gazebo_ros_imu.so: libhector_gazebo_ros_imu.so: cannot open shared object file: No such file or directory
[Dbg] [usv_gazebo_wind_plugin
It appears that the permissions are not preserved when syncing with S3 persistent storage.
I noticed this in the following use case:
developer@ip-172-30-57-85:~/bbingham$ source ~/bbingham/catkin_ws/devel/setup.bash
bash: /home/developer/bbingham/catkin_ws/devel/_setup_util.py: Permission denied
Failed to run '"/home/developer/bbingham/catkin_ws/devel/_setup_util.py" ': return code 126
The problem is that the python file is no longer executable.
-rw-r--r-- 1 developer developer 13309 Apr 9 19:04 _setup_util.py
-rwxr-xr-x 1 developer developer 13309 Apr 11 11:39 /home/developer/bbingham/catkin_ws/devel/_setup_util.py
which is fine for this use case, but the general issue may cause confusion and inconsistencies moving forward.
Small issue, but next time we update, could we add...
sudo apt install python3-vcstool
For convenient access
When building this image with rocker --novnc
, the vncserver fails repeatedly on startup.
git clone [email protected]:tfoote/test_novnc.git
cd test_novnc
docker build -t test_novnc .
rocker --cuda --nvidia --novnc --turbovnc test_novnc
Once the image is built, run the "Executing command" given in the output. It will be something like:
docker run --rm -it -p 8080:8080 --gpus all <hash>
where <hash>
is replaced by the hash of the image.
Executing above produces output like:
2021-03-18 13:33:42,328 INFO Included extra file "/root/.supervisor/conf.d/nginx.conf" during parsing
2021-03-18 13:33:42,328 INFO Included extra file "/root/.supervisor/conf.d/novnc.conf" during parsing
2021-03-18 13:33:42,329 INFO Included extra file "/root/.supervisor/conf.d/turbovnc.conf" during parsing
2021-03-18 13:33:42,329 INFO Set uid to user 0 succeeded
2021-03-18 13:33:42,330 INFO supervisord started with pid 7
2021-03-18 13:33:43,334 INFO spawned: 'nginx' with pid 9
2021-03-18 13:33:43,338 INFO spawned: 'novnc' with pid 10
2021-03-18 13:33:43,339 INFO spawned: 'turbovnc' with pid 11
2021-03-18 13:33:44,352 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-18 13:33:44,352 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-18 13:33:44,352 INFO success: turbovnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-18 13:33:44,604 INFO exited: turbovnc (exit status 2; not expected)
2021-03-18 13:33:45,608 INFO spawned: 'turbovnc' with pid 235
turbovnc
then continues to attempt to restart until it reaches its limit and gives up:
2021-03-18 13:37:29,300 INFO exited: turbovnc (exit status 2; not expected)
2021-03-18 13:37:30,302 INFO spawned: 'turbovnc' with pid 19164
2021-03-18 13:37:30,320 INFO exited: turbovnc (exit status 98; not expected)
2021-03-18 13:37:31,322 INFO spawned: 'turbovnc' with pid 19169
2021-03-18 13:37:31,366 INFO exited: turbovnc (exit status 98; not expected)
2021-03-18 13:37:33,372 INFO spawned: 'turbovnc' with pid 19174
2021-03-18 13:37:33,393 INFO exited: turbovnc (exit status 98; not expected)
2021-03-18 13:37:36,400 INFO spawned: 'turbovnc' with pid 19179
2021-03-18 13:37:36,421 INFO exited: turbovnc (exit status 98; not expected)
2021-03-18 13:37:37,422 INFO gave up: turbovnc entered FATAL state, too many start retries too quickly
Inspecting logs under /root/.vnc/
shows many logs for failed sessions. Here is an example:
oot@914f14a20de9:~/.vnc# cat unix\:1.log
TurboVNC Server (Xvnc) 64-bit v2.2.5 (build 20200507)
Copyright (C) 1999-2020 The VirtualGL Project and many others (see README.txt)
Visit http://www.TurboVNC.org for more information on TurboVNC
18/03/2021 13:33:43 Using security configuration file /etc/turbovncserver-security.conf
18/03/2021 13:33:43 Enabled security type 'none'
18/03/2021 13:33:43 Desktop name 'TurboVNC: unix:1 ()' (914f14a20de9:1)
18/03/2021 13:33:43 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
18/03/2021 13:33:43 Listening for VNC connections on TCP port 5901
18/03/2021 13:33:43 Interface 0.0.0.0
18/03/2021 13:33:43 Framebuffer: BGRX 8/8/8/8
18/03/2021 13:33:43 New desktop size: 1920 x 1080
18/03/2021 13:33:43 New screen layout:
18/03/2021 13:33:43 0x00000040 (output 0x00000040): 1920x1080+0+0
18/03/2021 13:33:43 Maximum clipboard transfer size: 1048576 bytes
18/03/2021 13:33:43 VNC extension running!
gnome-session-check-accelerated: GL Helper exited with code 512
gnome-session-check-accelerated: GLES Helper exited with code 512
gnome-session-binary[90]: ERROR: Failed to connect to system bus: Could not connect: No such file or directory
aborting...
Trace/breakpoint trap (core dumped)
Running
rocker --novnc --turbovnc ubuntu
seems to work fine, so I think this issue is specific to the image we are using.
Could we add the following to the image:
sudo apt install tree
sudo apt-get install ros-<distro>-ros-tutorials
Needed for ROS in MATLAB
https://www.mathworks.com/help/ros/gs/ros-system-requirements.html
sudo apt install python2
When logging in to novnc locally (or remotely via cloudsim), the user is initially presented with the option of selecting the Mutter Windows manager. Selecting Mutter brings up a graphical environment as expected:
However, clicking any of the virtual workspace icons in the lower menu causes all features to become invisible:
Some of the elements, such as the menu and calendar still work if you know where to click:
However, I don't see a way to restore the desktop without killing and restarting the Docker image (changing the icon set, theme or other appearance settings doesn't seem to help). An easy workaround for now is to either avoid clicking on these virtual spaces, or to select OpenBox instead of Mutter.
Instead of starting from a terminal - a shortcut in the menu.
When running
developer@ip-172-30-51-251:~$ rosrun rqt_topic rqt_topic
receive a python error (no Python 2 in Noetic?)
/usr/bin/env: ?python?: No such file or directory
I don't have time to chase it down right now, so noting for later.
When running rosinit
in MATLAB get an error that the Python version is not set. See last section of https://wiki.nps.edu/display/MRC/Matlab+on+Cloudsim
Could we set this as a MATLAB global setting or startup command so that users do not have to remember to set this each time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.