hello-robot / stretch_ros

ROS packages for the Stretch mobile manipulators from Hello Robot Inc.
https://docs.hello-robot.com/0.2/stretch-tutorials/ros1/
174 stars 86 forks source link

Compile cython code during catkin build stretch_funmap #76

Closed youliangtan closed 1 year ago

youliangtan commented 2 years ago

Environment

Issue

The stretch_funmap.cython_min_cost_path module is not available when building with the classic catkin_make approach. Other modules (e.g. manipulation_planning, mapping... ) are discoverable.

After looking into the stretch_funmap pkg, it seems that the cython_min_cost_path module is generated through compile_cython_code.sh. A recompilation of the ros pkg is needed after the cython compilation.

Solution

To simplify the pipeline, the cython code is compiled within the catkin_make process. This can be achieved by executing the cython compilation script within the CMakeLists. The success of this custom process is optional, and will not block the compilation process.

Also, PY_INCLUDE_PATH var is used as the python lib path since the python version might vary on a different setups.

hello-binit commented 2 years ago

Thanks @youliangtan, this is a good idea. I'll test it out next week and then merge it in.

hello-binit commented 1 year ago

Thanks @youliangtan, it's merged! The stretch_funmap python module should be available when the workspace has been catkin_make-ed.