dynamixel.cpp fails compilation when using distributed workspace

Attempting to compile the Kaya follow_me app with a “distributed workspace” as described in the documentation results in the following error:

external/com_nvidia_isaac/packages/dynamixel/gems/dynamixel.cpp:16:10: fatal error: external/robotis/c++/include/dynamixel_sdk/dynamixel_sdk.h: No such file or directory
 #include "external/robotis/c++/include/dynamixel_sdk/dynamixel_sdk.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Solution:

Since dynamixel.BUILD defines an ‘includes’ path to dynamixel_sdk:

includes = ["c++/include/dynamixel_sdk"]

we can change the #include in dynamixel.cpp to:

#include "dynamixel_sdk.h"

This allows follow_me to build successfully in a ‘distributed workspace’.

The file should not define an absolute path to the dynamixel_sdk.h file, correct?

Hi,

Would you please provide the version of Isaac SDK being used here and the exact command used for building the mentioned app?

https://docs.nvidia.com/isaac/isaac/doc/getting_started.html#using-a-distributed-workspace

Define SDK as external dependency in WORKSPACE:

local_repository(
    name = "com_nvidia_isaac",
    path = /path/to/sdk
)

Copy over the follow_me sample app, and modify the BUILD/json files to point to packages in the SDK. For example:

@com_nvidia_isaac//packages/map

Make sure to also modify the kaya subgraph json…

Once all references to packages are changed to @com_nvidia_isaac, try to build the app.

Version is 2019.3

#include “dynamixel_sdk.h”
is the way to go. This would be fixed in coming release.