I'm in a weird situation that whenever I `catkin_make` at the root of my catkin workspace, `catkin_make` will build the code successfully, but the output from a modified cpp file by running `roslaunch` is not changing ...
for example:
(before)
```
void DoStateProve()
{
ROS_INFO("probe camera");
}
```
Then, I would run `roslaunch g6_ri.launch` and the output will show the following:
`[ INFO] [1527878630.076124857]: probe camera
`
Just to check how the code will respond to the changes, I modified the line into: (after)
```
void DoStateProve()
{
ROS_INFO("probe cameraaaaa");
}
```
(*** NOTE: this is the only line in the program that has the line '"probe camera" ***)
So then, I `catkin_make` to rebuild the program in order to get the changes. Here is the last portion of the output from `catkin_make`: (camera_commander_RI.cc is the file that I modified in)
`Scanning dependencies of target g6_camera_ri
[100%] Built target udp_input_generate_messages
[100%] Built target udp_input
[100%] Built target dji_sdk_web_groundstation_generate_messages
[100%] Built target ublox_gps
[100%] Building CXX object G6_camera/g6_camera_RI/CMakeFiles/g6_camera_ri.dir/src/camera_commander_RI.cc.o
[100%] Built target dji_sdk_web_client
[100%] Built target ublox_gps_node
[100%] Linking CXX shared library /home/conti/ecalROS/ros/kinetic/devel/lib/libg6_camera_ri.so
[100%] Built target g6_camera_ri
`
Although `catkin_make` indeeds built the code successfully, the output from running `roslaunch g6_ri.launch` is still the same as before:
`[ INFO] [1527878630.076124857]: probe camera `
I also tried `catkin_make` after removing the build and devel directory, and it still outputs the same result ....
I know that `catkin_make` is recompiling 'camera_commander_RI.cc' because whenever I purposely write in a error-produce line (such as `int v = "hello"`), `catkin_make` does recognize the error and will give an error message:
`error: invalid conversion from ‘const char*’ to ‘int’ [-fpermissive]
int v = "hello";`
So then, I would delete this error-produce line, and `catkin_make` will build successfully again.
What is confusing is that sometime I will randomly do something else such as closing the terminal or work on other project or `catkin_make` in a different project, and when I come back to the problem, the changes will suddenly happen! But then, when I tried to change it back to the original code, the output will stay as the modified string.
Has anyone dealt with this situation before? If you have any idea what is the cause of this problem or know a possible solution, feel free to share your thoughts!
It took me a while to word all of this together, so let me know if you need any clarification.
Thanks in advance!
↧