Simple steps to achieve ROS development, much simpler than eclipse. Write it down, memo.
1. Install kdevelop
sudo apt-get install kdevelop
2. Install Cmake, etc.
sudo apt-get install automake autoconf g++ libtool cmake
3. Add to Desktop
cd ~/Desktop
touch Kdevelop.desktop
chmod +x Kdevelop.desktop
sudo vim Kdevelop.desktop
Added content:
[Desktop Entry]
Type=Application
Terminal=false
Exec=bash -i -c "kdevelop"
Name=kDevelop
Icon=kdevelop
Save and exit to see the Kdevelop shortcut on the desktop.
4. Add catkin project
- Find the existing catkin project directory and delete the existing build directory
rm -rf build
- Open the kdevelop menu bar project/open project to find the CMakeLists.txt file of the ros project that needs to be opened.
- Make sure that the build directory selection as shown in the figure below is the same level directory as src if it is not manually entered.
- Add compile parameters as shown below
-DCATKIN_DEVEL_PREFIX=../devel -DCMAKE_INSTALL_PREFIX=../install
Note: The .. before install is entered according to your own situation.
- The color scheme and basic settings can be modified according to personal preferences
. 4. build Compile and debug
After compiling, you can run the code and debug it.