Virtualcoach process.cwd() nodejs error


#1

Hello,

I updated my platform to the latest version and get a weird error when using the virtual coach.
Everything looks good until I stop the simulation with sim.stop(), which gives this error:

sh: 0: getcwd() failed: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
path.js:1167
          cwd = process.cwd();
                        ^

Error: ENOENT: no such file or directory, uv_cwd
    at Object.resolve (path.js:1167:25)
    at Function.Module._resolveLookupPaths (module.js:424:17)
    at Function.Module._resolveFilename (module.js:541:20)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /home/nrpuser/.nvm/versions/node/v8.11.1/lib/node_modules/npm/bin/npm-cli.js:19:21
    at Object.<anonymous> (/home/nrpuser/.nvm/versions/node/v8.11.1/lib/node_modules/npm/bin/npm-cli.js:92:3)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v8.11.1 --silent` to unset it.
/home/nrpuser/.opt/bbp/nrp-services/gzbridge: line 12: node: command not found

Interestingly, aside from this log message, the resulting CSV are saved to disk as they should, and I did not notice anything broken.


#2

Hello Jacques,

This error message is logged every time I stop a simulation on my local installation, independently of the VirtualCoach.
It seems that line 135 of

$HBP/ExDBackend/hbp_nrp_cleserver/hbp_nrp_cleserver/server/LocalGazebo.py

is responsible for this error:

os.system(config.config.get('gzbridge', 'stop-cmd'))

I’ll investigate further in order to understand why killing gzbridge causes this error.

As far as I can tell, the error has no impact on the next simulation runs.

Best regards,
Luc


#3

Right, well observed.

It does not seem to have an impact on my side either, but it surely is confusing.

Cheers,
Jacques