I’m working on Part III of rosproj of the course, and i was asked to create a new action msg first. I’ve already successfully created my service msg in the previous part, and here i’m attempting to create the action msg in the same pkg, and modify my Cmake.txt&pkg.xml file.
However, the result of build_make showed error occurs, and it seems there’s something wrong in line23 of my CMake file.
I tried to modify, but the error persists. Appreciate for any help!
Hi, have you tried rebuilding your whole catkin_ws ? I mean: deleting /build and /devel, then doing a catkin_build in ~/catkin_ws.
Otherwise, if it happens in line 23, check you are not missing any brackets before in your FILES declaration as well. I’ll keep thinking about something in the meantime.
I hope it will help.
Could you send the code of rebuilding the whole catkin_ws?
And in which directory should I implement this cmd.
rm -rf devel/
rm -rf build/
If it persists, check in your folder where you are currently working that you do not have a double of your CMake.
Another question : did you operated any file/folder movement ? Like copy-cutting from one place to another ?
my pkg failed again, and it’s the same error
I think there isn’t a double file,and i didn’t operate any file before.
Maybe i’ll try to create my action msg in another pkg…
Error persists, no idea why it only occurs to pkg with newly-created action msg.
To what refers your “actionlib_msgs” ? Did you create a specific package for your message somewhere else ?
Because I do not see any folder with this name in your file tree. Are you trying to importe your homemade msg ?
Did you make sure you have completed properly this part in your CMake :
“your_message”.srv (or .msg)
Shown below is my CMkaelist.txt & action msg file.
Ok, I hope that’s it: check your “generate_messages” part, you added rospy there, however, it should not be there because rospy is not a message generator unlike std_msgs for example.
It is probably not exactly explained properly. However, if someone can explain in more detail, it would be great.
So try to remove it and rebuild your workspace
I do not know if that is positive or not, but that is definitly a changement haha
Also in “find_package”, remove rospy and retry. I think it is because rospy is still declared in this scope, so then it tries to find it in generate_messages as well (my guess)
emm, same error: cannot locate message [Point]
Does your action message only depends of std_msgs ?
Because if you also retrieve data from the Odometry, it might await from you to specify the “nav_msgs.msg” in “generate_messages”
it works if i change my action msg type.
But the msg’s simply pasted from the question, as u ca see in the notebook in left screen,i don’t understand why it doesn’t work, or is Point a correct type
Because float32 is a msg type from std_msgs.msg if I am not mistaken.
Try to declare “nav_msgs.msg” in the scope of generate_message.
Your custom action depends of 2 types of message, thus I think the compiler expects you to declare it as well.
Hi, it finally succeeds!!
i add nav_msgs in both generate_message and find_package. Also, i changed Point to geometry_msgs/Point32.
Truly appreciate your help, thanks a million!
That’s great to read !
You are welcome It was a bit tedious haha