I'm working in a team, which develops a c++ (ROS) project.
For some reason, we haven't a good git management.
We have several git branches. To compile the project, I have to
git clone the codes from each branch and rearrange the structure of directories.
mkdir -p /home/me/repo, then I
git clone the codes from each branch and put all of them into
Now I need to rearrange the structure, here is what I've done:
#!/bin/sh mkdir -p /home/me/project/src cd /home/me/project/src catkin_init_workspace # command of ROS to initialize a workspace cp -r /home/me/repo/robot_dev/control . cp -r /home/me/repo/robot_dev/control_algo . cp -r /home/me/repo/sim/third_party . cp -r /home/me/repo/planning . cp -r /home/me/repo/robot_dev/cognition/hdmap . cd .. catkin_make # command of ROS to compile the project
I created such a script to compile the project and it worked. As you can see, I simply copied and rearranged some directories and compiled.
Now I'm thinking that
cp -r is not a good idea because it took too much time. I want to use
ln -s to do the same thing. So I wrote another script as below:
#!/bin/sh mkdir -p /home/me/project2/src cd /home/me/project2/src catkin_init_workspace # command of ROS to initialize a workspace ln -s /home/me/repo/robot_dev/control control ln -s /home/me/repo/robot_dev/control_algo control_algo ln -s /home/me/repo/sim/third_party third_party ln -s /home/me/repo/planning planning ln -s /home/me/repo/robot_dev/cognition/hdmap hdmap cd .. catkin_make # command of ROS to compile the project
However, I got an error:
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake:297 (message): catkin_package() absolute include dir '/home/me/project2/src/hdmap/../third_party/ubuntu1604/opencv-3.3.1/include'
cd /home/me/project2/src/hdmap/../third_party/ubuntu1604/opencv-3.3.1/include, it does exist.
Is there some reasons why
cp -r can compile but
ln -s can't?