More errors in Kaya build instructions

Now that I’ve finally got the hardware build done and working, I can turn to the errors in the software instructions.

Overall, the instructions in the top-level Isaac docs are correct and the versions in the Kaya docs need to be reconciled with that.

  1. In the Joystick Demo https://docs.nvidia.com/isaac/isaac/apps/tutorials/doc/assemble_kaya.html#the-joystick-application, the deploy instructions are wrong.

On the desktop side, the command should deploy to your own user, and should be as follows (if you don’t do this, it deploys to user “nvidia”):

sudo ./engine/build/deploy.sh --remote-user <username> -d jetpack42 -h <remote IP> -p //apps/kaya:joystick.pkg

On the Kaya side, it’s also wrong, since it deploys to . So the correct directory should be:

deploy/root/joystick-pkg/
  1. The instructions for the Dynamixel USB adapter https://docs.nvidia.com/isaac/isaac/apps/tutorials/doc/assemble_kaya.html#dynamixel-u2d2-usb2ax-interchangeability aren’t working. I’m using the U2D2 and have edited all four versions of Kaya to use ttyUSB0 as instructed, but the joystick demo still can’t see the port.

The Dynamixel adapter is indeed found on USB0

$ dmesg |grep tty
$ [ 1130.699256] usb 1-2.1: FTDI USB Serial Device converter now attached to ttyUSB0

And all four config.json files have this:

{
   "kaya_driver": {
      "isaac.KayaBaseDriver": {
         "usb_port": "/dev/ttyUSB0"
      }
   }
}

But I’m still getting this error in the Joystick demo (tried both sudo and not):

2019-05-12 15:25:38.129 DEBUG   engine/alice/backend/codelet_backend.cpp@61: Starting codelet 'kaya_driver/isaac.KayaBaseDriver' ...
[PortHandlerLinux::SetupPort] Error opening serial port!
2019-05-12 15:25:38.129 ERROR   packages/dynamixel/gems/dynamixel.cpp@53: Cannot open port

I made sure was added as a member of group but that didn’t solve it

Nvidia team, any suggestions on the last issue above, the problem with the U2D2 Dynamixel port?

Hope can get response from Nvidia soon.

Hi Chris, we are very excited that your Kaya is almost up and running!

  1. To give an example, say username on host PC is “my_host_username” and username on Nano is “my_nano_username”. Then, we would deploy using “–remote-user my_nano_username”. The script would sync to “deploy/my_host_username/” on Nano. Please note that “sudo” is not needed for deploy script. Thanks for the feedback on documentation. We’ll try to clarify this.

  2. Regarding “I made sure was added as a member of group but that didn’t solve it”:
    Are you logged in as ? Otherwise my_nano_username needs to be added to dialout. Did you restart after adding user to dialout? Does running the app with “sudo” command help? What does “ls /dev/ttyUSB0” return?

Csaglam: thanks for the reply. Quick answers:

  1. If you preface with sudo, I think it deploys to deploy/root/, not deploy//. When I didn’t preface with sudo, it gave errors, but I’ll do it again to make sure and post them here

  2. Yes, my username was added to group . Not sure if I rebooted, but can double-check

  3. Running with sudo did not solve it

  4. running dmesg |grep tty returns “usb 1-2.1: FTDI USB Serial Device converter now attached to ttyUSB0” I’ll check “ls /dev/ttyUSB0” returns anything different.

-c

We are looking forward to your updates and feedback.

ls command would just help us double check. Example output I’m getting on a Kaya:

nvidia@Kaya-20:~/deploy/oguz$ ll /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 May 13 16:26 /dev/ttyACM0

In dynamixel.cpp, could you try replacing
LOG_ERROR(“Cannot open port”);
with
LOG_ERROR(“Cannot open port to %s”, port_name.c_str());
please?

if you don’t preface the deployment on the desktop with , you get a huge amount of errors like this:

chris@chris-NUC7i5BNK:~/isaac$ ./engine/build/deploy.sh --remote-user chris -d jetpack42 -h 192.168.86.47 -p //apps/kaya:joystick-pkg
================================================================================
Building Minidump tools
================================================================================
================================================================================
Building //apps/kaya:joystick-pkg for target platform 'jetpack42'
================================================================================
ERROR: /home/chris/isaac/WORKSPACE:18:1: Traceback (most recent call last):
	File "/home/chris/isaac/WORKSPACE", line 18
		isaac_engine_workspace()
	File "/home/chris/isaac/third_party/engine.bzl", line 20, in isaac_engine_workspace
		isaac_new_http_archive(name = "gtest", build_file = clean..."), <5 more arguments>)
	File "/home/chris/isaac/engine/build/isaac.bzl", line 371, in isaac_new_http_archive
		native.new_http_archive(**kwargs)
type 'struct' has no method new_http_archive()

[and so on for many more pages]

But if you do it with it works:

chris@chris-NUC7i5BNK:~/isaac$ sudo ./engine/build/deploy.sh --remote-user chris -d jetpack42 -h 192.168.86.47 -p //apps/kaya:joystick-pkg
================================================================================
Building Minidump tools
================================================================================
================================================================================
Building //apps/kaya:joystick-pkg for target platform 'jetpack42'
================================================================================
INFO: Analysed target //apps/kaya:joystick-pkg (61 packages loaded, 2694 targets configured).
INFO: Found 1 target...
Target //apps/kaya:joystick-pkg up-to-date:
  bazel-bin/apps/kaya/joystick-pkg.tar
INFO: Elapsed time: 8.870s, Critical Path: 1.84s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
================================================================================
Deploying //apps/kaya:joystick-pkg (tar) to chris@192.168.86.47 under name 'root'
================================================================================
The authenticity of host '192.168.86.47 (192.168.86.47)' can't be established.
ECDSA key fingerprint is SHA256:mt3y0b7PMfE4v2SUPOtxOc9VOzcpZQh3DY6tspx9iCQ.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.86.47' (ECDSA) to the list of known hosts.
chris@192.168.86.47's password: 
sending incremental file list
joystick-pkg/
joystick-pkg/_solib_arm64-v8a/

When I ll I get this:
chris@chris-desktop:~/deploy/root$ ll /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 May 12 16:15 /dev/ttyUSB0

Where is dynamixel.cpp?

On the Kaya side, running the Joystick app with either or no works until the Serial Port part:

chris@chris-desktop:~/deploy/root/joystick-pkg$ ./apps/kaya/joystick
2019-05-15 07:16:45.912 WARNING engine/alice/backend/backend.cpp@141: This application does not have an explicit scheduler configuration. One will be autogenerated to the best of the systems abilities if possible.
2019-05-15 07:16:45.912 WARNING engine/gems/scheduler/scheduler.cpp@327: No default execution groups specified. Attempting to create scheduler configuration for 4 remaining cores. This may be non optimal for the system and application.
2019-05-15 07:16:45.912 INFO    engine/gems/scheduler/scheduler.cpp@280: Scheduler execution groups are:
2019-05-15 07:16:45.912 INFO    engine/gems/scheduler/scheduler.cpp@289: __BlockerGroup__: Cores = [3], Workers = No
2019-0

etc…

until it tries to open the serial port:

2019-05-15 07:17:08.477 DEBUG   engine/alice/backend/codelet_backend.cpp@61: Starting codelet 'kaya_driver/isaac.KayaBaseDriver' ...
[PortHandlerLinux::SetupPort] Error opening serial port!
2019-05-15 07:17:08.477 ERROR   packages/dynamixel/gems/dynamixel.cpp@53: Cannot open port
2019-05-15 07:17:08.477 DEBUG   engine/alice/backend/codelet_backend.cpp@73: Starting codelet 'kaya_driver/isaac.KayaBaseDriver' DONE
2019-05-15 07:17:08.477 DEBUG   engine/alice/backend/codelet_backend.cpp@291: Starting job for codelet 'kaya_driver/isaac.KayaBaseDriver'
2019-05-15 07:17:08.477 DEBUG   engine/alice/backend/node_backend.cpp@318: Starting node 'holonomic_joystick'
2019-05-15 07:17:08.477 PANIC   packages/dynamixel/gems/dynamixel.cpp@80: Servo doesn't support MOVING_SPEED
2019-05-15 07:17:08.477 DEBUG   engine/alice/backend/codelet_backend.cpp@61: Starting codelet 'holonomic_joystick/isaac.navigation.RobotRemoteControl' ...
2019-05-15 07:17:08.477 DEBUG   engine/alice/backend/codelet_backend.cpp@73: Starting codelet 'holonomic_joystick/isaac.navigation.RobotRemoteControl' DONE
2019-05-15 07:17:08.477 DEBUG   engine/alice/backend/codelet_backend.cpp@291: Starting job for codelet 'holonomic_joystick/isaac.navigation.RobotRemoteControl'
====================================================================================================
|                            Isaac application terminated unexpectedly                             |
====================================================================================================

even though that port is available and both user and user are members of the dialout group:

chris@chris-desktop:~/deploy/root/joystick-pkg$ ll /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 May 14 22:44 /dev/ttyUSB0

The location of the file and line number are printed with error message:
2019-05-15 07:17:08.477 ERROR packages/dynamixel/gems/dynamixel.cpp@53: Cannot open port

You seem to be doing everything right. All I can think of is double checking stuff. By printing port name, we would double check “usb_port” parameter indeed gets set to “/dev/ttyUSB0”.

Have you assigned IDs 1, 2, 3 to your motors?

Could you double check “8 Connect Motor Wiring” from https://docs.nvidia.com/isaac/isaac/apps/tutorials/doc/assemble_kaya.html please?

@chris5pb1j
Wonder the version of Isaac SDK you are using.
And would you like to double check the version of bazel you are using, and if all dependencies are installed via engine/build/scripts/install_dependencies.sh.

Isaac SDK 2019.1
Bazel 0.25.1

@chris5pb1j
Thanks for the information!
At the moment Isaac SDK is recommending bazel v0.19.2. Later Bazel versions introduced breaking changes.

Yes, already done on both counts

Ah. That may be the problem. I’ll try downgrading later today.

Out of curiosity, why can’t the correct Bazel just be installed as part of the dependency installation process? It seems weird to have to install that one part manually

@chris5pb1j
Actually install_dependencies.sh would try to install bazel v0.19.2. Curious if that would succeed on your workstation.

Hey Chris,

Thanks for helping us debug this issue!

It would be helpful to know why the Isaac SDK can’t open /dev/ttyUSB0. Would you mind changing
packages/dynamixel/gems/dynamixel.cpp, line 53 from

LOG_ERROR("Cannot open port");

to

LOG_ERROR("Cannot open port %s, errno %d", port_name.c_str(), errno);

Thanks!

I’ve uninstalled Bazel and let the dependency script reinstall the right version. But when I try to deploy to the Jetson device (Kaya), I still get many screens of errors that all point to the same issue:

C++ compilation of rule '@lmdb//:lmdb' failed (Exit 1) crosstool_wrapper_driver_is_not_gcc.py

Furthermore, there is no dynamixel folder in the packages folder(and thus no packages/dynamixel/gems/dynamixel.cpp):

chris@chris-desktop:~/isaac/packages$ ls
audio           dummies  hgmm  kaya_base    map  navigation  perception  pwm        segway   sight         utils     viewers  zed
communications  flatsim  imu   kinova_jaco  ml   pan_tilt    planner     realsense  sensors  stereo_depth  velodyne  yolo