galou / freecad.cross

CROSS CAD and ROS, an Open-Source Synergy; ROS workbench for FreeCAD
GNU Lesser General Public License v2.1
95 stars 26 forks source link

Tips for usinkg CROSS for custom build ros with --symlink-install #15

Closed sprhawk closed 7 months ago

sprhawk commented 8 months ago

I built ROS2 under debian bookworm with colcon build --symlink-install

All the ros packages are installed in separate directory hierarchy , and ros_workspace/install/setup.bash will set PYTHONPATH for every packages. But because FreeCAD will erase environment variable PYTHONPATH after startup, I provide here a solution for that:

FreeCAD  -P ${PYTHONPATH//:/' -P '}

BTW: the required libnglib on Debian Bookworm is installed under /usr/lib/x86_64-linux-gnu/netgen, which is not found by FreeCAD. So I need to add

export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/netgen:$LD_LIBRARY_PATH

to start FreeCAD + freecad.cross properly

drfenixion commented 8 months ago

Maybe you should add PR with TROUBLESHOOTING.md with short description of this case? @galou, what do you think?

galou commented 8 months ago

I added a remark in the README.md file, cf f400ae4. Thanks!

galou commented 8 months ago

What is the nglib library required for? Is it really required by CROSS because it's not installed on my system but CROSS obviously works?

galou commented 8 months ago

Maybe related to this?

sprhawk commented 8 months ago

Maybe related to this?

My Debian just install nglib under a netgen subdir which cannot be found by FreeCAD

galou commented 8 months ago

If this is required by ROS, then setup.bash should set $LD_LIBRARY_PATH correctly. Isn't it the case?

sprhawk commented 7 months ago

If this is required by ROS, then setup.bash should set $LD_LIBRARY_PATH correctly. Isn't it the case?

My bad. the netgen is required by FreeCAD, not ROS