Run unit tests for a C++ node on VectorCast

asked 2018-11-14 11:13:28 -0500

jotator gravatar image

updated 2018-11-16 07:57:15 -0500


I need to prepare the unit tests for a node I wrote with the C++ Client library. We use VectorCast for all our C/C++ UTs, but so far I have been unable to set up an environment for my node using this tool. I already posted a question on the VectorCast forum asking particular questions about their tool ( ), but I also have some concerns on the ROS part that are more suitable for this forum.

In particular, I have read a bit the ROS page regarding UTs ( ) and I am concerned that using VCast or any tool not recommended there might be too dificult or even impossible.

I am not very experienced in UTs yet, so I kindly ask for advice on how to proceed, even if it means exploring the possibility of setting up an alternative testing solution for this node (which would have to be discussed first with my colleagues and boss, so I want to have all the information I can).

EDIT: the OP was not very clear, so here's a more straightforward question. Is the UT procedure of a ROS node limited to the tools described in the documentation or is it possible to set it up in other environments like VectorCast?

Because the compilation of a ROS node is done through catkin and involves many dependencies, it seems that setting up a test environment in VectorCast (for example) is not as simple as configuring a compiler and including some folders.

Thank you very much, best regards!

edit retag flag offensive close merge delete


I'm not sure but I can't really find a question here. What is it specifically that is not working for you, or that you don't know how to do?

Without something actionable we cannot help you.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-14 11:45:54 -0500 )edit

Forgive the lack of clarity, I hope the edit is better. Thank you!

jotator gravatar image jotator  ( 2018-11-15 02:45:01 -0500 )edit

I've not used VectorCast, so without some more information on how it works (for example: how would you normally use it to create/run a test) I personally won't be able to help you.

Perhaps other forum members do have experience with it.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-16 04:21:47 -0500 )edit

Thanks for the response! The normal procedure is intuitive enough for more or less trivial builds (pick a compiler, add flags, choose include and src directories...), but ROS' build system seems way more complex than that (catkin, code generation, external dependencies). I'll keep investigating.

jotator gravatar image jotator  ( 2018-11-16 04:35:27 -0500 )edit

How would you normally work with CMake projects in VectorCast?

Catkin is "just" a convenience layer on-top of CMake. So if you can get CMake projects to work, Catkin should be possible as well.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-16 05:04:07 -0500 )edit

That's a good question because I don't know, but it does help me to narrow down the possibilities. I will point it out on the VectorCast forum and see where I can go from there. Thanks!

jotator gravatar image jotator  ( 2018-11-16 05:45:31 -0500 )edit

I already posted a question on the VectorCast forum asking particular questions about their tool

could you please post a link here to that post? Even if it isn't accessible publicly, people with access who come here after searching for the same thing could benefit from keeping things connected.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-16 06:15:58 -0500 )edit

You are right, I just edited the OP with the link.

jotator gravatar image jotator  ( 2018-11-16 07:57:40 -0500 )edit