RobotLocomotion / drake-iiwa-driver

BSD 3-Clause "New" or "Revised" License
24 stars 30 forks source link

Add More Detailed Instructions #34

Closed danielj195 closed 5 years ago

danielj195 commented 5 years ago

Hi,

We have several questions regarding how to build the C++ driver file.

  1. Is the Drake package required to build the driver? We are assuming that it is required because we are getting an error which says "cannot find drake package".
  2. If the Drake package is required, it is unclear where to install the package so that it can be found by the driver.
  3. Can you tell us any dependency issues that are absolutely required for this to work? E.g. Ubuntu version, cmake version, compiler version, etc
  4. Will it be easier to build using cmake or Bazel? It appears like most people here are using Bazel, but we are not too familiar with how this build software works

If you could provide some detailed step-by-step instructions on how to successfully install the C++ driver, we would greatly appreciate it.

Thanks, Dan

sammy-tri commented 5 years ago

I'm working on updating the documentation, particularly for cmake builds, which I haven't really done in a while.

I was able to build successfully by downloading the latest drake binary release from https://github.com/RobotLocomotion/drake/releases and setting -DCMAKE_PREFIX_PATH=<path-to-drake>/drake/lib/cmake (I also extracted and patched the FRI 1.11 source as described in the README.md. Newer versions of FRI seem to have some build issues, I'm looking into it).

Let me know if that's helpful for your environment. I'll leave this issue open until the docs are updated.

sammy-tri commented 5 years ago

Docs updated in #35. Let me know if that looks like it would be helpful.

danielj195 commented 5 years ago

somewhat helpful. I've been trying to build drake with bazel and was finding that it required something like 15 different dependencies, which I installed. It then told me that I was missing 2 input files, so I eventually gave up with drake, but have since learned that FRI is the only real-time control interface for kuka. Is the FRI SDK easy to work with from your experience? If so, I may try to write our own wrapper or something. Thank you

sammy-tri commented 5 years ago

If you're building drake on Ubuntu 18.04, did you run setup/ubuntu/install_prereqs.sh (from https://drake.mit.edu/ubuntu.html )? That should install everything needed to build, though it's rather a lot (I suspect well more than 15 dependencies). Drake has a StackOverflow tag, asking a question there may be a good way to work through build problems (from https://drake.mit.edu/getting_help.html#getting-help ).

This driver is based on FRI (it's basically an LCM<->FRI gateway), so writing your own C++ application directly using FRI isn't going to be a radically different experience than using the LCM interface here. It's not particularly painful to work with, but I find it helpful to not use FRI directly from a controller program, since the robot can get annoyed if you frequently start and stop FRI sessions (running something like drake-iiwa-driver keeps the FRI link established regardless of what the controller is doing).

danielj195 commented 5 years ago

Thank you for your help. Yes, I neglected to run that pre-setup command, which is why I was having issues with drake. I have drake successfully built and have also successfully built this package, but now I'm having issues just connecting to KONI port. I will post as separate issue.