JdeRobot / RoboticsAcademy

Learn Robotics with JdeRobot
https://jderobot.github.io/RoboticsAcademy
GNU General Public License v3.0
313 stars 224 forks source link

[RADI] Performance Issue and bugs #833

Closed Jovian-Dsouza closed 3 years ago

Jovian-Dsouza commented 3 years ago

Exercise : Drone Cat and Mouse My System : Ryzen 5 5500u + gtx 1650 laptop I am using the docker image built from the latest Dockerfile in this repo

The FPS of the simulation is very low (around 4.8 FPS). Doing an nvidia-smi doesn't show gpu utilization from the docker container.

Also the simulation stops suddenly presenting with this error on the docker output.

['/', '/opt/ros/melodic/lib/python2.7/dist-packages', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages']
<websockets.server.WebSocketServerProtocol object at 0x7f72a15aaf70>
{"command":"exit","exercise":""}
ALL KILED
{"command":"open","exercise":"drone_cat_mouse","width":"890","height":"459"}
> Starting simulation
_XSERVTransmkdir: ERROR: Cannot create /tmp/.X11-unix
_XSERVTransSocketUNIXCreateListener: mkdir(/tmp/.X11-unix) failed, errno = 17
_XSERVTransMakeAllCOTSServerListeners: failed to create listener for unix

X.Org X Server 1.19.6
X.Org X Server 1.19.6
Release Date: 2017-12-20
X Protocol Version 11, Revision 0

Release Date: 2017-12-20
Build Operating System: Linux 4.15.0-124-generic x86_64 Ubuntu
X Protocol Version 11, Revision 0
Current Operating System: Linux 6e741f5d0c0c 5.11.11-051111-generic #202103310025 SMP Thu Apr 1 01:54:13 UTC 2021 x86_64
Build Operating System: Linux 4.15.0-124-generic x86_64 Ubuntu
Current Operating System: Linux 6e741f5d0c0c 5.11.11-051111-generic #202103310025 SMP Thu Apr 1 01:54:13 UTC 2021 x86_64
Kernel command line: Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.11.11-051111-generic root=UUID=8e0f3578-bc45-487c-b39BOOT_IMAGE=/boot/vmlinuz-5.11.11-051111-generic root=UUID=8e0f3578-bc45-487c-b391-55b29bb28286 ro quiet splash acpi_osi=Linux acpi_backlight=video vt.handoff=7
1-55b29bb28286 ro quiet splash acpi_osi=Linux acpi_backlight=video vt.handoff=7
Build Date: 30 November 2020  08:01:56PM
Build Date: 30 November 2020  08:01:56PM
xorg-server 2:1.19.6-1ubuntu4.8 (For technical support please see http://www.ubuntu.com/support) 
xorg-server 2:1.19.6-1ubuntu4.8 (For technical support please see http://www.ubuntu.com/support) 
Current version of pixman: 0.34.0
Current version of pixman: 0.34.0
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: Markers: (--) probed, (--) probed, (**) from config file, (**) from config file, (==) default setting,
    (==) default setting,
    (++) from command line, (++) from command line, (!!) notice, (!!) notice, (II) informational,
    (II) informational,
    (WW) warning, (WW) warning, (EE) error, (EE) error, (NI) not implemented, (NI) not implemented, (??) unknown.
(??) unknown.
(++) Log file: "./console_xdummy.log", Time: Wed Apr  7 10:25:09 2021
(++) Log file: "./xdummy.log", Time: Wed Apr  7 10:25:09 2021
(++) Using config file: "./xorg.conf"
(++) Using config file: "./xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Gazebo multi-robot simulator, version 9.16.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Wrn] [gazebo_gps_plugin.cpp:76] [gazebo_gps_plugin]: iris::gps0 using gps topic "gps0"
[Wrn] [gazebo_gps_plugin.cpp:201] [gazebo_gps_plugin] Using default update rate of 5hz 
[Wrn] [gazebo_gps_plugin.cpp:76] [gazebo_gps_plugin]: iris_red::gps0 using gps topic "gps0"
[Wrn] [gazebo_gps_plugin.cpp:201] [gazebo_gps_plugin] Using default update rate of 5hz 
07/04/2021 10:25:14 07/04/2021 10:25:14 passing arg to libvncserver: -rfbport
passing arg to libvncserver: -rfbport
07/04/2021 10:25:14 07/04/2021 10:25:14 passing arg to libvncserver: 5900
passing arg to libvncserver: 5901
07/04/2021 10:25:14 07/04/2021 10:25:14 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 903
x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 914
07/04/2021 10:25:14 Using X display :0
07/04/2021 10:25:14 Using X display :1
07/04/2021 10:25:14 rootwin: 0x299 reswin: 0x600001 dpy: 0xa1e7d770
07/04/2021 10:25:14 rootwin: 0x299 reswin: 0x200001 dpy: 0x29d0b770
07/04/2021 10:25:14 
07/04/2021 10:25:14 07/04/2021 10:25:14 ------------------ USEFUL INFORMATION ------------------

07/04/2021 10:25:14 ------------------ USEFUL INFORMATION ------------------
07/04/2021 10:25:14 X DAMAGE available on display, using it for polling hints.
07/04/2021 10:25:14 07/04/2021 10:25:14   To disable this behavior use: '-noxdamage'
X DAMAGE available on display, using it for polling hints.
07/04/2021 10:25:14 07/04/2021 10:25:14   To disable this behavior use: '-noxdamage'

07/04/2021 10:25:14 07/04/2021 10:25:14   Most compositing window managers like 'compiz' or 'beryl'

07/04/2021 10:25:14 07/04/2021 10:25:14   cause X DAMAGE to fail, and so you may not see any screen
  Most compositing window managers like 'compiz' or 'beryl'
07/04/2021 10:25:14 07/04/2021 10:25:14   updates via VNC.  Either disable 'compiz' (recommended) or
  cause X DAMAGE to fail, and so you may not see any screen
07/04/2021 10:25:14 07/04/2021 10:25:14   updates via VNC.  Either disable 'compiz' (recommended) or
  supply the x11vnc '-noxdamage' command line option.
07/04/2021 10:25:14 07/04/2021 10:25:14   supply the x11vnc '-noxdamage' command line option.

07/04/2021 10:25:14 07/04/2021 10:25:14 
Wireframing: -wireframe mode is in effect for window moves.
07/04/2021 10:25:14 07/04/2021 10:25:14 Wireframing: -wireframe mode is in effect for window moves.
  If this yields undesired behavior (poor response, painting
07/04/2021 10:25:14 07/04/2021 10:25:14   If this yields undesired behavior (poor response, painting
  errors, etc) it may be disabled:
07/04/2021 10:25:14   errors, etc) it may be disabled:
07/04/2021 10:25:14    - use '-nowf' to disable wireframing completely.
07/04/2021 10:25:14    - use '-nowf' to disable wireframing completely.
07/04/2021 10:25:14    - use '-nowcr' to disable the Copy Rectangle after the
07/04/2021 10:25:14    - use '-nowcr' to disable the Copy Rectangle after the
07/04/2021 10:25:14      moved window is released in the new position.
07/04/2021 10:25:14      moved window is released in the new position.
07/04/2021 10:25:14 07/04/2021 10:25:14   Also see the -help entry for tuning parameters.
  Also see the -help entry for tuning parameters.
07/04/2021 10:25:14   You can press 3 Alt_L's (Left "Alt" key) in a row to 
07/04/2021 10:25:14   You can press 3 Alt_L's (Left "Alt" key) in a row to 
07/04/2021 10:25:14   repaint the screen, also see the -fixscreen option for
07/04/2021 10:25:14 07/04/2021 10:25:14   periodic repaints.
  repaint the screen, also see the -fixscreen option for
07/04/2021 10:25:14 07/04/2021 10:25:14   periodic repaints.

07/04/2021 10:25:14 07/04/2021 10:25:14 
XFIXES available on display, resetting cursor mode
07/04/2021 10:25:14   to: '-cursor most'.
07/04/2021 10:25:14 XFIXES available on display, resetting cursor mode
07/04/2021 10:25:14   to disable this behavior use: '-cursor arrow'
07/04/2021 10:25:14   to: '-cursor most'.
07/04/2021 10:25:14   or '-noxfixes'.
07/04/2021 10:25:14   to disable this behavior use: '-cursor arrow'
07/04/2021 10:25:14 07/04/2021 10:25:14   or '-noxfixes'.
using XFIXES for cursor drawing.
07/04/2021 10:25:14 using XFIXES for cursor drawing.
07/04/2021 10:25:14 GrabServer control via XTEST.
07/04/2021 10:25:14 GrabServer control via XTEST.
07/04/2021 10:25:14 
07/04/2021 10:25:14 Scroll Detection: -scrollcopyrect mode is in effect to
07/04/2021 10:25:14   use RECORD extension to try to detect scrolling windows
07/04/2021 10:25:14   (induced by either user keystroke or mouse input).
07/04/2021 10:25:14   If this yields undesired behavior (poor response, painting
07/04/2021 10:25:14   errors, etc) it may be disabled via: '-noscr'
07/04/2021 10:25:14   Also see the -help entry for tuning parameters.
07/04/2021 10:25:14   You can press 3 Alt_L's (Left "Alt" key) in a row to 
07/04/2021 10:25:14   repaint the screen, also see the -fixscreen option for
07/04/2021 10:25:14   periodic repaints.
07/04/2021 10:25:14 X FBPM extension not supported.
07/04/2021 10:25:14 X display is not capable of DPMS.
07/04/2021 10:25:14 --------------------------------------------------------
07/04/2021 10:25:14 
07/04/2021 10:25:14 
07/04/2021 10:25:14 Scroll Detection: -scrollcopyrect mode is in effect to
07/04/2021 10:25:14   use RECORD extension to try to detect scrolling windows
07/04/2021 10:25:14   (induced by either user keystroke or mouse input).
07/04/2021 10:25:14   If this yields undesired behavior (poor response, painting
07/04/2021 10:25:14   errors, etc) it may be disabled via: '-noscr'
07/04/2021 10:25:14   Also see the -help entry for tuning parameters.
07/04/2021 10:25:14   You can press 3 Alt_L's (Left "Alt" key) in a row to 
07/04/2021 10:25:14   repaint the screen, also see the -fixscreen option for
07/04/2021 10:25:14   periodic repaints.
07/04/2021 10:25:14 Default visual ID: 0x21
07/04/2021 10:25:14 X FBPM extension not supported.
07/04/2021 10:25:14 X display is not capable of DPMS.
07/04/2021 10:25:14 --------------------------------------------------------
07/04/2021 10:25:14 
07/04/2021 10:25:14 Default visual ID: 0x21
WebSocket server settings:
WebSocket server settings:
  - Listen on :1108
  - Listen on :6080
  - Web server. Web root: /noVNC
  - No SSL/TLS support (no cert file)
  - proxying from :1108 to localhost:5901
  - Web server. Web root: /noVNC
  - No SSL/TLS support (no cert file)
  - proxying from :6080 to localhost:5900
Gazebo multi-robot simulator, version 9.16.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

07/04/2021 10:25:15 Read initial data from X display into framebuffer.
07/04/2021 10:25:15 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/32768
07/04/2021 10:25:15 
07/04/2021 10:25:15 X display :0 is 32bpp depth=24 true color
07/04/2021 10:25:15 
07/04/2021 10:25:15 Listening for VNC connections on TCP port 5900
07/04/2021 10:25:15 Listening for VNC connections on TCP6 port 5900
07/04/2021 10:25:15 listen6: bind: Address already in use
07/04/2021 10:25:15 Not listening on IPv6 interface.
07/04/2021 10:25:15 
07/04/2021 10:25:15 Xinerama is present and active (e.g. multi-head).
07/04/2021 10:25:15 Xinerama: number of sub-screens: 1
07/04/2021 10:25:15 Xinerama: no blackouts needed (only one sub-screen)
07/04/2021 10:25:15 
07/04/2021 10:25:15 fb read rate: 969 MB/sec
07/04/2021 10:25:15 fast read: reset -wait  ms to: 10
07/04/2021 10:25:15 fast read: reset -defer ms to: 10
07/04/2021 10:25:15 The X server says there are 10 mouse buttons.
07/04/2021 10:25:15 screen setup finished.
07/04/2021 10:25:15 

The VNC desktop is:      6e741f5d0c0c:0

******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval.  It should work with any VNC viewer.  Try it by running:

    x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

PORT=5900

[Wrn] [GuiIface.cc:120] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
07/04/2021 10:25:15 Read initial data from X display into framebuffer.
07/04/2021 10:25:15 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/32768
07/04/2021 10:25:15 
07/04/2021 10:25:15 X display :1 is 32bpp depth=24 true color
07/04/2021 10:25:15 
07/04/2021 10:25:15 Listening for VNC connections on TCP port 5901
07/04/2021 10:25:15 rfbListenOnTCP6Port: error in bind IPv6 socket: Address already in use
07/04/2021 10:25:15 Listening also on IPv6 port 5901 (socket 10)
07/04/2021 10:25:15 
07/04/2021 10:25:15 Xinerama is present and active (e.g. multi-head).
07/04/2021 10:25:15 Xinerama: number of sub-screens: 1
07/04/2021 10:25:15 Xinerama: no blackouts needed (only one sub-screen)
07/04/2021 10:25:15 
07/04/2021 10:25:15 fb read rate: 1138 MB/sec
07/04/2021 10:25:15 fast read: reset -wait  ms to: 10
07/04/2021 10:25:15 fast read: reset -defer ms to: 10
07/04/2021 10:25:15 The X server says there are 10 mouse buttons.
07/04/2021 10:25:15 screen setup finished.
07/04/2021 10:25:15 

The VNC desktop is:      6e741f5d0c0c:1

******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval.  It should work with any VNC viewer.  Try it by running:

    x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

PORT=5901

[Err] [InsertModelWidget.cc:426] Missing model.config for model "/opt/jderobot/CustomRobots/f1/imgs"
[Err] [InsertModelWidget.cc:426] Missing model.config for model "/opt/jderobot/CustomRobots/f1/launch"
[Err] [InsertModelWidget.cc:426] Missing model.config for model "/opt/jderobot/CustomRobots/f1/worlds"
[Err] [InsertModelWidget.cc:426] Missing model.config for model "/opt/jderobot/CustomRobots/roomba_robot/imgs"
[Err] [InsertModelWidget.cc:426] Missing model.config for model "/opt/jderobot/CustomRobots/3d_reconstruction/launch"
[Err] [InsertModelWidget.cc:426] Missing model.config for model "/opt/jderobot/CustomRobots/3d_reconstruction/words"
172.17.0.1 - - [07/Apr/2021 10:25:26] 172.17.0.1: Plain non-SSL (ws://) WebSocket connection
172.17.0.1 - - [07/Apr/2021 10:25:26] 172.17.0.1: Path: '/websockify'
172.17.0.1 - - [07/Apr/2021 10:25:26] connecting to: localhost:5900
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 599, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/lib/python2.7/dist-packages/websocket_server/websocket_server.py", line 136, in __init__
    StreamRequestHandler.__init__(self, socket, addr, server)
  File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
    self.handle()
  File "/usr/local/lib/python2.7/dist-packages/websocket_server/websocket_server.py", line 149, in handle
    self.read_next_message()
  File "/usr/local/lib/python2.7/dist-packages/websocket_server/websocket_server.py", line 161, in read_next_message
    b1, b2 = self.read_bytes(2)
  File "/usr/local/lib/python2.7/dist-packages/websocket_server/websocket_server.py", line 153, in read_bytes
    bytes = self.rfile.read(num)
  File "/usr/lib/python2.7/socket.py", line 384, in read
    data = self._sock.recv(left)
timeout: timed out
Segmentation fault (core dumped)
trunc8 commented 3 years ago

Hi @Jovian-Dsouza, can you make a new thread on the forum? I have faced multiple issues similar to yours. Let us try to jointly resolve it there.

Jovian-Dsouza commented 3 years ago

Okay @trunc8 will do that

ReyDoran commented 3 years ago

This problem is solved with new RADI 2.4.2