ros / xacro

Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Home Page:http://www.ros.org/wiki/xacro

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot run xacro via ros2 run in Windows

wmmc88 opened this issue · comments

ros2 run xacro xacro
Traceback (most recent call last):
  File "C:\dev\ros2_rolling\install\Scripts\ros2-script.py", line 33, in <module>
    sys.exit(load_entry_point('ros2cli==0.15.0', 'console_scripts', 'ros2')())
  File "C:\dev\ros2_rolling\install\Lib\site-packages\ros2cli\cli.py", line 89, in main
    rc = extension.main(parser=parser, args=args)
  File "C:\dev\ros2_rolling\install\Lib\site-packages\ros2run\command\run.py", line 70, in main
    return run_executable(path=path, argv=args.argv, prefix=prefix)
  File "C:\dev\ros2_rolling\install\Lib\site-packages\ros2run\api\__init__.py", line 64, in run_executable
    process = subprocess.Popen(cmd)
  File "c:\python38\lib\subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "c:\python38\lib\subprocess.py", line 1311, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
OSError: [WinError 193] %1 is not a valid Win32 application

this seems like the same error that happened with some other ros2 python programs: ros-visualization/rqt_console#20

I think similar fixes there need to happen to xacro to be able to run this package under windows.

Directly invoking xacro also doesnt work since shebangs arent handled by windows.

Thanks for reporting the issue. As I don't have a Windows installation available, please apply the suggested changes yourself, validate, and file a PR.

Fixed via #304.