0
$\begingroup$

Rosanswers logo

Hi everyone,
what do I have to do to add custom message types for use with rosmatlab by TU Darmstadt?

I tried to add a new directory called msg in workspace/src/rosmatlab/rosmatlab and placed a file called Num.msg inside of it. But examining the appropriate CMakeLists.txt file, I noticed all message being included with the function add_mex_messages followed by the message name in paranthesis.

So does anybody know how to solve this?

[Edit 2014-03-12]
Okay I now created a new package outside of the rosmatlab workspace and defined a new message type there. Then I compiled it to make it accessible by the ROS system itself. Then I added a add_mex_messages() statement to the CMakeLists.txt in the rosmatlab workspace and a <build_depend /> tag in the package.xml to refer to that package containing the new message type. When I compiled the rosmatlab workspace with these settings everything went well, until cmake claimed a non-existent header file referred to by the C-MEX file of my message type. In fact the header file doesn't exist at all and I'm wondering why it hasn't been generated by rosmatlab or whatever if everything else has been generated. I'm sorry, if it is obvious to all of you, but it is neither documented nor obvious to me, so if anyone has anything to say about this topic, please let me know! Thanks in advance.

Greets,
Roberto


Originally posted by bnm-rc on ROS Answers with karma: 22 on 2014-03-10

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The problem was that when compiling the workspace, cmake first tried to build all mex-files. Also the mex files for the message types. Unfortunately, the message at that point wasn't compiled for ROS, thus not usable for the cpp_introspection routine.
Compiling a custom message type from another package accessible by ROS seemed to be a problem because of the paths. I didn't go too far into that.
All in all, I succeeded building my message type by first compiling the workspace without adding the add_mex_messages() statement for the message type be compiled in ROS and afterwards recompiling the workspace with the add_mex_messages() statement added.
Now everything works fine. One should change the order of building, but I am not very familiar with that.


Originally posted by bnm-rc with karma: 22 on 2014-03-12

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.