cmu-rss-lab / rosdiscover-evaluation

Image Creation and Evaluation Infrastructure for ROS Discover
MIT License
1 stars 0 forks source link

[Autorally-04] Static Recovery Errors #76

Open tobiasduerschmid opened 2 years ago

tobiasduerschmid commented 2 years ago

We have static recovery errors for autorally-04 (rosdiscover-experiments/autorally:f60077125d67d6e0a011d10b8fce6ba70aa6295c) This probably is the reason why we don't see the gazebo node in the result, even though it is launched in autorally/autorally_gazebo/launch/autoRallyTrackWorld.launch which is included in autorally/autorally_gazebo/launch/autoRallyTrackGazeboSim.launch

buggy.system-recovery.log

ChrisTimperley commented 2 years ago

I can look into this, but be aware that Gazebo will always come from a handwritten model rather than a recovered one.

tobiasduerschmid commented 2 years ago

The static recovery does fail on this version:


2021-11-06 11:55:49.274 | WARNING  | roswire.common.source:_info_from_cmakelists:237 - info.targets={'ConstantSpeedController': CMakeLibraryTarget(name='ConstantSpeedController', language=<SourceLanguage.CXX: 'cxx'>, sources={'./src/ConstantSpeedController/ConstantSpeedController.cpp'}, restrict_to_paths={'/ros_ws/src/autorally/autorally_control', '/ros_ws/devel/include/autorally_control'}, cmakelists_file='/ros_ws/src/autorally/autorally_control/./src/ConstantSpeedController/CMakeLists.txt', cmakelists_line=1, _entrypoint='autorally_control::ConstantSpeedController::onInit'), 'joystickController': CMakeBinaryTarget(name='joystickController', language=<SourceLanguage.CXX: 'cxx'>, sources={'./src/joystick/JoystickControl.cpp', './src/joystick/joystickControlMain.cpp'}, restrict_to_paths={'/ros_ws/src/autorally/autorally_control', '/ros_ws/devel/include/autorally_control'}, cmakelists_file='/ros_ws/src/autorally/autorally_control/./src/joystick/CMakeLists.txt', cmakelists_line=1), 'gpsWaypoint': CMakeBinaryTarget(name='gpsWaypoint', language=<SourceLanguage.CXX: 'cxx'>, sources={'./src/gpsWaypoint/gpsWaypoint.cpp'}, restrict_to_paths={'/ros_ws/src/autorally/autorally_control', '/ros_ws/devel/include/autorally_control'}, cmakelists_file='/ros_ws/src/autorally/autorally_control/./src/gpsWaypoint/CMakeLists.txt', cmakelists_line=7), 'autorally_control/ConstantSpeedController': CMakeLibraryTarget(name='ConstantSpeedController', language=<SourceLanguage.CXX: 'cxx'>, sources={'./src/ConstantSpeedController/ConstantSpeedController.cpp'}, restrict_to_paths={'/ros_ws/src/autorally/autorally_control', '/ros_ws/devel/include/autorally_control'}, cmakelists_file='/ros_ws/src/autorally/autorally_control/./src/ConstantSpeedController/CMakeLists.txt', cmakelists_line=1, _entrypoint='autorally_control::ConstantSpeedController::onInit')}
2021-11-06 11:55:49.274 | WARNING  | roswire.common.source:_info_from_cmakelists:238 - Package autorally_control: 'JumpControlOptimal' is referenced in nodelet_plugins.xml but not in CMakeLists.txt.
2021-11-06 11:55:49.274 | WARNING  | roswire.common.source:_info_from_cmakelists:237 - info.targets={'ConstantSpeedController': CMakeLibraryTarget(name='ConstantSpeedController', language=<SourceLanguage.CXX: 'cxx'>, sources={'./src/ConstantSpeedController/ConstantSpeedController.cpp'}, restrict_to_paths={'/ros_ws/src/autorally/autorally_control', '/ros_ws/devel/include/autorally_control'}, cmakelists_file='/ros_ws/src/autorally/autorally_control/./src/ConstantSpeedController/CMakeLists.txt', cmakelists_line=1, _entrypoint='autorally_control::ConstantSpeedController::onInit'), 'joystickController': CMakeBinaryTarget(name='joystickController', language=<SourceLanguage.CXX: 'cxx'>, sources={'./src/joystick/JoystickControl.cpp', './src/joystick/joystickControlMain.cpp'}, restrict_to_paths={'/ros_ws/src/autorally/autorally_control', '/ros_ws/devel/include/autorally_control'}, cmakelists_file='/ros_ws/src/autorally/autorally_control/./src/joystick/CMakeLists.txt', cmakelists_line=1), 'gpsWaypoint': CMakeBinaryTarget(name='gpsWaypoint', language=<SourceLanguage.CXX: 'cxx'>, sources={'./src/gpsWaypoint/gpsWaypoint.cpp'}, restrict_to_paths={'/ros_ws/src/autorally/autorally_control', '/ros_ws/devel/include/autorally_control'}, cmakelists_file='/ros_ws/src/autorally/autorally_control/./src/gpsWaypoint/CMakeLists.txt', cmakelists_line=7), 'autorally_control/ConstantSpeedController': CMakeLibraryTarget(name='ConstantSpeedController', language=<SourceLanguage.CXX: 'cxx'>, sources={'./src/ConstantSpeedController/ConstantSpeedController.cpp'}, restrict_to_paths={'/ros_ws/src/autorally/autorally_control', '/ros_ws/devel/include/autorally_control'}, cmakelists_file='/ros_ws/src/autorally/autorally_control/./src/ConstantSpeedController/CMakeLists.txt', cmakelists_line=1, _entrypoint='autorally_control::ConstantSpeedController::onInit')}
2021-11-06 11:55:49.274 | WARNING  | roswire.common.source:_info_from_cmakelists:238 - Package autorally_control: 'JumpControl' is referenced in nodelet_plugins.xml but not in CMakeLists.txt.
2021-11-06 11:55:49.274 | INFO     | rosdiscover.recover.tool:_info_via_cmake:265 - Recovered sources for joystickController as {'./src/joystick/JoystickControl.cpp', './src/joystick/joystickControlMain.cpp'}
2021-11-06 11:55:49.275 | DEBUG    | rosdiscover.recover.tool:_find_package_workspace:126 - looking for workspace marker: /ros_ws/src/autorally/.catkin_workspace
2021-11-06 11:55:49.534 | DEBUG    | rosdiscover.recover.tool:_find_package_workspace:131 - looking for workspace marker: /ros_ws/src/autorally/.catkin_tools
2021-11-06 11:55:49.823 | DEBUG    | rosdiscover.recover.tool:_find_package_workspace:126 - looking for workspace marker: /ros_ws/src/.catkin_workspace
2021-11-06 11:55:50.101 | DEBUG    | rosdiscover.recover.tool:_find_package_workspace:131 - looking for workspace marker: /ros_ws/src/.catkin_tools
2021-11-06 11:55:50.375 | DEBUG    | rosdiscover.recover.tool:_find_package_workspace:126 - looking for workspace marker: /ros_ws/.catkin_workspace
2021-11-06 11:55:51.779 | DEBUG    | rosdiscover.recover.tool:_recover:384 - beginning static recovery process
2021-11-06 11:55:55.027 | DEBUG    | rosdiscover.recover.tool:_recover:427 - running static recovery command: PATH=/opt/rosdiscover/bin:${PATH:-} LIBRARY_PATH=/opt/rosdiscover/lib:${LIBRARY_PATH:-} LD_LIBRARY_PATH=/opt/rosdiscover/lib:${LD_LIBRARY_PATH:-} rosdiscover-cxx-extract -p /ros_ws/build -output-filename /tmp/tmp.ieSORyUefy.json -restrict-to /ros_ws/src/autorally/autorally_control -restrict-to /ros_ws/devel/include/autorally_control /ros_ws/src/autorally/autorally_control/./src/joystick/JoystickControl.cpp /ros_ws/src/autorally/autorally_control/./src/joystick/joystickControlMain.cpp
2021-11-06 11:55:59.873 | ERROR    | rosdiscover.recover.tool:_recover:432 - static recovery failed [returncode: 139]: building ASTs..
built 2 ASTs
importing decls from translation unit [1/1]
2021-11-06 11:55:59.873 | ERROR    | rosdiscover.project.models:_recover:77 - Static recovery failed for autorally_control/joystickController
Traceback (most recent call last):

  File "/home/rosqual/rosdiscover-evaluation/scripts/recover-system.py", line 124, in <module>
    main()
    └ <function main at 0x7ffb614f6040>

  File "/home/rosqual/rosdiscover-evaluation/scripts/recover-system.py", line 120, in main
    recover(config)
    │       └ {'type': 'detection', 'subject': 'autorally', 'distro': 'indigo', 'build_command': 'try_again "catkin_make -DCMAKE_EXPORT_COM...
    └ <function recover at 0x7ffb676a9280>

  File "/home/rosqual/rosdiscover-evaluation/scripts/recover-system.py", line 26, in recover
    ({

  File "/home/rosqual/rosdiscover-evaluation/scripts/recover-system.py", line 39, in _recover_for_detection_experiment
    recover_system(
    └ <function recover_system at 0x7ffb6154eee0>

  File "/home/rosqual/rosdiscover-evaluation/scripts/recover-system.py", line 86, in recover_system
    rosdiscover.cli.main(args)
    │           │   │    └ ['launch', '/tmp/tmp2nygjhul.rosdiscover.yml', '--output', '/home/rosqual/rosdiscover-evaluation/experiments/detection/subjec...
    │           │   └ <function main at 0x7ffb6154e700>
    │           └ <module 'rosdiscover.cli' from '/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py'>
    └ <module 'rosdiscover' from '/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/__init__.py'>

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py", line 356, in main
    parsed_args.func(parsed_args)
    │           │    └ Namespace(output='/home/rosqual/rosdiscover-evaluation/experiments/detection/subjects/autorally-04/buggy.architecture.yml', c...
    │           └ <function launch at 0x7ffb6154e1f0>
    └ Namespace(output='/home/rosqual/rosdiscover-evaluation/experiments/detection/subjects/autorally-04/buggy.architecture.yml', c...

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py", line 72, in launch
    summary = _launch_config(args)
              │              └ Namespace(output='/home/rosqual/rosdiscover-evaluation/experiments/detection/subjects/autorally-04/buggy.architecture.yml', c...
              └ <function _launch_config at 0x7ffb61556af0>

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py", line 67, in _launch_config
    return _launch(config)
           │       └ Config(image='rosdiscover-experiments/autorally:f60077125d67d6e0a011d10b8fce6ba70aa6295c', sources=('/opt/ros/indigo/setup.ba...
           └ <function _launch at 0x7ffb6153ea60>

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py", line 61, in _launch
    interpreter.launch(fn_launch)
    │           │      └ Launch(filename='/ros_ws/src/autorally/autorally_gazebo/launch/autoRallyTrackGazeboSim.launch', arguments={})
    │           └ <function Interpreter.launch at 0x7ffb615cddc0>
    └ <rosdiscover.interpreter.interpreter.Interpreter object at 0x7ffb616c5be0>

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/interpreter/interpreter.py", line 110, in launch
    self._load(pkg=node.package,
    │    │         │    └ <member 'package' of 'NodeConfig' objects>
    │    │         └ NodeConfig(namespace='/', name='joystickController', typ='joystickController', package='autorally_control', executable_path='...
    │    └ <function Interpreter._load at 0x7ffb615cdf70>
    └ <rosdiscover.interpreter.interpreter.Interpreter object at 0x7ffb616c5be0>

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/interpreter/interpreter.py", line 276, in _load
    model = self.models.fetch(pkg, nodetype)
            │    │      │     │    └ 'joystickController'
            │    │      │     └ 'autorally_control'
            │    │      └ <function ProjectModels.fetch at 0x7ffb615cd430>
            │    └ ProjectModels(config=Config(image='rosdiscover-experiments/autorally:f60077125d67d6e0a011d10b8fce6ba70aa6295c', sources=('/op...
            └ <rosdiscover.interpreter.interpreter.Interpreter object at 0x7ffb616c5be0>

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/project/models.py", line 145, in fetch
    fetched_model = model_source(package, node)
                    │            │        └ 'joystickController'
                    │            └ 'autorally_control'
                    └ <bound method ProjectModels._recover of ProjectModels(config=Config(image='rosdiscover-experiments/autorally:f60077125d67d6e0...

> File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/project/models.py", line 72, in _recover
    model = self._recovery_tool.recover_using_cmakelists(package, node)
            │    │                                       │        └ 'joystickController'
            │    │                                       └ 'autorally_control'
            │    └ <member '_recovery_tool' of 'ProjectModels' objects>
            └ ProjectModels(config=Config(image='rosdiscover-experiments/autorally:f60077125d67d6e0a011d10b8fce6ba70aa6295c', sources=('/op...

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/recover/tool.py", line 279, in recover_using_cmakelists
    return self.recover(package_name, node_name, entrypoint, source_info.sources,
           │    │       │             │          │           │           └ {'./src/joystick/JoystickControl.cpp', './src/joystick/joystickControlMain.cpp'}
           │    │       │             │          │           └ CMakeBinaryTarget(name='joystickController', language=<SourceLanguage.CXX: 'cxx'>, sources={'./src/joystick/JoystickControl.c...
           │    │       │             │          └ 'main'
           │    │       │             └ 'joystickController'
           │    │       └ 'autorally_control'
           │    └ <function NodeRecoveryTool.recover at 0x7ffb615c9af0>
           └ NodeRecoveryTool(_app=App(image='rosdiscover-experiments/autorally:f60077125d67d6e0a011d10b8fce6ba70aa6295c', sources=('/opt/...

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/recover/tool.py", line 341, in recover
    program = self._recover(compile_commands_path, entrypoint, sources, path_restrictions)
              │    │        │                      │           │        └ {'/ros_ws/src/autorally/autorally_control', '/ros_ws/devel/include/autorally_control'}
              │    │        │                      │           └ ['/ros_ws/src/autorally/autorally_control/./src/joystick/JoystickControl.cpp', '/ros_ws/src/autorally/autorally_control/./src...
              │    │        │                      └ 'main'
              │    │        └ '/ros_ws/build/compile_commands.json'
              │    └ <function NodeRecoveryTool._recover at 0x7ffb615c9b80>
              └ NodeRecoveryTool(_app=App(image='rosdiscover-experiments/autorally:f60077125d67d6e0a011d10b8fce6ba70aa6295c', sources=('/opt/...

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/recover/tool.py", line 433, in _recover
    raise RuntimeError("static recovery process failed")

RuntimeError: static recovery process failed
tobiasduerschmid commented 2 years ago

New errors:

2021-11-06 13:36:23.733 | DEBUG    | rosdiscover.recover.tool:_recover:384 - beginning static recovery process
2021-11-06 13:36:26.725 | DEBUG    | rosdiscover.recover.tool:_recover:427 - running static recovery command: PATH=/opt/rosdiscover/bin:${PATH:-} LIBRARY_PATH=/opt/rosdiscover/lib:${LIBRARY_PATH:-} LD_LIBRARY_PATH=/opt/rosdiscover/lib:${LD_LIBRARY_PATH:-} rosdiscover-cxx-extract -p /ros_ws/build -output-filename /tmp/tmp.nk47ZgBFIE.json -restrict-to /ros_ws/devel/include/autorally_control -restrict-to /ros_ws/src/autorally/autorally_control /ros_ws/src/autorally/autorally_control/./src/joystick/joystickControlMain.cpp /ros_ws/src/autorally/autorally_control/./src/joystick/JoystickControl.cpp
2021-11-06 13:36:31.255 | ERROR    | rosdiscover.recover.tool:_recover:432 - static recovery failed [returncode: 139]: building ASTs..
built 2 ASTs
importing decls from translation unit [1/1]
2021-11-06 13:36:31.255 | ERROR    | rosdiscover.project.models:_recover:77 - Static recovery failed for autorally_control/joystickController
Traceback (most recent call last):

  File "/home/rosqual/rosdiscover-evaluation/scripts/recover-system.py", line 124, in <module>
    main()
    └ <function main at 0x7f94440bb040>

  File "/home/rosqual/rosdiscover-evaluation/scripts/recover-system.py", line 120, in main
    recover(config)
    │       └ {'type': 'detection', 'subject': 'autorally', 'distro': 'indigo', 'build_command': 'try_again "catkin_make -DCMAKE_EXPORT_COM...
    └ <function recover at 0x7f944a270280>

  File "/home/rosqual/rosdiscover-evaluation/scripts/recover-system.py", line 26, in recover
    ({

  File "/home/rosqual/rosdiscover-evaluation/scripts/recover-system.py", line 39, in _recover_for_detection_experiment
    recover_system(
    └ <function recover_system at 0x7f9444118ee0>

  File "/home/rosqual/rosdiscover-evaluation/scripts/recover-system.py", line 86, in recover_system
    rosdiscover.cli.main(args)
    │           │   │    └ ['launch', '/tmp/tmpkn8svchv.rosdiscover.yml', '--output', '/home/rosqual/rosdiscover-evaluation/experiments/detection/subjec...
    │           │   └ <function main at 0x7f9444118700>
    │           └ <module 'rosdiscover.cli' from '/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py'>
    └ <module 'rosdiscover' from '/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/__init__.py'>

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py", line 356, in main
    parsed_args.func(parsed_args)
    │           │    └ Namespace(output='/home/rosqual/rosdiscover-evaluation/experiments/detection/subjects/autorally-04/buggy.architecture.yml', c...
    │           └ <function launch at 0x7f94441181f0>
    └ Namespace(output='/home/rosqual/rosdiscover-evaluation/experiments/detection/subjects/autorally-04/buggy.architecture.yml', c...

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py", line 72, in launch
    summary = _launch_config(args)
              │              └ Namespace(output='/home/rosqual/rosdiscover-evaluation/experiments/detection/subjects/autorally-04/buggy.architecture.yml', c...
              └ <function _launch_config at 0x7f9444109af0>

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py", line 67, in _launch_config
    return _launch(config)
           │       └ Config(image='rosdiscover-experiments/autorally:f60077125d67d6e0a011d10b8fce6ba70aa6295c', sources=('/opt/ros/indigo/setup.ba...
           └ <function _launch at 0x7f9444105a60>

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py", line 61, in _launch
    interpreter.launch(fn_launch)
    │           │      └ Launch(filename='/ros_ws/src/autorally/autorally_gazebo/launch/autoRallyTrackGazeboSim.launch', arguments={})
    │           └ <function Interpreter.launch at 0x7f9444193dc0>
    └ <rosdiscover.interpreter.interpreter.Interpreter object at 0x7f944428e3a0>

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/interpreter/interpreter.py", line 110, in launch
    self._load(pkg=node.package,
    │    │         │    └ <member 'package' of 'NodeConfig' objects>
    │    │         └ NodeConfig(namespace='/', name='joystickController', typ='joystickController', package='autorally_control', executable_path='...
    │    └ <function Interpreter._load at 0x7f9444193f70>
    └ <rosdiscover.interpreter.interpreter.Interpreter object at 0x7f944428e3a0>

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/interpreter/interpreter.py", line 276, in _load
    model = self.models.fetch(pkg, nodetype)
            │    │      │     │    └ 'joystickController'
            │    │      │     └ 'autorally_control'
            │    │      └ <function ProjectModels.fetch at 0x7f9444193430>
            │    └ ProjectModels(config=Config(image='rosdiscover-experiments/autorally:f60077125d67d6e0a011d10b8fce6ba70aa6295c', sources=('/op...
            └ <rosdiscover.interpreter.interpreter.Interpreter object at 0x7f944428e3a0>

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/project/models.py", line 145, in fetch
    fetched_model = model_source(package, node)
                    │            │        └ 'joystickController'
                    │            └ 'autorally_control'
                    └ <bound method ProjectModels._recover of ProjectModels(config=Config(image='rosdiscover-experiments/autorally:f60077125d67d6e0...

> File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/project/models.py", line 72, in _recover
    model = self._recovery_tool.recover_using_cmakelists(package, node)
            │    │                                       │        └ 'joystickController'
            │    │                                       └ 'autorally_control'
            │    └ <member '_recovery_tool' of 'ProjectModels' objects>
            └ ProjectModels(config=Config(image='rosdiscover-experiments/autorally:f60077125d67d6e0a011d10b8fce6ba70aa6295c', sources=('/op...

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/recover/tool.py", line 279, in recover_using_cmakelists
    return self.recover(package_name, node_name, entrypoint, source_info.sources,
           │    │       │             │          │           │           └ {'./src/joystick/joystickControlMain.cpp', './src/joystick/JoystickControl.cpp'}
           │    │       │             │          │           └ CMakeBinaryTarget(name='joystickController', language=<SourceLanguage.CXX: 'cxx'>, sources={'./src/joystick/joystickControlMa...
           │    │       │             │          └ 'main'
           │    │       │             └ 'joystickController'
           │    │       └ 'autorally_control'
           │    └ <function NodeRecoveryTool.recover at 0x7f9444190af0>
           └ NodeRecoveryTool(_app=App(image='rosdiscover-experiments/autorally:f60077125d67d6e0a011d10b8fce6ba70aa6295c', sources=('/opt/...

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/recover/tool.py", line 341, in recover
    program = self._recover(compile_commands_path, entrypoint, sources, path_restrictions)
              │    │        │                      │           │        └ {'/ros_ws/devel/include/autorally_control', '/ros_ws/src/autorally/autorally_control'}
              │    │        │                      │           └ ['/ros_ws/src/autorally/autorally_control/./src/joystick/joystickControlMain.cpp', '/ros_ws/src/autorally/autorally_control/....
              │    │        │                      └ 'main'
              │    │        └ '/ros_ws/build/compile_commands.json'
              │    └ <function NodeRecoveryTool._recover at 0x7f9444190b80>
              └ NodeRecoveryTool(_app=App(image='rosdiscover-experiments/autorally:f60077125d67d6e0a011d10b8fce6ba70aa6295c', sources=('/opt/...

  File "/home/rosqual/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/recover/tool.py", line 433, in _recover
    raise RuntimeError("static recovery process failed")

RuntimeError: static recovery process failed
2021-11-06 13:36:31.274 | DEBUG    | rosdiscover.interpreter.interpreter:launch:106 - launching node: spawn_track from /ros_ws/src/autorally/autorally_gazebo/launch/autoRallyTrackWorld.launch
2021-11-06 13:36:31.275 | INFO     | rosdiscover.interpreter.interpreter:_load:273 - using remappings: {'/autorally_platform/imu': '/imu/imu', '/autorally_platform/gpsRoverStatus': '/gpsRoverStatus', '/autorally_platform/camera/left': '/left_camera', '/autorally_platform/camera/right': '/right_camera'}
2021-11-06 13:36:31.275 | DEBUG    | rosdiscover.project.models:_fetch_handwritten:97 - Handwritten gazebo_ros/spawn_model
2021-11-06 13:36:31.629 | DEBUG    | roswire.app.instance:close:150 - destroying app instance directory: /home/rosqual/.roswire/containers/tmpd1qk9pq9
2021-11-06 13:36:31.630 | DEBUG    | roswire.app.instance:close:152 - destroyed app instance directory: /home/rosqual/.roswire/containers/tmpd1qk9pq9
2021-11-06 13:36:31.963 | DEBUG    | roswire.app.instance:close:150 - destroying app instance directory: /home/rosqual/.roswire/containers/tmpogyjmk9q
2021-11-06 13:36:31.963 | DEBUG    | roswire.app.instance:close:152 - destroyed app instance directory: /home/rosqual/.roswire/containers/tmpogyjmk9q
ChrisTimperley commented 2 years ago

The following issue occurs when attempting to build the image:

Built target bond_generate_messages_cpp
Traceback (most recent call last):
  File "/ros_ws/src/camera1394/cfg/Camera1394.cfg", line 37, in <module>
    from driver_base.msg import SensorLevels
ImportError: No module named msg
[ 24%] Built target actionlib_msgs_generate_messages_lisp
Built target rviz_automoc
[ 24%] Built target _actionlib_generate_messages_check_deps_TestActionFeedback
make[2]: *** [/ros_ws/devel/include/camera1394/Camera1394Config.h] Error 1
make[1]: *** [camera1394/CMakeFiles/camera1394_gencfg.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
ChrisTimperley commented 2 years ago

^ the same issue also occurs for Autorally-01

ChrisTimperley commented 2 years ago

I've fixed the build issues for Autorally-01 and Autorally-04. I'll take a look into the static recovery problems on these now.

ChrisTimperley commented 2 years ago

I now get the following error when I attempt to recover the system:

usage: spawn_model [-h] [-urdf] [-model MODEL] [-param PARAM] [-unpause] [-wait] [-x X] [-y Y] [-z Z] [-R R] [-P P] [-Y Y] [-J J] [-gazebo_namespace GAZEBO_NAMESPACE]
spawn_model: error: unrecognized arguments: -file /ros_ws/src/autorally/autorally_description/urdf/autoRallyTrack.urdf
ChrisTimperley commented 2 years ago

After this fix [https://github.com/rosqual/rosdiscover/pull/243], I get a failure due to Gazebo not being included as part of the configuration. As @schmerl suggested, it makes sense to add a Gazebo launch file to the config here.

ChrisTimperley commented 2 years ago
INFO: parsing launch file [/ros_ws/src/autorally/autorally_gazebo/launch/autoRallyTrackGazeboSim.launch]:
<?xml version="1.0"?>

<!-- autoRallyTrackGazeboSim.launch

Use Gazebo to simulate a vehicle with Ackermann steering.

Arguments:
    namespace (string, default: auto_rally_platform)
        Vehicle namespace.
    world_name (string, default: worlds/empty.world)
        Gazebo world name.
    cmd_timeout (float, default: 0.5)
        Command timeout passed to the auto_rally_controller.py node.
    x (float, default: 0.0)
    y (float, default: 0.0)
    z (float, default: 0.1)
    roll (float, default: 0.0)
    pitch (float, default: 0.0)
    yaw (float, default: 0.0)
        Vehicle pose. x, y, and z are measured in meters. roll, pitch, and yaw
        are measured in radians.

Copyright (c) 2013 Wunderkammer Laboratory

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<launch>
  <arg name="namespace" default="autorally_platform"/>
  <arg name="world_name" default="worlds/empty_sky.world"/>
  <arg name="cmd_timeout" default="0.5"/>

  <!-- parameter for other programs to use to know if we are in simulation ro real world-->
  <!--<param name="autorally_simulation" value"true"/> -->

  <!-- Vehicle pose -->
  <arg name="x" default="0"/>
  <arg name="y" default="-8.5"/>
  <arg name="z" default="0.3"/>
  <arg name="roll" default="0.0"/>
  <arg name="pitch" default="0.0"/>
  <arg name="yaw" default="0.785398"/>

  <include file="$(find autorally_description)/launch/autoRallyPlatform.launch">
    <arg name="namespace" value="$(arg namespace)"/>
  </include>

  <!-- Remap to same topics as the actual robot -->
  <remap from="/$(arg namespace)/imu" to="/imu/imu" />
  <remap from="/$(arg namespace)/gpsRoverStatus" to="/gpsRoverStatus" />
  <remap from="/$(arg namespace)/camera/left" to="/left_camera" />
  <remap from="/$(arg namespace)/camera/right" to="/right_camera" />

  <group ns="$(arg namespace)">
    <!-- Create the world. -->
    <include file="$(find autorally_gazebo)/launch/autoRallyTrackWorld.launch">
      <arg name="world_name" value="$(arg world_name)"/>
      <arg name="namespace" value="$(arg namespace)" />
    </include>

    <!-- Spawn the vehicle. -->
    <node name="spawn_platform" pkg="gazebo_ros" type="spawn_model"
          args="-urdf -param robot_description -model autoRallyPlatform
                -gazebo_namespace /$(arg namespace)/gazebo
                -x $(arg x) -y $(arg y) -z $(arg z)
                -R $(arg roll) -P $(arg pitch) -Y $(arg yaw)"/>

    <!-- Load the joint controllers. One of these publishes the joint states
         to joint_states. -->
    <node name="controller_spawner" pkg="controller_manager" type="spawner"
          args="$(find autorally_gazebo)/config/autoRallyPlatformJointCtrlrParams.yaml"/>

    <!-- Control the steering, axle, and shock absorber joints. -->
    <node name="autorally_controller" pkg="autorally_gazebo"
          type="autorally_controller.py" output="screen">
      <param name="cmd_timeout" value="$(arg cmd_timeout)"/>
      <rosparam file="$(find autorally_gazebo)/config/autoRallyPlatformCtrlrParams.yaml" command="load"/>
      <rosparam param="chassisCommandProirities" command="load" file="$(env AR_CONFIG_PATH)/chassisCommandPriorities.yaml" />
    </node>

  </group>
  <include file="$(find autorally_core)/launch/autorally_core_manager.launch" />
  <include file="$(find autorally_control)/launch/joystickController.launch" />
</launch>

INFO: parsing launch file [/ros_ws/src/autorally/autorally_description/launch/autoRallyPlatform.launch]:
<?xml version="1.0"?>

<!-- autoRallyPlatform.launch

Launch nodes used by both RViz and Gazebo when visualizing a vehicle with
Ackermann steering.

Copyright (c) 2013 Wunderkammer Laboratory

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<launch>
  <arg name="namespace" default="autorally_platform"/>

  <group ns="$(arg namespace)">
    <!-- robot_description is used by nodes that publish to joint_states. -->
    <param name="robot_description" command="$(find xacro)/xacro $(find autorally_description)/urdf/autoRallyPlatform.urdf.xacro"/>
    <!-- Read joint positions from joint_states, then publish the vehicle's
         state to tf. -->
    <node name="autoRally_state_publisher" pkg="robot_state_publisher"
          type="robot_state_publisher">
      <param name="publish_frequency" value="50.0"/>
    </node>
  </group>
</launch>

INFO: parsing launch file [/ros_ws/src/autorally/autorally_gazebo/launch/autoRallyTrackWorld.launch]:
<launch>

  <!-- these are the arguments you can pass this launch file, for example paused:=true -->
  <arg name="paused" default="false"/>
  <arg name="use_sim_time" default="true"/>
  <arg name="extra_gazebo_args" default=""/>
  <arg name="gui" default="true"/>
  <arg name="headless" default="false"/>
  <arg name="debug" default="false"/>
  <arg name="physics" default="dart"/>
  <arg name="verbose" default="false"/>
  <arg name="world_name" default="worlds/empty_sky.world"/> <!-- Note: the world_name is with respect to GAZEBO_RESOURCE_PATH environmental variable -->
  <arg name="namespace" default="autorally_platform"/>

  <!-- set use_sim_time flag -->
  <group if="$(arg use_sim_time)">
    <param name="/use_sim_time" value="true" />
  </group>

  <!-- set command arguments -->
  <arg unless="$(arg paused)" name="command_arg1" value=""/>
  <arg     if="$(arg paused)" name="command_arg1" value="-u"/>
  <arg unless="$(arg headless)" name="command_arg2" value=""/>
  <arg     if="$(arg headless)" name="command_arg2" value="-r"/>
  <arg unless="$(arg verbose)" name="command_arg3" value=""/>
  <arg     if="$(arg verbose)" name="command_arg3" value="--verbose"/>
  <arg unless="$(arg debug)" name="script_type" value="gzserver"/>
  <arg     if="$(arg debug)" name="script_type" value="debug"/>

  <!-- start gazebo server-->
  <node name="gazebo" pkg="gazebo_ros" type="$(arg script_type)" respawn="false" output="screen"
        args="$(arg command_arg1) $(arg command_arg2) $(arg command_arg3) -e $(arg physics) $(arg extra_gazebo_args) $(arg world_name)" />

  <!-- start gazebo client -->
  <group if="$(arg gui)">
    <node name="gazebo_gui" pkg="gazebo_ros" type="gzclient" respawn="false" output="screen"/>
  </group>

  <node name="spawn_track" pkg="gazebo_ros" type="spawn_model"
        args="-file $(find autorally_description)/urdf/autoRallyTrack.urdf -urdf -model track
              -gazebo_namespace /$(arg namespace)/gazebo
              -x 0 -y 0 -z 0.0762
              -R 0 -P 0 -Y 0.785398"/>

</launch>

INFO: parsing launch file [/ros_ws/src/autorally/autorally_core/launch/autorally_core_manager.launch]:
<launch>
  <include file="$(find autorally_core)/launch/hardware.machine" />

  <node pkg="nodelet" type="nodelet" name="autorally_core_manager"  args="manager" output="screen" machine="autorally-master">
    <param name="num_worker_threads" value="30" />
  </node>
</launch>

INFO: parsing launch file [/ros_ws/src/autorally/autorally_core/launch/hardware.machine]:
<launch>

  <group if="$(env ROSLAUNCH_SSH_UNKNOWN)">

    <machine name="autorally-master" address="$(env MASTER_HOSTNAME)" user="muri" default="true"
      env-loader="/home/muri/catkin_ws/devel/env.sh"/>

  </group>

  <group unless="$(env ROSLAUNCH_SSH_UNKNOWN)">
    <machine name="autorally-master" address="$(env MASTER_HOSTNAME)" default="true"/>
  </group>

  <machine name="autorally-ocs" address="$(env HOSTNAME)" />
</launch>

INFO: parsing launch file [/ros_ws/src/autorally/autorally_control/launch/joystickController.launch]:
<launch>
  <include file="$(find autorally_core)/launch/hardware.machine" />

  <node name="joy_node" pkg="joy" type="joy_node" output="screen" machine="autorally-ocs">
    <param name="dev" value="/dev/input/js0" />
    <param name="deadzone" value="0.01" />
    <param name="autorepeat_rate" value="10" />
    <param name="coalesce_interval" value="0.01" />
  </node>

  <node name="joystickController" pkg="autorally_control" type="joystickController" output="screen" machine="autorally-ocs">
    <param name="throttleDamping" value="1.0" />
    <param name="steeringDamping" value="1.0" />
    <param name="throttleAxis" value="1" />
    <param name="steeringAxis" value="3" />
    <rosparam param="runstopToggleButtons">[0, 1, 2, 3]</rosparam>
    <param name="safeSpeedIncButton" value="0" />
    <param name="safeSpeedDecButton" value="3" />
    <param name="safeSpeedZeroButton1" value="1" />
    <param name="safeSpeedZeroButton2" value="2" />
    <param name="throttleEnableButton" value="4" />
    <param name="steeringEnableButton" value="5" />

    <param name="brakeAxis" value="2" />
    <remap from="/safeSpeed" to="/targetSpeed" />
  </node>

</launch>

INFO: parsing launch file [/ros_ws/src/autorally/autorally_core/launch/hardware.machine]:
<launch>

  <group if="$(env ROSLAUNCH_SSH_UNKNOWN)">

    <machine name="autorally-master" address="$(env MASTER_HOSTNAME)" user="muri" default="true"
      env-loader="/home/muri/catkin_ws/devel/env.sh"/>

  </group>

  <group unless="$(env ROSLAUNCH_SSH_UNKNOWN)">
    <machine name="autorally-master" address="$(env MASTER_HOSTNAME)" default="true"/>
  </group>

  <machine name="autorally-ocs" address="$(env HOSTNAME)" />
</launch>

INFO: using remappings: {'/autorally_platform/imu': '/imu/imu', '/autorally_platform/gpsRoverStatus': '/gpsRoverStatus', '/autorally_platform/camera/left': '/left_camera', '/autorally_platform/camera/right': '/right_camera'}
INFO: using remappings: {'/autorally_platform/imu': '/imu/imu', '/autorally_platform/gpsRoverStatus': '/gpsRoverStatus', '/autorally_platform/camera/left': '/left_camera', '/autorally_platform/camera/right': '/right_camera'}
INFO: using remappings: {'/autorally_platform/imu': '/imu/imu', '/autorally_platform/gpsRoverStatus': '/gpsRoverStatus', '/autorally_platform/camera/left': '/left_camera', '/autorally_platform/camera/right': '/right_camera'}
INFO: launched nodelet manager:  as autorally_core_manager
INFO: using remappings: {'/autorally_platform/imu': '/imu/imu', '/autorally_platform/gpsRoverStatus': '/gpsRoverStatus', '/autorally_platform/camera/left': '/left_camera', '/autorally_platform/camera/right': '/right_camera', '/safeSpeed': '/targetSpeed'}
INFO: using remappings: {'/autorally_platform/imu': '/imu/imu', '/autorally_platform/gpsRoverStatus': '/gpsRoverStatus', '/autorally_platform/camera/left': '/left_camera', '/autorally_platform/camera/right': '/right_camera'}
INFO: using remappings: {'/autorally_platform/imu': '/imu/imu', '/autorally_platform/gpsRoverStatus': '/gpsRoverStatus', '/autorally_platform/camera/left': '/left_camera', '/autorally_platform/camera/right': '/right_camera'}
INFO: using remappings: {'/autorally_platform/imu': '/imu/imu', '/autorally_platform/gpsRoverStatus': '/gpsRoverStatus', '/autorally_platform/camera/left': '/left_camera', '/autorally_platform/camera/right': '/right_camera'}
INFO: using remappings: {'/autorally_platform/imu': '/imu/imu', '/autorally_platform/gpsRoverStatus': '/gpsRoverStatus', '/autorally_platform/camera/left': '/left_camera', '/autorally_platform/camera/right': '/right_camera'}
ERROR: failed to statically recover system architecture for image [rosdiscover-experiments/autorally:63106bcaed7306a51c3bb8b4a165f28e3fbaae26]
Traceback (most recent call last):

  File "/usr0/home/chris/experiments/rosdiscover-evaluation/scripts/recover-system.py", line 133, in <module>
    main()
    └ <function main at 0x7f81abd298b0>

  File "/usr0/home/chris/experiments/rosdiscover-evaluation/scripts/recover-system.py", line 129, in main
    recover(config)
    │       └ {'type': 'detection', 'subject': 'autorally', 'distro': 'indigo', 'build_command': 'catkin build -DCMAKE_EXPORT_COMPILE_COMMA...
    └ <function recover at 0x7f81b1ed41f0>

  File "/usr0/home/chris/experiments/rosdiscover-evaluation/scripts/recover-system.py", line 26, in recover
    ({

  File "/usr0/home/chris/experiments/rosdiscover-evaluation/scripts/recover-system.py", line 43, in _recover_for_detection_experiment
    recover_system(
    └ <function recover_system at 0x7f81abd29790>

> File "/usr0/home/chris/experiments/rosdiscover-evaluation/scripts/recover-system.py", line 95, in recover_system
    rosdiscover.cli.main(args)
    │           │   │    └ ['launch', '/usr0/home/chris/experiments/rosdiscover-evaluation/experiments/detection/subjects/autorally-04/recovery.fixed.ro...
    │           │   └ <function main at 0x7f81abd290d0>
    │           └ <module 'rosdiscover.cli' from '/usr0/home/chris/experiments/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py'>
    └ <module 'rosdiscover' from '/usr0/home/chris/experiments/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/__init__.py'>

  File "/usr0/home/chris/experiments/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py", line 356, in main
    parsed_args.func(parsed_args)
    │           │    └ Namespace(output='/usr0/home/chris/experiments/rosdiscover-evaluation/experiments/detection/subjects/autorally-04/fixed.archi...
    │           └ <function launch at 0x7f81abd27b80>
    └ Namespace(output='/usr0/home/chris/experiments/rosdiscover-evaluation/experiments/detection/subjects/autorally-04/fixed.archi...

  File "/usr0/home/chris/experiments/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py", line 72, in launch
    summary = _launch_config(args)
              │              └ Namespace(output='/usr0/home/chris/experiments/rosdiscover-evaluation/experiments/detection/subjects/autorally-04/fixed.archi...
              └ <function _launch_config at 0x7f81abd7c670>

  File "/usr0/home/chris/experiments/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py", line 67, in _launch_config
    return _launch(config)
           │       └ Config(image='rosdiscover-experiments/autorally:63106bcaed7306a51c3bb8b4a165f28e3fbaae26', sources=('/opt/ros/indigo/setup.ba...
           └ <function _launch at 0x7f81abd7b670>

  File "/usr0/home/chris/experiments/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/cli.py", line 61, in _launch
    interpreter.launch(fn_launch)
    │           │      └ Launch(filename='/ros_ws/src/autorally/autorally_gazebo/launch/autoRallyTrackGazeboSim.launch', arguments={})
    │           └ <function Interpreter.launch at 0x7f81abdfcdc0>
    └ <rosdiscover.interpreter.interpreter.Interpreter object at 0x7f81ab032640>

  File "/usr0/home/chris/experiments/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/interpreter/interpreter.py", line 126, in launch
    plugin.load(self)
    │      │    └ <rosdiscover.interpreter.interpreter.Interpreter object at 0x7f81ab032640>
    │      └ <function LibGazeboROSMultiCameraPlugin.load at 0x7f81abdc3dc0>
    └ LibGazeboROSMultiCameraPlugin(camera_name='camera', image_topic_name='image_raw', camera_info_topic_name='camera_info', frame...

  File "/usr0/home/chris/experiments/rosdiscover-evaluation/deps/rosdiscover/src/rosdiscover/models/plugins/gazebo.py", line 610, in load
    gazebo = interpreter.nodes['/gazebo']
             │           └ {'/autorally_platform/autoRally_state_publisher': NodeContext(name='autoRally_state_publisher', namespace='/autorally_platfor...
             └ <rosdiscover.interpreter.interpreter.Interpreter object at 0x7f81ab032640>

KeyError: '/gazebo'
ChrisTimperley commented 2 years ago

As discussed with @schmerl, the issue here is that spawn_model.py is handled before gazebo. We need to update the ordering/prioritization of nodes such that Gazebo is always handled before spawn_model.py.