Create New Workspace

Hello,

Is there a way to use the Isaac SDK on a different workspace? Or should I develop on isaac-sdk/apps?

I’ve tried to use the create_empty_workspace script (found at isaac-sdk/engine/tools/create_empty_workspace/create_workspace.py), but it seems that it does not work well:

  • boost dependencies are needed to build my packages, even if my project does not depend on it.
  • same with @com_google_absl/strings
  • the file isaac.bzl.tpl points to //engine instead of @com_nvidia_isaac//engine
  • also, at line 235 of isaac.bzl.tpl, it is using only one $ when it should be $$
  • last, the workspace name does not change (is empty_workspace)

I solved the first 2 error by adding lines 27 to 86 of isaac-sdk/WORKSPACE file. I solved the third error by adding @com_nvidia_isaac. Fourth error solved by replacing the $ with $$

Finally, I have changed my workspace structure to:

my-jetson-ws/
|- build/
| |- BUILD (empty file created by the script)
| |- isaac.bzl (created by the script, and modified by me)
|
|- messages/
|
|- packages/
| |- my-package-1/
| | |- BUILD (this file loads @my_workspace//build:isaac.bzl)
| |
| |- my-package-2/
| | |- BUILD
|
|- WORKSPACE (created by the script, modified by me)

After doing this, I was able to build a c++ project using bazel:
bazel build //packages/my-package-1:component

But still cannot build python modules.
In case I can create my own workspace, How can I build the python projects?

Thanks in advance!

Ok, I’ve solved it by setting up the dependencies.

I’ve added py_runtime(s) to build/BUILD file.

I’ve added the following lines in the WORKSPACE file

isaac_git_repository(
name = “com_google_absl”,
commit = “aa844899c937bde5d2b24f276b59997e5b668bde”, # this is the last release of abseil
licenses = [“@com_google_absl//:LICENSE”],
remote = “https://github.com/abseil/abseil-cpp.git”,
)

Changed lines 16-17 of .bazelrc file with the following content:
build --python_top=//build:python3
test --python_top=//build:python3
run --python_top=//build:python3

and line 21 with
test:lint --python_top=//build:python27

Everything is working ok now.

1 Like

it looks like the create_empty_workspace template files are significantly different than what are in the newest SDK. have you found a woking solution for the newest isaac sdk?

other_workspace.tar.gz (2.2 KB) a new workspace I had set up which references the 2020.1NX SDK directory if that helps you. As @diegodbjhv mentioned, you need to add Absl directly and use most of the .bazelrc files.