RobotLocomotion / robot-plan-runner

10 stars 4 forks source link

Enable building custom LCM types #20

Closed mpetersen94 closed 3 years ago

mpetersen94 commented 3 years ago

This starts putting together the piping to build our own lcmtypes. I have not yet created the lcmtypes we've talked about and am still working on getting the built lcmtypes imported elsewhere in our code.

Also I renamed robot_plan_runner to robot-plan-runner to match the repo name.

Closes #15


This change is Reviewable

hjsuh94 commented 3 years ago

One question about building our own lcm types - does this also build the python lcm bindings for us so that we can use the type in our client?

Perhaps we could include some example code in this PR to confirm that the built types are working correctly?

mpetersen94 commented 3 years ago

It does build the python types as well. If you do the usual cmake/make -j process and look under build/lcmtypes/robot-plan-runner you should see both the c++ and python lcmtypes. I have not yet been able to get examples working. For python, I'm pretty sure I just need it on the python path but for C++ I can't figure out the cmake. And advice would be helpful. Can push up what I've tried if that helps.

mpetersen94 commented 3 years ago

@pangtao22 Here is the PR I was talking about. It currently builds the lcm messages in the lcmtypes using cmake (placed in build/lcmtypes/robot_plan_runner. If you put build\lcmtypes on the PYTHON_PATH, the lcmtypes can be found and used just fine (see example). However, I can't figure out how to get a C++ example to build with the custom LCM types. If you could take a look that would be great. I took a stab in the sandbox file.

pangtao22 commented 3 years ago

@mpetersen94 I came up with an ugly solution that installs the lcm-types locally and makes the CI happy for now. I think eventually we'll want our lcm types to be a standalone package, similar to how drake deals with its lcm types.

mpetersen94 commented 3 years ago

Finally passes CI. Merging.