0

I'm trying to separate out some code from drake/automotive/automotive_demo.cc. As a first step, I'm trying to copy automotive_demo.cc and automotive_demo.py into differently named files (test.cc and test.py) and then running bazel run automotive:test -- --num_simple_cars=1. I modified automotive/BUILD.bazel and test.py to take into account the new dependencies.

The problem is that after I bazel run, the simulator window opens but no car gets rendered. Eventually it just crashes with the following errors:

[lcm-spy] ClassDiscoverer: java.lang.NoClassDefFoundError: apple/laf/AquaPopupMenuUI
[lcm-spy]                  jar: ../com_jidesoft_jide_oss/jide-oss-2.9.7.jar
[lcm-spy]                  class: com/jidesoft/plaf/aqua/AquaJidePopupMenuUI.class
...
[drake_visualizer] Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication.
...
[lcm-spy] LCM: Disabling IPV6 support
[lcm-spy] LCM: TTL set to zero, traffic will not leave localhost.
[lcm-spy] java.net.SocketException: Can't assign requested address

Here is an (unresolved) Github issue that points to the problem being that test is a "custom plug-in". But if automotive_demo can work, surely there's a way to reproduce that behavior for test? I also tried grepping for QGuiApplication and only found a series of binary files, so I didn't know how to follow the error message's suggestion.

Nisarg
  • 1,631
  • 6
  • 19
  • 31
justinej
  • 1
  • 1

1 Answers1

0

when trying out your steps on Mac I unfortunately cannot reproduce your specific errors. I do not think that having test as a target name should cause problems (at least I did not experience issues).

Could you please make sure:

  1. You're able to run bazel run automotive:demo -- --num_simple_car=1?
  2. After having renamed automotive_demo.* to test.*, in your BAZEL.build, test.py files the following are mapped correctly: demo -> test and automotive_demo -> test_cc (or whatever unique name you choose)?
  • Thanks for the suggestion. It turns out that `bazel run automotive:demo -- --num_simple_car=1` had the same error. The error doesn't seem to be related to the car not rendering, because it persists but the car renders now. (I'm not really sure what the problem was, sorry! I've been adjusting a lot of things and I don't really understand why things work sometimes and don't work other times) – justinej Jun 03 '18 at 19:44
  • Actually, it turns out the reason my code wasn't working was because I was launching the wrong process with the launcher inside of the `.py` file. Instead of launching the bazel compiled `.cc` file, I was launching the `.py` file, which led to the Drake Visualizer window opening over and over again (printing out that error each time) until it crashed! Whoops – justinej Jun 03 '18 at 20:38