Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

[roscore]Problem when running roscore error: ? [31m[rosout-1] process has died [pid 2716, exit code -1073741515... #77

Closed
WangZP10969 opened this issue Feb 20, 2019 · 21 comments
Labels
bug Something isn't working

Comments

@WangZP10969
Copy link

Describe the bug
A loop error message appears when running roscore:
[roslaunch][INFO] 2019-02-20 10:19:37,971: [rosout-1] restarting process
[roslaunch][INFO] 2019-02-20 10:19:37,971: process[rosout-1]: restarting os process
[roslaunch][INFO] 2019-02-20 10:19:37,973: process[rosout-1]: start w/ args [[u'c:\opt\ros\melodic\x64\lib\rosout\rosout.exe', u'__name:=rosout', u'__log:=C:\Users\XASY-PC\.ros\log\e53261c0-34b5-11e9-9a06-10f005138886\rosout-1.log']]
[roslaunch][INFO] 2019-02-20 10:19:37,973: process[rosout-1]: cwd will be [C:\Users\XASY-PC.ros]
[roslaunch][INFO] 2019-02-20 10:19:37,974: process[rosout-1]: started with pid [10964]
[roslaunch][ERROR] 2019-02-20 10:19:38,177: [rosout-1] process has died [pid 10964, exit code -1073741515, cmd c:\opt\ros\melodic\x64\lib\rosout\rosout.exe __name:=rosout __log:=C:\Users\XASY-PC.ros\log\e53261c0-34b5-11e9-9a06-10f005138886\rosout-1.log].
log file: C:\Users\XASY-PC.ros\log\e53261c0-34b5-11e9-9a06-10f005138886\rosout-1*.log

To Reproduce
1.
I use vs code as the terminal and then install the vs2017 Community Edition.
I use the following parameters to run the terminal, and run vs code with admin.
"terminal.integrated.shellArgs.windows": "C:\Windows\System32\cmd.exe /k 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat' -arch=amd64 -host_arch=amd64",

The running prompt is as follows, It seems to be normal:


** Visual Studio 2017 Developer Command Prompt v15.9.7
** Copyright (c) 2017 Microsoft Corporation


C:\Users\XASY-PC>

Next I installed choco, the prompt is normal
Finally I installed ros, using the following instructions:

choco upgrade ros-melodic-desktop -y
The running prompt is as follows:
ERROR: Cannot find python runtime under c:\opt\python27amd64
The install of ros-catkin-tools was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\chocolateyinstall.ps1'.
See log for details.

I think it may be that I don't have python installed, so I installed python with the following instructions.

choco install python2 --params '"/InstallDir:C:\opt\python27amd64"'
There is a warning to run, but the installation is successful
WARNING: Environment variable PYTHONHOME points to different version: C:\opt\python27amd64\

Next I ran the following command, but gave me a wrong prompt

c:\opt\ros\melodic\x64\setup.bat
Traceback (most recent call last):
File "C:\opt\ros\melodic\x64\bin\roscore", line 36, in
from rosmaster.master_api import NUM_WORKERS
File "C:\opt\ros\melodic\x64\lib\site-packages\rosmaster_init_.py", line 35, in
from .main import rosmaster_main
File "C:\opt\ros\melodic\x64\lib\site-packages\rosmaster\main.py", line 43, in
import rosmaster.master
File "C:\opt\ros\melodic\x64\lib\site-packages\rosmaster\master.py", line 47, in
import rosmaster.master_api
File "C:\opt\ros\melodic\x64\lib\site-packages\rosmaster\master_api.py", line 72, in
from rosmaster.util import xmlrpcapi
File "C:\opt\ros\melodic\x64\lib\site-packages\rosmaster\util.py", line 48, in
from defusedxml.xmlrpc import monkey_patch
ImportError: No module named defusedxml.xmlrpc

I searched for this problem and then ran the following command
Pip install defusedxml

After running bat again, the prompt is as follows:
Traceback (most recent call last):
File "C:\opt\ros\melodic\x64\bin\roscore", line 72, in
import roslaunch
File "C:\opt\ros\melodic\x64\lib\site-packages\roslaunch_init_.py", line 39, in
import rospkg
ImportError: No module named rospkg

pip install rospkg
Then I can run bat successfully.

After I ran roscore, the above loop prompt appeared.
[roslaunch][ERROR] 2019-02-20 10:00:11,440: [rosout-1] process has died [pid 6544, exit code -1073741515, cmd c:\opt\ros\melodic\x64\lib\rosout\rosout.exe __name:=rosout __log:=C:\Users\XASY-PC.ros\log\2e344a80-34b3-11e9-a423-10f005138886\rosout-1.log].
log file: C:\Users\XASY-PC.ros\log\2e344a80-34b3-11e9-a423-10f005138886\rosout-1*.log
[roslaunch][INFO] 2019-02-20 10:00:11,454: [rosout-1] restarting process
[roslaunch][INFO] 2019-02-20 10:00:11,460: process[rosout-1]: restarting os process
[roslaunch][INFO] 2019-02-20 10:00:11,461: process[rosout-1]: start w/ args [[u'c:\opt\ros\melodic\x64\lib\rosout\rosout.exe', u'__name:=rosout', u'__log:=C:\Users\XASY-PC\.ros\log\2e344a80-34b3-11e9-a423-10f005138886\rosout-1.log']]
[roslaunch][INFO] 2019-02-20 10:00:11,461: process[rosout-1]: cwd will be [C:\Users\XASY-PC.ros]
[roslaunch][INFO] 2019-02-20 10:00:11,464: process[rosout-1]: started with pid [9064]

Expected behavior
The record in master.log is as follows
[rosmaster.main][INFO] 2019-02-20 10:19:22,015: initialization complete, waiting for shutdown
[rosmaster.main][INFO] 2019-02-20 10:19:22,016: Starting ROS Master Node
[xmlrpc][INFO] 2019-02-20 10:19:22,016: XML-RPC server binding to 0.0.0.0:11311
[rosmaster.master][INFO] 2019-02-20 10:19:22,019: Master initialized: port[11311], uri[http://WangZP-PC:11311/]
[xmlrpc][INFO] 2019-02-20 10:19:22,019: Started XML-RPC server [http://WangZP-PC:11311/]
[xmlrpc][INFO] 2019-02-20 10:19:22,020: xml rpc node: starting XML-RPC server
[rosmaster.master][INFO] 2019-02-20 10:19:32,769: +PARAM [/run_id] by /roslaunch
[rosmaster.master][INFO] 2019-02-20 10:19:32,769: +PARAM [/roslaunch/uris/host_wangzp_pc__10612] by /roslaunch
[xmlrpc][ERROR] 2019-02-20 10:19:37,135: Traceback (most recent call last):
File "C:\opt\python27amd64\lib\SocketServer.py", line 596, in process_request_thread
self.finish_request(request, client_address)
File "C:\opt\python27amd64\lib\SocketServer.py", line 331, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\opt\python27amd64\lib\SocketServer.py", line 652, in init
self.handle()
File "C:\opt\python27amd64\lib\BaseHTTPServer.py", line 342, in handle
self.handle_one_request()
File "C:\opt\python27amd64\lib\BaseHTTPServer.py", line 310, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "C:\opt\python27amd64\lib\socket.py", line 480, in readline
data = self._sock.recv(self._rbufsize)
error: [Errno 10054]

Environment information:

  • OS version: 1803 OS 17134.590
  • Chocolatey Versions:
    Chocolatey v0.10.11
    asio 1.12.1
    assimp 4.0.1.1809242322
    boost 1.66.0.1809242326
    bullet3 2.87.0.1809242326
    bzip2 1.0.6.1809242322
    chocolatey 0.10.11
    chocolatey-core.extension 1.3.3
    chocolatey-windowsupdate.extension 1.0.2
    cmake 3.13.4
    cmake.install 3.13.4
    console_bridge 0.4.0.1809242322
    cppunit 1.12.1.1809242322
    eigen 3.3.4
    git 2.20.1
    git.install 2.20.1
    google-mock 1.8.0.1809242326
    google-test 1.8.0.1809242322
    KB2919355 1.0.20160915
    KB2919442 1.0.20160915
    KB2999226 1.0.20170509
    KB3033929 1.0.3
    KB3035131 1.0.1
    libcurl 7.58.0.1809242322
    libgraphviz 2.41.0.1809191808
    libopencv 3.4.1.1809242322
    log4cxx 0.10.0.1809242322
    lz4 1.8.1.1809242322
    ogre 1.10.11.1809100020
    openssl 1.1.1.1809242322
    pkg-config 0.29.2.1809242322
    poco 1.8.1.1809242322
    pyqt5 5.10.1.1809242322
    pyside2 5.10.1.1809242322
    python2 2.7.15
    python3 3.7.2
    qt5-sdk 5.10.1.1809242322
    ros-cmake 3.11.4.1809242322
    ros-melodic-desktop 20190219.1
    ros-python2 2.7.15.1809242354
    sbcl 0.0.0.1809242326
    sdl 1.2.15.1809242322
    sdl_image 1.2.12.1809242322
    sip 4.19.8.1809242322
    tinyxml 2.6.2.1809242322
    tinyxml-usestl 2.6.2
    tinyxml2 6.0.0
    urdfdom 1.0.0.1809242322
    urdfdom_headers 1.0.0.1809242322
    vcpython27 9.0.30729.1809090720
    vcredist140 14.16.27024.1
    yaml-cpp 0.5.3.1809242322
    51 packages installed.

The above is the process of my problems, I look forward to your help, thank you

@seanyen
Copy link
Contributor

seanyen commented Feb 20, 2019

@WangZP10969 Thank for reporting this! It smells like the installation doesn't get alone under vscode command prompt. We will take a look on this combination.

Also, I noticed ros-catkin-tools is not installed successfully, can you do choco upgrade ros-catkin-tools -y directly to see if it resolves the problem?

@WangZP10969
Copy link
Author

@WangZP10969 Thank for reporting this! It smells like the installation doesn't get alone under vscode command prompt. We will take a look on this combination.

Also, I noticed ros-catkin-tools is not installed successfully, can you do choco upgrade ros-catkin-tools -y directly to see if it resolves the problem?

I tried using the command choco upgrade ros-catkin-tools -y
The tips given are as follows:
Chocolatey v0.10.11
Upgrading the following packages:
ros-catkin-tools
By upgrading you accept licenses for the packages.
ros-catkin-tools is not installed. Installing...
Progress: Downloading ros-catkin-tools 0.0.1.1901231908... 100%
Progress: Downloading ros-catkin-tools 0.0.1.1901231908... 100%

ros-catkin-tools v0.0.1.1901231908
ros-catkin-tools package files upgrade completed. Performing other installation steps.
Downloading ROS for Windows patch requirements file...
Check and upgrade pip if needed...
Collecting pip==18.1
Using cached https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/d1/6a/4b2fcefd2ea0868810e92d519dacac1ddc64a2e53ba9e3422c3b62b378a6/setuptools-40.8.0-py2.py3-none-any.whl
Installing collected packages: pip, setuptools
Found existing installation: pip 19.0.2
Uninstalling pip-19.0.2:
Successfully uninstalled pip-19.0.2
Found existing installation: setuptools 39.0.1
Uninstalling setuptools-39.0.1:
Successfully uninstalled setuptools-39.0.1
Successfully installed pip-18.1 setuptools-40.8.0
Install released ROS catkin tools...
Collecting rosdep (from -r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/57/b9/735a9f5aee7b79863ca2fb654258e3d78ec665f9b7b9ef8d621e09244c05/rosdep-0.15.1.tar.gz (80kB)
Collecting rosinstall_generator (from -r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/75/91/66fcf3cadc67729e89745fddaa3eaf9ae49cbf65daa3403cf0db80c193fe/rosinstall_generator-0.1.14.tar.gz
Collecting wstool (from -r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/66/7b/a3e4195605644e54658101acc13593703bde9fb67731e4565ac225a5bdb5/wstool-0.1.17.tar.gz
Collecting rosinstall (from -r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 4))
Using cached https://files.pythonhosted.org/packages/38/c5/2c466034d05ad84ca15179d1f496958c6caad9432928bf7436711cc3e64e/rosinstall-0.7.8.tar.gz
Requirement already satisfied, skipping upgrade: catkin_pkg>=0.4.0 in c:\opt\python27amd64\lib\site-packages (from rosdep->-r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 1)) (0.4.10)
Requirement already satisfied, skipping upgrade: rospkg>=1.0.37 in c:\opt\python27amd64\lib\site-packages (from rosdep->-r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 1)) (1.1.7)
Collecting rosdistro>=0.7.0 (from rosdep->-r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/89/73/1afdde48b6531a51776cc6a74c0f90b4bd994824ad231d28c5e5ce7d73be/rosdistro-0.7.2.tar.gz
Requirement already satisfied, skipping upgrade: PyYAML>=3.1 in c:\opt\python27amd64\lib\site-packages (from rosdep->-r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 1)) (3.13)
Requirement already satisfied, skipping upgrade: setuptools in c:\opt\python27amd64\lib\site-packages (from rosinstall_generator->-r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 2)) (40.8.0)
Collecting vcstools>=0.1.38 (from wstool->-r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/1e/0c/fd44a903c31a12827f31c6fb15d8ba2f3b731ad1e54f1a004c98f1fa6541/vcstools-0.1.40.tar.gz
Requirement already satisfied, skipping upgrade: docutils in c:\opt\python27amd64\lib\site-packages (from catkin_pkg>=0.4.0->rosdep->-r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 1)) (0.14)
Requirement already satisfied, skipping upgrade: python-dateutil in c:\opt\python27amd64\lib\site-packages (from catkin_pkg>=0.4.0->rosdep->-r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 1)) (2.8.0)
Requirement already satisfied, skipping upgrade: pyparsing in c:\opt\python27amd64\lib\site-packages (from catkin_pkg>=0.4.0->rosdep->-r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 1)) (2.3.1)
Requirement already satisfied, skipping upgrade: argparse in c:\opt\python27amd64\lib\site-packages (from catkin_pkg>=0.4.0->rosdep->-r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 1)) (1.4.0)
Requirement already satisfied, skipping upgrade: six>=1.5 in c:\opt\python27amd64\lib\site-packages (from python-dateutil->catkin_pkg>=0.4.0->rosdep->-r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements.txt (line 1)) (1.12.0)
Installing collected packages: rosdistro, rosdep, rosinstall-generator, vcstools, wstool, rosinstall
Running setup.py install for rosdistro: started
Running setup.py install for rosdistro: finished with status 'done'
Running setup.py install for rosdep: started
Running setup.py install for rosdep: finished with status 'done'
Running setup.py install for rosinstall-generator: started
Running setup.py install for rosinstall-generator: finished with status 'done'
Running setup.py install for vcstools: started
Running setup.py install for vcstools: finished with status 'done'
Running setup.py install for wstool: started
Running setup.py install for wstool: finished with status 'done'
Running setup.py install for rosinstall: started
Running setup.py install for rosinstall: finished with status 'done'
Successfully installed rosdep-0.15.1 rosdistro-0.7.2 rosinstall-0.7.8 rosinstall-generator-0.1.14 vcstools-0.1.40 wstool-0.1.17
Patch with ROS for Windows catkin tools...
Collecting rospkg from git+https://github.com/ros-infrastructure/rospkg@master#egg=rospkg (from -r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements-patch.txt (line 1))
Cloning https://github.com/ros-infrastructure/rospkg (to revision master) to c:\users\public\documents\wondershare\creatortemp\pip-install-gmsxtz\rospkg
Collecting catkin_pkg from git+https://github.com/ms-iot/catkin_pkg@init_windows#egg=catkin_pkg (from -r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements-patch.txt (line 2))
Cloning https://github.com/ms-iot/catkin_pkg (to revision init_windows) to c:\users\public\documents\wondershare\creatortemp\pip-install-gmsxtz\catkin-pkg
Branch 'init_windows' set up to track remote branch 'init_windows' from 'origin'.
Switched to a new branch 'init_windows'
Collecting rosdep from git+https://github.com/ms-iot/rosdep@init_windows#egg=rosdep (from -r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements-patch.txt (line 3))
Cloning https://github.com/ms-iot/rosdep (to revision init_windows) to c:\users\public\documents\wondershare\creatortemp\pip-install-gmsxtz\rosdep
Branch 'init_windows' set up to track remote branch 'init_windows' from 'origin'.
Switched to a new branch 'init_windows'
Collecting vcstools from git+https://github.com/ms-iot/vcstools@init_windows#egg=vcstools (from -r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements-patch.txt (line 4))
Cloning https://github.com/ms-iot/vcstools (to revision init_windows) to c:\users\public\documents\wondershare\creatortemp\pip-install-gmsxtz\vcstools
Branch 'init_windows' set up to track remote branch 'init_windows' from 'origin'.
Switched to a new branch 'init_windows'
Collecting wstool from git+https://github.com/ms-iot/wstool@init_windows#egg=wstool (from -r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements-patch.txt (line 5))
Cloning https://github.com/ms-iot/wstool (to revision init_windows) to c:\users\public\documents\wondershare\creatortemp\pip-install-gmsxtz\wstool
Branch 'init_windows' set up to track remote branch 'init_windows' from 'origin'.
Switched to a new branch 'init_windows'
Collecting rosinstall_generator from git+https://github.com/ms-iot/rosinstall_generator@init_windows#egg=rosinstall_generator (from -r C:\ProgramData\chocolatey\lib\ros-catkin-tools\tools\requirements-patch.txt (line 6))
Cloning https://github.com/ms-iot/rosinstall_generator (to revision init_windows) to c:\users\public\documents\wondershare\creatortemp\pip-install-gmsxtz\rosinstall-generator
Branch 'init_windows' set up to track remote branch 'init_windows' from 'origin'.
Switched to a new branch 'init_windows'
Installing collected packages: rospkg, catkin-pkg, rosdep, vcstools, wstool, rosinstall-generator
Found existing installation: rospkg 1.1.7
Uninstalling rospkg-1.1.7:
Successfully uninstalled rospkg-1.1.7
Running setup.py install for rospkg: started
Running setup.py install for rospkg: finished with status 'done'
Found existing installation: catkin-pkg 0.4.10
Uninstalling catkin-pkg-0.4.10:
Successfully uninstalled catkin-pkg-0.4.10
Running setup.py install for catkin-pkg: started
Running setup.py install for catkin-pkg: finished with status 'done'
Found existing installation: rosdep 0.15.1
Uninstalling rosdep-0.15.1:
Successfully uninstalled rosdep-0.15.1
Running setup.py install for rosdep: started
Running setup.py install for rosdep: finished with status 'done'
Found existing installation: vcstools 0.1.40
Uninstalling vcstools-0.1.40:
Successfully uninstalled vcstools-0.1.40
Running setup.py install for vcstools: started
Running setup.py install for vcstools: finished with status 'done'
Found existing installation: wstool 0.1.17
Uninstalling wstool-0.1.17:
Successfully uninstalled wstool-0.1.17
Running setup.py install for wstool: started
Running setup.py install for wstool: finished with status 'done'
Found existing installation: rosinstall-generator 0.1.14
Uninstalling rosinstall-generator-0.1.14:
Successfully uninstalled rosinstall-generator-0.1.14
Running setup.py install for rosinstall-generator: started
Running setup.py install for rosinstall-generator: finished with status 'done'
Successfully installed catkin-pkg-0.4.8 rosdep-0.12.2 rosinstall-generator-0.1.14 rospkg-1.1.7 vcstools-0.1.40 wstool-0.1.17
The upgrade of ros-catkin-tools was successful.
Software install location not explicitly set, could be in package or
default install location if installer.

Chocolatey upgraded 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

After I run roscore, it seems to be a similar problem.
[rosout-1] restarting process
process[rosout-1]: started with pid [8224]
?[31m[rosout-1] process has died [pid 8224, exit code -1073741515, cmd c:\opt\ros\melodic\x64\lib\rosout\rosout.exe __name:=rosout __log:=C:\Users\XASY-PC.ros\log\673fb40f-34d4-11e9-bb9a-10f005138886\rosout-1.log].
log file: C:\Users\XASY-PC.ros\log\673fb40f-34d4-11e9-bb9a-10f005138886\rosout-1*.log?[0m

I used cmd to run the test, the prompt message is the same, but an error message will pop up at the same time.

The code could not be executed because boost_date_time-vc141-mt-x64-1_66.dll could not be found. Reinstalling the program may resolve this issue
Unable to continue executing code because boost_system-vc141-mt-x64-1_66.dll could not be found. Reinstalling the program may resolve this issue
Unable to continue executing code because log4cxx.dll could not be found. Reinstalling the program may resolve this issue

@kejxu
Copy link
Contributor

kejxu commented Feb 20, 2019

Next I installed choco, the prompt is normal
Finally I installed ros, using the following instructions:

thanks again for reporting the issue, the problems are seemingly lack of dependency. a few things to check here:

  • are you following the setup instructions on ROSOnWindows?
  • have you added ros-win Nuget source with choco source add -n=ros-win -s="https://roswin.azurewebsites.net/api/v2" --priority=1?

btw, thanks for the detailed steps! these are valuable knowledge of how to integrate ROS with vscode =)

@WangZP10969
Copy link
Author

Next I installed choco, the prompt is normal
Finally I installed ros, using the following instructions:

thanks again for reporting the issue, the problems are seemingly lack of dependency. a few things to check here:

  • are you following the setup instructions on ROSOnWindows?
  • have you added ros-win Nuget source with choco source add -n=ros-win -s="https://roswin.azurewebsites.net/api/v2" --priority=1?

btw, thanks for the detailed steps! these are valuable knowledge of how to integrate ROS with vscode =)

Yes, I did it according to the instructions in this document. Below I will give a record of my installation process.
I tried it a few months ago and it was a success. The document was still on another linked page. And I have not done anything else.

Process record:

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.7
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************

C:\Users\XASY-PC>@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass
-Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Getting latest version of the Chocolatey package for download.
Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.11.
Extracting C:\Users\XASY-PC\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\XASY-PC\AppData\Local\Temp\chocolatey\chocInstall...
Installing chocolatey on this machine
Creating ChocolateyInstall as an environment variable (targeting 'Machine')
  Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
WARNING: It's very likely you will need to close and reopen your shell 
  before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to 'C:\ProgramData\chocolatey\lib'
  (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
  and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.

Creating Chocolatey folders if they do not already exist.

WARNING: You can safely ignore errors related to missing log files when 
  upgrading from a version of Chocolatey less than 0.9.9. 
  'Batch file could not be found' is also safe to ignore. 
  'The system cannot find the file specified' - also safe.
警告: Not setting tab completion: Profile file does not exist at 
'C:\Users\XASY-PC\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
 first prior to using choco.
Ensuring chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder

C:\Users\XASY-PC>choco install git -y
Chocolatey v0.10.11
Installing the following packages:
git
By installing you accept licenses for the packages.
git v2.20.1 already installed.
 Use --force to reinstall, specify a version to install, or try upgrade.

Chocolatey installed 0/1 packages. 
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Warnings:
 - git - git v2.20.1 already installed.
 Use --force to reinstall, specify a version to install, or try upgrade.

C:\Users\XASY-PC>choco source add -n=ros-win -s="https://roswin.azurewebsites.net/api/v2" --priority=1
Chocolatey v0.10.11
Nothing to change. Config already set.

C:\Users\XASY-PC>choco upgrade ros-melodic-desktop -y
Chocolatey v0.10.11
Upgrading the following packages:
ros-melodic-desktop
By upgrading you accept licenses for the packages.

You have ros-melodic-desktop v20190219.1 installed. Version 20190220.2 is available based on your source(s).
Progress: Downloading ros-melodic-desktop 20190220.2... 100%

ros-melodic-desktop v20190220.2
ros-melodic-desktop package files upgrade completed. Performing other installation steps.
Extracting 64-bit C:\ProgramData\chocolatey\lib\ros-melodic-desktop\tools\drop.zip to c:\opt\ros...
c:\opt\ros
running rosdep...
ERROR: default sources list file already exists:
        C:/opt/ros/melodic/x64/etc/ros\rosdep\sources.list.d\20-default.list
Please delete if you wish to re-initialize
reading in sources list data from C:/opt/ros/melodic/x64/etc/ros\rosdep\sources.list.d
Hit https://raw.githubusercontent.com/ms-iot/rosdistro-db/init_windows/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ms-iot/rosdistro-db/init_windows/rosdep/win-chocolatey.yaml
Hit https://raw.githubusercontent.com/ms-iot/rosdistro-db/init_windows/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ms-iot/rosdistro-db/init_windows/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ms-iot/rosdistro-db/init_windows/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ms-iot/rosdistro-db/init_windows/releases/fuerte.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Add distro "ardent"
Add distro "bouncy"
Add distro "crystal"
Add distro "groovy"
Add distro "hydro"
Add distro "indigo"
Add distro "jade"
Add distro "kinetic"
Add distro "lunar"
Add distro "melodic"
updated cache in C:\Users\XASY-PC\.ros\rosdep\sources.cache
Collecting matplotlib
  Using cached https://files.pythonhosted.org/packages/f7/5b/4bc804df462961a3f0d138243611ce24b7899db04e6043e46df0ff1080e9/matplotlib-2.2.3-cp27-cp27m-win_amd64.whl
Requirement already satisfied, skipping upgrade: python-dateutil>=2.1 in c:\opt\python27amd64\lib\site-packages (from matplotlib) (2.8.0)
Requirement already satisfied, skipping upgrade: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\opt\python27amd64\lib\site-packages (from matplotlib) (2.3.1)
Collecting numpy>=1.7.1 (from matplotlib)
  Downloading https://files.pythonhosted.org/packages/4e/53/f9321242bf0181a28e4fa5604b712b2e9495df1863e7a83eec3d0cc1ef99/numpy-1.16.1-cp27-cp27m-win_amd64.whl (11.8MB)
Collecting pytz (from matplotlib)
  Downloading https://files.pythonhosted.org/packages/61/28/1d3920e4d1d50b19bc5d24398a7cd85cc7b9a75a490570d5a30c57622d34/pytz-2018.9-py2.py3-none-any.whl (510kB)
Collecting backports.functools-lru-cache (from matplotlib)
  Using cached https://files.pythonhosted.org/packages/03/8e/2424c0e65c4a066e28f539364deee49b6451f8fcd4f718fefa50cc3dcf48/backports.functools_lru_cache-1.5-py2.py3-none-any.whl
Requirement already satisfied, skipping upgrade: six>=1.10 in c:\opt\python27amd64\lib\site-packages (from matplotlib) (1.12.0)
Collecting cycler>=0.10 (from matplotlib)
  Using cached https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Collecting kiwisolver>=1.0.1 (from matplotlib)
  Using cached https://files.pythonhosted.org/packages/e0/3a/2fda27dacdfafcf8f40cce2be09890b1443af3e65c3ab8f7294216a2946b/kiwisolver-1.0.1-cp27-none-win_amd64.whl
Requirement already satisfied, skipping upgrade: setuptools in c:\opt\python27amd64\lib\site-packages (from kiwisolver>=1.0.1->matplotlib) (40.8.0)
Installing collected packages: numpy, pytz, backports.functools-lru-cache, cycler, kiwisolver, matplotlib
Successfully installed backports.functools-lru-cache-1.5 cycler-0.10.0 kiwisolver-1.0.1 matplotlib-2.2.3 numpy-1.16.1 pytz-2018.9
Collecting nose
  Using cached https://files.pythonhosted.org/packages/99/4f/13fb671119e65c4dce97c60e67d3fd9e6f7f809f2b307e2611f4701205cb/nose-1.3.7-py2-none-any.whl
Installing collected packages: nose
Successfully installed nose-1.3.7
Collecting pillow
  Downloading https://files.pythonhosted.org/packages/b5/ff/8bd40241d1345331cdc45f4412386e7464d031f90420c2aebd3ab7f7a1c9/Pillow-5.4.1-cp27-cp27m-win_amd64.whl (1.8MB)
Installing collected packages: pillow
Successfully installed pillow-5.4.1
Collecting lxml
  Downloading https://files.pythonhosted.org/packages/e2/70/8d8fd5dff0ee4c368332ef75f4113eecb5a9e2905742b88c95687e9bacfc/lxml-4.3.1-cp27-cp27m-win_amd64.whl (3.6MB)
Installing collected packages: lxml
Successfully installed lxml-4.3.1
Collecting pycrypto
  Using cached https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz
Installing collected packages: pycrypto
  Running setup.py install for pycrypto: started
    Running setup.py install for pycrypto: finished with status 'done'
Successfully installed pycrypto-2.6.1
Collecting empy
  Using cached https://files.pythonhosted.org/packages/b7/56/72a285d257c7791616960493a04f14c05ca1bf7a83dd208485cf991563bd/empy-3.3.2.tar.gz
Installing collected packages: empy
  Running setup.py install for empy: started
    Running setup.py install for empy: finished with status 'done'
Successfully installed empy-3.3.2
Collecting netifaces
  Downloading https://files.pythonhosted.org/packages/0d/18/fd6e9c71a35b67a73160ec80a49da63d1eed2d2055054cc2995714949132/netifaces-0.10.9.tar.gz
Installing collected packages: netifaces
  Running setup.py install for netifaces: started
    Running setup.py install for netifaces: finished with status 'done'
Successfully installed netifaces-0.10.9
Collecting paramiko
  Using cached https://files.pythonhosted.org/packages/cf/ae/94e70d49044ccc234bfdba20114fa947d7ba6eb68a2e452d89b920e62227/paramiko-2.4.2-py2.py3-none-any.whl
Collecting pynacl>=1.0.1 (from paramiko)
  Using cached https://files.pythonhosted.org/packages/87/b6/dafe0c559ff240290d44ca5b015ee651dc4cbcf54325c4cd2d3df61e3693/PyNaCl-1.3.0-cp27-cp27m-win_amd64.whl
Collecting cryptography>=1.5 (from paramiko)
  Downloading https://files.pythonhosted.org/packages/18/b8/d7398beb3fa0b4fecb53701348e5c7b35e90cc88af931d70c62e8e426e36/cryptography-2.5-cp27-cp27m-win_amd64.whl (1.5MB)
Collecting bcrypt>=3.1.3 (from paramiko)
  Downloading https://files.pythonhosted.org/packages/cb/89/daf5f20d6a60943344cf37e9b130e404eca49bee356c2bb88346d40c01fa/bcrypt-3.1.6-cp27-cp27m-win_amd64.whl
Collecting pyasn1>=0.1.7 (from paramiko)
  Downloading https://files.pythonhosted.org/packages/7b/7c/c9386b82a25115cccf1903441bba3cbadcfae7b678a20167347fa8ded34c/pyasn1-0.4.5-py2.py3-none-any.whl (73kB)
Requirement already satisfied, skipping upgrade: six in c:\opt\python27amd64\lib\site-packages (from pynacl>=1.0.1->paramiko) (1.12.0)
Collecting cffi>=1.4.1 (from pynacl>=1.0.1->paramiko)
  Downloading https://files.pythonhosted.org/packages/7a/b9/76f197f38b5837e365b7f7804b45dc93793edaf70802efc24f592bef49a8/cffi-1.12.1-cp27-cp27m-win_amd64.whl (167kB)
Collecting enum34; python_version < "3" (from cryptography>=1.5->paramiko)
  Using cached https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=1.5->paramiko)
  Using cached https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting ipaddress; python_version < "3" (from cryptography>=1.5->paramiko)
  Using cached https://files.pythonhosted.org/packages/fc/d0/7fc3a811e011d4b388be48a0e381db8d990042df54aa4ef4599a31d39853/ipaddress-1.0.22-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.4.1->pynacl>=1.0.1->paramiko)
  Using cached https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz
Installing collected packages: pycparser, cffi, pynacl, enum34, asn1crypto, ipaddress, cryptography, bcrypt, pyasn1, paramiko
  Running setup.py install for pycparser: started
    Running setup.py install for pycparser: finished with status 'done'
Successfully installed asn1crypto-0.24.0 bcrypt-3.1.6 cffi-1.12.1 cryptography-2.5 enum34-1.1.6 ipaddress-1.0.22 paramiko-2.4.2 pyasn1-0.4.5 pycparser-2.19 pynacl-1.3.0
Collecting coverage
  Downloading https://files.pythonhosted.org/packages/1b/45/4bdfd4e1a6174d07694b65949824766c9168bc35bd4158824736e2ff9683/coverage-4.5.2-cp27-cp27m-win_amd64.whl (181kB)
Installing collected packages: coverage
Successfully installed coverage-4.5.2
Collecting mock
  Using cached https://files.pythonhosted.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl
Collecting funcsigs>=1; python_version < "3.3" (from mock)
  Using cached https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl
Requirement already satisfied, skipping upgrade: six>=1.9 in c:\opt\python27amd64\lib\site-packages (from mock) (1.12.0)
Collecting pbr>=0.11 (from mock)
  Downloading https://files.pythonhosted.org/packages/8c/7f/fed53b379500fd889707d1f6e61c2a35e12f2de87396894aff89b017d1d6/pbr-5.1.2-py2.py3-none-any.whl (107kB)
Installing collected packages: funcsigs, pbr, mock
Successfully installed funcsigs-1.0.2 mock-2.0.0 pbr-5.1.2
Requirement already up-to-date: numpy in c:\opt\python27amd64\lib\site-packages (1.16.1)
Collecting psutil
  Downloading https://files.pythonhosted.org/packages/08/92/97b011d665ade1caf05dd02a3af4ede751c7b80f34812bc81479ec867d85/psutil-5.5.1-cp27-none-win_amd64.whl (225kB)
Installing collected packages: psutil
Successfully installed psutil-5.5.1
Collecting gnupg
  Using cached https://files.pythonhosted.org/packages/96/6c/21f99b450d2f0821ff35343b9a7843b71e98de35192454606435c72991a8/gnupg-2.3.1.tar.gz
Requirement already satisfied, skipping upgrade: psutil>=1.2.1 in c:\opt\python27amd64\lib\site-packages (from gnupg) (5.5.1)
Installing collected packages: gnupg
  Running setup.py install for gnupg: started
    Running setup.py install for gnupg: finished with status 'done'
Successfully installed gnupg-2.3.1
Collecting PyOpenGL
  Using cached https://files.pythonhosted.org/packages/9c/1d/4544708aaa89f26c97cc09450bb333a23724a320923e74d73e028b3560f9/PyOpenGL-3.1.0.tar.gz
Installing collected packages: PyOpenGL
  Running setup.py install for PyOpenGL: started
    Running setup.py install for PyOpenGL: finished with status 'done'
Successfully installed PyOpenGL-3.1.0
Collecting opencv-python
  Downloading https://files.pythonhosted.org/packages/04/0c/f4613a991d92bc56c9ed39c0b217604bcf486034ca546adff09c8651921c/opencv_python-4.0.0.21-cp27-cp27m-win_amd64.whl (30.4MB)
Requirement already satisfied, skipping upgrade: numpy>=1.11.1 in c:\opt\python27amd64\lib\site-packages (from opencv-python) (1.16.1)
Installing collected packages: opencv-python
Successfully installed opencv-python-4.0.0.21
Collecting pyserial
  Using cached https://files.pythonhosted.org/packages/0d/e4/2a744dd9e3be04a0c0907414e2a01a7c88bb3915cbe3c8cc06e209f59c30/pyserial-3.4-py2.py3-none-any.whl
Installing collected packages: pyserial
Successfully installed pyserial-3.4
Collecting pydot
  Downloading https://files.pythonhosted.org/packages/33/d1/b1479a770f66d962f545c2101630ce1d5592d90cb4f083d38862e93d16d2/pydot-1.4.1-py2.py3-none-any.whl
Requirement already satisfied, skipping upgrade: pyparsing>=2.1.4 in c:\opt\python27amd64\lib\site-packages (from pydot) (2.3.1)
Installing collected packages: pydot
Successfully installed pydot-1.4.1
Continuing to install resolvable dependencies...
executing command [pip install -U matplotlib]
executing command [pip install -U nose]
executing command [pip install -U pillow]
executing command [pip install -U lxml]
executing command [pip install -U pycrypto]
executing command [pip install -U empy]
executing command [pip install -U netifaces]
executing command [pip install -U paramiko]
executing command [pip install -U coverage]
executing command [pip install -U mock]
executing command [pip install -U numpy]
executing command [pip install -U psutil]
executing command [pip install -U gnupg]
executing command [pip install -U PyOpenGL]
executing command [pip install -U opencv-python]
executing command [pip install -U pyserial]
executing command [pip install -U pydot]
#All required rosdeps installed successfully
 The upgrade of ros-melodic-desktop was successful.
  Software installed to 'c:\opt\ros'

Chocolatey upgraded 1/1 packages. 
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

C:\Users\XASY-PC>c:\opt\ros\melodic\x64\setup.bat

C:\Users\XASY-PC>roscore
... logging to C:\Users\XASY-PC\.ros\log\f28c1fb0-3586-11e9-959f-10f005138886\roslaunch-WangZP-PC-4592.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://WangZP-PC:11503/
ros_comm version 1.14.3


SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.3

NODES

auto-starting new master
process[master]: started with pid [11916]
ROS_MASTER_URI=http://WangZP-PC:11311/
setting /run_id to f28c1fb0-3586-11e9-959f-10f005138886
process[rosout-1]: started with pid [5736]
started core service [/rosout]
?[31m[rosout-1] process has died [pid 5736, exit code -1073741515, cmd c:\opt\ros\melodic\x64\lib\rosout\rosout.exe __name:=rosout __log:=C:\Users\XASY-PC\.ros\log\f28c1fb0-3586-11e9-959f-10f005138886\rosout-1.log].
log file: C:\Users\XASY-PC\.ros\log\f28c1fb0-3586-11e9-959f-10f005138886\rosout-1*.log?[0m
[rosout-1] restarting process
process[rosout-1]: started with pid [8928]
?[31m[rosout-1] process has died [pid 8928, exit code -1073741515, cmd c:\opt\ros\melodic\x64\lib\rosout\rosout.exe __name:=rosout __log:=C:\Users\XASY-PC\.ros\log\f28c1fb0-3586-11e9-959f-10f005138886\rosout-1.log].
log file: C:\Users\XASY-PC\.ros\log\f28c1fb0-3586-11e9-959f-10f005138886\rosout-1*.log?[0m

I tried to open another terminal and started the turtle simulation node, but there was no response and no error message.

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.7
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************

C:\Users\XASY-PC>c:\opt\ros\melodic\x64\setup.bat

C:\Users\XASY-PC>rosrun turtlesim turtlesim_node

C:\Users\XASY-PC>

I also tried this process in Windows Command Prompt, in addition to the above messages, there are several system errors that indicate missing: log4cxx.dll,boost_date_time-vc141-mt-x64-1_66.dll,boost_system-vc141-mt-x64-1_66.dll


**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.7
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************

C:\Windows\System32>c:\opt\ros\melodic\x64\setup.bat

C:\Windows\System32>roscore
... logging to C:\Users\XASY-PC\.ros\log\33e3f580-3589-11e9-857a-10f005138886\roslaunch-WangZP-PC-3508.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://WangZP-PC:12082/
ros_comm version 1.14.3


SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.3

NODES

auto-starting new master
process[master]: started with pid [10068]
ROS_MASTER_URI=http://WangZP-PC:11311/
setting /run_id to 33e3f580-3589-11e9-857a-10f005138886
process[rosout-1]: started with pid [10996]
started core service [/rosout]
�[31m[rosout-1] process has died [pid 10996, exit code -1073741515, cmd c:\opt\ros\melodic\x64\lib\rosout\rosout.exe __name:=rosout __log:=C:\Users\XASY-PC\.ros\log\33e3f580-3589-11e9-857a-10f005138886\rosout-1.log].
log file: C:\Users\XASY-PC\.ros\log\33e3f580-3589-11e9-857a-10f005138886\rosout-1*.log�[0m
[rosout-1] restarting process
process[rosout-1]: started with pid [9012]
�[31m[rosout-1] process has died [pid 9012, exit code -1073741515, cmd c:\opt\ros\melodic\x64\lib\rosout\rosout.exe __name:=rosout __log:=C:\Users\XASY-PC\.ros\log\33e3f580-3589-11e9-857a-10f005138886\rosout-1.log].
log file: C:\Users\XASY-PC\.ros\log\33e3f580-3589-11e9-857a-10f005138886\rosout-1*.log�[0m
[rosout-1] restarting process
^C
C:\Windows\System32>[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

@kejxu kejxu added the bug Something isn't working label Feb 21, 2019
@kejxu
Copy link
Contributor

kejxu commented Mar 4, 2019

just want to update on this thread, we are currently focusing on upstreaming our ms-iot payload to ROS mainline, as a result, everything else have to be de-prioritized.

I will revisit and try to reproduce this issue later this week, and update on this thread afterwards =) My apologies for the delay, and thanks!

@NevilleKitala
Copy link

I would like to report the exact same issue seems to have occurred with me as well. I have read through his logs and errors and they seem similar to mine. I am curious if there might be a solution yet.

@WangZP10969
Copy link
Author

I would like to report the exact same issue seems to have occurred with me as well. I have read through his logs and errors and they seem similar to mine. I am curious if there might be a solution yet.

The effect of running on my computer is this, there is no solution yet. I have been busy with something else recently. After a while I will try to use other computers to test if there will be similar problems.

@WangZP10969
Copy link
Author

I would like to report the exact same issue seems to have occurred with me as well. I have read through his logs and errors and they seem similar to mine. I am curious if there might be a solution yet.

I tried it again today and the results are consistent with the previous ones.
Throughout the installation process, I am skeptical about the steps to manually install Python. The installation instructions do not mention the way Python is installed.
If you don't install Python, you can't execute bat, and the Python installation location in bat is also a fixed path.
This makes me think if it need a specific way to install Python?

@seanyen
Copy link
Contributor

seanyen commented Mar 14, 2019

@WangZP10969

This makes me think if it need a specific way to install Python?

In ROS on Windows, we installed a specific Python runtime (c:\opt\python27amd64) for your ROS setup. You can find the package to learn more: https://roswin.azurewebsites.net/packages/ros-python2/

process[rosout-1]: started with pid [10996]
started core service [/rosout]
�[31m[rosout-1] process has died [pid 10996, exit code -1073741515, cmd c:\opt\ros\melodic\x64\lib\rosout\rosout.exe __name:=rosout __log:=C:\Users\XASY-PC.ros\log\33e3f580-3589-11e9-857a-10f005138886\rosout-1.log].
log file: C:\Users\XASY-PC.ros\log\33e3f580-3589-11e9-857a-10f005138886\rosout-1*.log�[0m
[rosout-1] restarting process
process[rosout-1]: started with pid [9012]
�[31m[rosout-1] process has died [pid 9012, exit code -1073741515, cmd c:\opt\ros\melodic\x64\lib\rosout\rosout.exe __name:=rosout __log:=C:\Users\XASY-PC.ros\log\33e3f580-3589-11e9-857a-10f005138886\rosout-1.log].
log file: C:\Users\XASY-PC.ros\log\33e3f580-3589-11e9-857a-10f005138886\rosout-1*.log�[0m
[rosout-1] restarting process

From your log, error -1073741515 to hex should be 0xC0000135 and which usually means some DLL dependencies not found. And I suggest to use Dependencies tool to analyze the missing modules.

Or you can try to directly run C:\opt\ros\melodic\x64\lib\rosout\rosout.exe to see any useful error messages after c:\opt\melodic\x64\setup.bat runs.

@WangZP10969
Copy link
Author

@WangZP10969

This makes me think if it need a specific way to install Python?

In ROS on Windows, we installed a specific Python runtime (c:\opt\python27amd64) for your ROS setup. You can find the package to learn more: https://roswin.azurewebsites.net/packages/ros-python2/

process[rosout-1]: started with pid [10996]
started core service [/rosout]
�[31m[rosout-1] process has died [pid 10996, exit code -1073741515, cmd c:\opt\ros\melodic\x64\lib\rosout\rosout.exe __name:=rosout __log:=C:\Users\XASY-PC.ros\log\33e3f580-3589-11e9-857a-10f005138886\rosout-1.log].
log file: C:\Users\XASY-PC.ros\log\33e3f580-3589-11e9-857a-10f005138886\rosout-1*.log�[0m
[rosout-1] restarting process
process[rosout-1]: started with pid [9012]
�[31m[rosout-1] process has died [pid 9012, exit code -1073741515, cmd c:\opt\ros\melodic\x64\lib\rosout\rosout.exe __name:=rosout __log:=C:\Users\XASY-PC.ros\log\33e3f580-3589-11e9-857a-10f005138886\rosout-1.log].
log file: C:\Users\XASY-PC.ros\log\33e3f580-3589-11e9-857a-10f005138886\rosout-1*.log�[0m
[rosout-1] restarting process

From your log, error -1073741515 to hex should be 0xC0000135 and which usually means some DLL dependencies not found. And I suggest to use Dependencies tool to analyze the missing modules.

Or you can try to directly run C:\opt\ros\melodic\x64\lib\rosout\rosout.exe to see any useful error messages after c:\opt\melodic\x64\setup.bat runs.

Thank you for your help.
I am trying to run rosout.exe directly, prompting the missing rosconsole.dll, roscpp.dll, roscpp_serialzation.dll, rostime.dll.
Is it because I forgot to install something?

@seanyen
Copy link
Contributor

seanyen commented Mar 14, 2019

@WangZP10969 Those should be under C:\opt\ros\melodic\x64\bin and this path should be added to %PATH% after setup.bat invokes. Did you find those DLLs (rosconsole.dll, roscpp.dll, roscpp_serialzation.dll, rostime.dll) there? They should come as ros-melodic-xyz installed.

FYI, here is my %PATH% after setup.bat is called: PATH=C:/opt/ros/melodic/x64\bin;C:/opt/ros/melodic/x64\lib;C:/opt/rosdeps/x64\bin;C:/opt/rosdeps/x64\lib;C:\opt\python27amd64\;C:\opt\python27amd64\Scripts;...

If it is not the case, I'd suggest to investigate a bit in setup.bat and _setup_util.py under C:\opt\ros\melodic\x64.

@WangZP10969
Copy link
Author

@seanyen
I found those dlls in the bin directory, then the environment variables after I run bat are as follows

PATH=C:/opt/ros/melodic/x64\bin;C:/opt/ros/melodic/x64\lib;C:\opt\python27amd64;C:\opt\python27amd64\Scripts;

@seanyen
Copy link
Contributor

seanyen commented Mar 14, 2019

@WangZP10969

What if you patch %PATH%? Run this after setup.bat: (Assuming c:\opt\rosdeps\x64 exists.)

set PATH=C:/opt/ros/melodic/x64\bin;C:/opt/ros/melodic/x64\lib;C:/opt/rosdeps/x64\bin;C:/opt/rosdeps/x64\lib;C:\opt\python27amd64\;C:\opt\python27amd64\Scripts;%PATH%

Then run roscore again?

@WangZP10969
Copy link
Author

@seanyen

Actually there is no C:/opt/rosdeps in my directory.
Only /ros and /python27amd64 in the opt directory

After I set it up, run the path as follows:
PATH=C:/opt/ros/melodic/x64\bin;C:/opt/ros/melodic/x64\lib;C:/opt/rosdeps/x64\bin;C:/opt/rosdeps/x64\lib; C:\opt\python27amd64;C:\opt\python27amd64\Scripts;C:/opt/ros/melodic/x64\bin;C:/opt/ros/melodic/x64\lib;C:\opt\python27amd64\ ;C:\opt\python27amd64\Scripts;

Running roscore should be the same before:
Process[rosout-1]: started with pid [10968]
?[31m[rosout-1] process has died [pid 10968, exit code -1073741515, cmd C:\opt\ros\melodic\x64\lib\rosout\rosout.exe __name:=rosout __log:=C:\Users \XASY-PC.ros\log\7cc8065e-4637-11e9-a570-10f005138883\rosout-1.log].
Log file: C:\Users\XASY-PC.ros\log\7cc8065e-4637-11e9-a570-10f005138883\rosout-1*.log?[0m
[rosout-1] restarting process

@seanyen
Copy link
Contributor

seanyen commented Mar 14, 2019

@WangZP10969
I guessed something went wrong when the previous install ran rosdep.

To manually recover that, after setup.bat, can you do:

:: it is okay to see "ERROR: default sources list file already exists:"
rosdep init

:: make sure you see "Hit https://raw.githubusercontent.com/ms-iot/rosdistro-db/init_windows/rosdep/win-chocolatey.yaml" on the output
rosdep update

:: now we trigger rosdep install manually with force reinstall.
pushd c:\opt\ros\melodic\x64
rosdep install --from-paths . --ignore-src --reinstall -r -y

It is going to pull large amount of files so please be patient. After it finishes, you should find lots of files downloaded to c:\opt\rosdeps\x64.

@WangZP10969
Copy link
Author

@seanyen
First of all, thank you very much for your help.

Yesterday I tried to install rosdep, but there may be some unsuccessful ones that caused the situation to not improve.

I think it may be affected by a lot of things in the current environment, so I will test the full process in a clean environment in the virtual machine.

The process is as follows:

  1. First install Ros-Python. There is a problem with this. I don't know how to install the Nuget package to opt. I used to install normal Python and then unpack the Nuget package to copy the contents for overwriting. What is the way to install a formal process?
  2. Follow https://ms-iot.github.io/ROSOnWindows/GettingStarted/Setup.html
    Process installation
  3. If bat or roscore cannot be executed normally, repair it by the following method
    Choco upgrade ros-catkin-tools
    ...rosdep install --from-paths . --ignore-src --reinstall -r -y
    Pip install defusedxml
    Pip install rospkg
    ...

This test may not be completed very quickly, I am busy with some work, once I have the results, I will update it in time.

@WangZP10969
Copy link
Author

I think the reason I found the problem is because I couldn't install ros completely. After using the tutorial, the ros is installed very fast, but obviously there are a lot of things missing, at least the rosdeps folder is not installed.
The installation record is as follows, no error message is prompted
What is the reason for this happening?

C:\Windows\System32>choco upgrade ros-melodic-desktop -y
Chocolatey v0.10.13
2 validations performed. 1 success(es), 1 warning(s), and 0 error(s).

Validation Warnings:
 - A pending system reboot request has been detected, however, this is
   being ignored due to the current Chocolatey configuration.  If you
   want to halt when this occurs, then either set the global feature
   using:
     choco feature enable -name=exitOnRebootDetected
   or pass the option --exit-when-reboot-detected.

Upgrading the following packages:
ros-melodic-desktop
By upgrading you accept licenses for the packages.
ros-melodic-desktop is not installed. Installing...
Progress: Downloading ros-melodic-desktop 20190318.1... 100%
Progress: Downloading ros-melodic-desktop 20190318.1... 100%

ros-melodic-desktop v20190318.1
ros-melodic-desktop package files upgrade completed. Performing other installation steps.
Extracting 64-bit C:\ProgramData\chocolatey\lib\ros-melodic-desktop\tools\drop.zip to c:\opt\ros...
c:\opt\ros
running rosdep...
 The upgrade of ros-melodic-desktop was successful.
  Software installed to 'c:\opt\ros'

Chocolatey upgraded 1/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

@maxsvetlik
Copy link

I've also run into this problem today and have come up with a workaround.
I was installing ROS on Windows as according to the installation instructions but facing the same issues as @WangZP10969.

After running choco upgrade ros-melodic-desktop_full -y choco would download and install the package, then output something along the lines to starting rosdeps... and immediately after, output chocolatey could not create tempory file at FILEPATH. Chocolatey would then report than ros-melodic-desktop_full had been installed correctly. Which I guess is true, but chocolatey had not successfully initialized, run or reasoned about rosdeps

Changing the cache location for chocolatey allowed for the temporary file to be successfully created, which in turn allowed for the rosdep to be initialized and run correctly. To be specific, here are the steps I took for recovery:

  1. choco uninstall ros-melodic-desktop_full
  2. choco config set cacheLocation c:\new_temp
  3. choco install ros-melodic-desktop_full

(sorry for the lack of exact output; my chocolatey logs got deleted as a casualty)
I installed ROS on Windows 3 weeks ago on a different system and did not encounter this problem, so this seems to be a recent development

@WangZP10969
Copy link
Author

I've also run into this problem today and have come up with a workaround.
I was installing ROS on Windows as according to the installation instructions but facing the same issues as @WangZP10969.

After running choco upgrade ros-melodic-desktop_full -y choco would download and install the package, then output something along the lines to starting rosdeps... and immediately after, output chocolatey could not create tempory file at FILEPATH. Chocolatey would then report than ros-melodic-desktop_full had been installed correctly. Which I guess is true, but chocolatey had not successfully initialized, run or reasoned about rosdeps

Changing the cache location for chocolatey allowed for the temporary file to be successfully created, which in turn allowed for the rosdep to be initialized and run correctly. To be specific, here are the steps I took for recovery:

  1. choco uninstall ros-melodic-desktop_full
  2. choco config set cacheLocation c:\new_temp
  3. choco install ros-melodic-desktop_full

(sorry for the lack of exact output; my chocolatey logs got deleted as a casualty)
I installed ROS on Windows 3 weeks ago on a different system and did not encounter this problem, so this seems to be a recent development

@maxsvetlik Thank you very much for your reply, I will try your way.

@WangZP10969
Copy link
Author

@maxsvetlik I try this way to clear the all of the ros, and set choco timeout very long, its worded normals
I think the problem was the install it not complete.
Thank all of you very much!

@kejxu
Copy link
Contributor

kejxu commented Apr 22, 2019

I think the problem was the install it not complete.
Thank all of you very much!

Thanks for trying it out and sharing the outcome =)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants