Skip to content

Instantly share code, notes, and snippets.

@agutenkunst
Last active September 5, 2022 07:48
Show Gist options
  • Save agutenkunst/4c1e762a876f35d32a990c066f00e6ab to your computer and use it in GitHub Desktop.
Save agutenkunst/4c1e762a876f35d32a990c066f00e6ab to your computer and use it in GitHub Desktop.
Use Sourcetrail with ROS

Use Sourcetrail with ROS

1. Build your workspace with the required cmake flag

Building your workspace with -DCMAKE_EXPORT_COMPILE_COMMANDS=ON which will create a file compile_commands.json in your build/<pkg> directory containing all compiler calls.

colcon build --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

2. Add the project to sourcetrail

See images below

Remarks

  • Only tested with colcon, should work with catkin, catkin_make as well.
  • Not tested for multiple packages in a workspace. Probably won't work.
@juliangaal
Copy link

Works with catkin_make as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment