Search code examples
matlabsimulinkrosbuildingsimulink-library

unreconized message type simulink ros message


I am trying to build a ROS controller using a custom message. I am able to run the model with no problem. Howeveer when I try to build and run the model it throws an error.

Top model targets built:

Model                Action  Rebuild Reason                                    
===============================================================================
sliding_controller2  Failed  Code generation information file does not exist.  

0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 26.061s
Unrecognized message type rbdl_server/RBDLInverseDynamics. Use rosmsg list to see available types.

when I run rosmsg list

I get the following

.
rbdl_server/RBDLInverseDynamicsRequest                         
rbdl_server/RBDLInverseDynamicsResponse
.

I am not sure what is happening. I think it has some thing to do with from the mathworks

Code Generation with Custom messages Custom message and service types can be used with ROS Simulink blocks for generating C++ code for a standalone ROS node. The generated code (.tgz archive) will include Simulink definitions for the custom messages, but it will not include the ROS custom message packages. When the generated code is built in the destination Linux System, it expects the custom message packages to be available in the catkin workspace or on the ROS_PACKAGE_PATH. Ensure that you either install or copy the custom message package to your Linux system before building the generated code.

Does anyone have any idea how to solve this problem?

I was able to get the messages definitions to appear when I run rossrv list and matlab sees them so I dont know what is going on.


Solution

  • The solution was rather complicated. I add to use a VM that had a copy of my catkin_ws then set my model to compile to the VM in the ROS tab.