Creating a New Node - ArcturusNavigation/all_seaing_vehicle GitHub Wiki
| Back: Tutorials |
|---|
To allow for cross-compatibility between Python and C++, we use the CMake build system, along with ament_cmake_auto magic functions to simplify the build process
Python
Follow this tutorial for a general overview on creating new Python nodes. There are some specific steps to take for all_seaing_vehicle due to using CMake instead of Python build:
- At the top of the file, add the line
#!/usr/bin/env python3 - Once the file has been created, run
chmod +x name_of_file.py. This is the missing step if you get apermission deniederror.
Don't forget to add your node to CMakeLists.txt and dependencies to package.xml. Follow the existing CMakeLists.txt; since we use ament_cmake_auto, we do not have to add all the dependencies in CMakeLists.txt.
C++
For C++, this tutorial includes all the necessary steps. Again, don't forget to add additional dependencies to package.xml and follow the existing CMakeLists.txt (for C++, all_seaing_perception is a good package to look at).