Hello, I would like to create another executable file for the Exercise 1.1
I solved it by changing the subscription topic to cmd_vel and running all in the same way, but now I want to create another executable file named vel_listener.cpp
This is my CMake.txt file (I also added the geometry_msgs package)
vel_listener code:
I am getting this error
What am I doing wrong? Thank you
ralves
December 20, 2022, 12:15pm
2
Hi @ShikurM56 ,
the compiler is complaining that the display_vel function cannot be found. So the question is:
Is this function defined anywhere? Maybe in the test_library.h?
I see the “include” in line 3 is not correct. You have to include it in one of the two following ways:
#include "test_library/test_library.h"
or
#include "test_library.h"
I think the first option would work. What I know for sure is that we don’t include a header file passing its full path like you are doing now.
Please try to compile again after the changes and let us know how it goes.
Cheers,
Hello @ralves
It worked by adding to the library package the new .cpp of the vel_library
I also changed the include in line 3 as you mentioned, it worked in both ways.
Thank you
1 Like
system
Closed
December 25, 2022, 3:08pm
4
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.