Bazelrc path issues for bazel run isaac

Hi,
I am following the isaac Ping tutorial

The problem is that I can only run bazel in docker only from the isaac/sdk or /engine folders.

The Ping tutorial wants bazel to run from /sdk/packages/ping directory, however bazel can not load the .bazelrc from that directory (maybe because I used archive manager outside of the docker?).

When I try to run Ping from the isaac/sdk directory the program failed on run-time because it can not find the ping module which is located in the packages/ping directory.

021-05-25 16:51:18.361 INFO  external/com_nvidia_isaac_engine/engine/gems/scheduler/scheduler.cpp@291: Scheduler execution groups are:

2021-05-25 16:51:18.361 INFO external/com_nvidia_isaac_engine/engine/gems/scheduler/scheduler.cpp@300: BlockerGroup: Cores = [22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35], Workers = No
2021-05-25 16:51:18.361 INFO external/com_nvidia_isaac_engine/engine/gems/scheduler/scheduler.cpp@300: WorkerGroup: Cores = [55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 1, 0, 2, 3, 4, 5, 16, 17, 18, 19, 20, 21], Workers = Yes
2021-05-25 16:51:18.366 INFO external/com_nvidia_isaac_engine/engine/alice/backend/modules.cpp@271: Loaded module ‘packages/ping/libping_components_module.so’: Now has 28 components total
2021-05-25 16:51:18.366 DEBUG external/com_nvidia_isaac_engine/engine/alice/application.cpp@321: Loaded 28 components: Ping, isaac::alice::BufferAllocatorReport, isaac::alice::ChannelMonitor, isaac::alice::CheckJetsonPerformanceModel, isaac::alice::CheckOperatingSystem, isaac::alice::Config, isaac::alice::ConfigBridge, isaac::alice::ConfigLoader, isaac::alice::Failsafe, isaac::alice::FailsafeHeartbeat, isaac::alice::InteractiveMarkersBridge, isaac::alice::LifecycleReport, isaac::alice::MessageLedger, isaac::alice::MessagePassingReport, isaac::alice::NodeStatistics, isaac::alice::Pose, isaac::alice::PoseInitializer, isaac::alice::PoseTree, isaac::alice::PyCodelet, isaac::alice::Random, isaac::alice::Scheduling, isaac::alice::Sight, isaac::alice::SightChannelStatus, isaac::alice::Subgraph, isaac::alice::Subprocess, isaac::alice::Throttle, isaac::alice::TimeOffset, isaac::alice::TimeSynchronizer,
2021-05-25 16:51:18.366 PANIC external/com_nvidia_isaac_engine/engine/alice/backend/modules.cpp@325: Could not load component ‘ping’

| Isaac application terminated unexpectedly |

#01 external/com_nvidia_isaac_engine/engine/alice/tools/main(+0x6cc1a) [0x562bcb31cc1a]
#02 external/com_nvidia_isaac_engine/engine/alice/tools/main(+0xe3e80) [0x562bcb393e80]
#03 external/com_nvidia_isaac_engine/engine/alice/tools/main(+0xe41f0) [0x562bcb3941f0]
#04 /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980) [0x7fbda8c65980]
#05 /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7) [0x7fbda82fffb7]
#06 /lib/x86_64-linux-gnu/libc.so.6(abort+0x141) [0x7fbda8301921]
#07 external/com_nvidia_isaac_engine/engine/alice/tools/main(+0x72489) [0x562bcb322489]
#08 external/com_nvidia_isaac_engine/engine/alice/tools/main(+0x81386) [0x562bcb331386]
#09 external/com_nvidia_isaac_engine/engine/alice/tools/main(+0xbb50a) [0x562bcb36b50a]
#10 external/com_nvidia_isaac_engine/engine/alice/tools/main(+0x7d90d) [0x562bcb32d90d]
#11 external/com_nvidia_isaac_engine/engine/alice/tools/main(+0x31906) [0x562bcb2e1906]
#12 external/com_nvidia_isaac_engine/engine/alice/tools/main(+0x33a69) [0x562bcb2e3a69]
#13 external/com_nvidia_isaac_engine/engine/alice/tools/main(+0x33dbf) [0x562bcb2e3dbf]
#14 external/com_nvidia_isaac_engine/engine/alice/tools/main(+0x12873) [0x562bcb2c2873]
#15 /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fbda82e2bf7]
#16 external/com_nvidia_isaac_engine/engine/alice/tools/main(+0x17eca) [0x562bcb2c7eca]

Minidump written to: /tmp/f81cd8d7-738c-44c0-6bad0c8e-ab809af8.dmp
Aborted (core dumped)
indent preformatted text by 4 spaces

How do we resolve the issue? Maybe we need to solve the .bazelrc or a path issue? I am not sure how to solve this problem.

I changed the buildrc file line to this:
import %workspace%/…/.bazelrc

Now i try to run the tutorial program from the /packages/ping directory.

But I still have critical error that the ping module can not be loaded as above.

here is my code for the BUILD file:

load("@com_nvidia_isaac_sdk//bzl:module.bzl", "isaac_app","isaac_cc_module")

isaac_app(
name = “ping”,
modules = ["//packages/ping:ping_components"]
)
isaac_cc_module(
name = “ping_components”,
srcs = [“Ping.cpp”],
hdrs = [“Ping.hpp”],
)

and here it is for the json

{
"name": "ping",
"modules": [
    "ping:ping_components"
  ],
"graph": {
    "nodes": [
      {
        "name": "ping",
        "components": [
            {
                "name":"ping",
                "type":"ping"
            }
        ]
      }
    ],
    "edges": []
  },
  "config": {
    "ping" : {
      "ping" : {
        "tick_period" : "1Hz"
      }
    }
  }

}

I have tried also “bazel clean --expunge” and “bazel run ping” again but that is not a solution.

The problem was fields that were in the isaac_cc_module function were not supposed to be there.

Yes, you have to invoke Bazel in Isaac SDK 2020.2 from the directory /sdk or /engine and not in any of the subdirectories because of a bug. Your fix is exactly right to work around that issue, but you can also just invoke <root>/sdk $> bazel run //apps/tutorials/ping:ping as well. Running inside a container is not the issue here.

I did not quite follow the runtime module problem you were running into. bazel clean --expunge is rarely necessary and will cause lots of recompilation. How did this work out for you exactly?

1 Like