Cannot load message class for [control/Velocity]. Are your messages built?
I have a node that subscribes to /joy topic, converts to /cmd_vel topic, and publishes to arduino via rosserial. I am receiving joy messages just fine, but when I
rosmsg show control/Velocity
(control is the name of the node, Velocity is the message), it says:
Unable to load msg [control/Velocity]: Cannot locate message [Velocity]: unknown package [control] on search path.
When I rostopic echo /cmd_vel, I get
Error: Cannot load message class for [control/Velocity]. Are your messages build?
I have tried many things. I believe that my environment variables are good, and I tried going into the root of my workspace, catkin_make clean, catkin_make, and source my devel/setup.sh file. Still, nothing seems to be working. My Velocity.msg file is in my CmakeLists.txt and the required build depends and run time depends are in my package.xml (build depend message_generation and run depend message_runtime). This is for ROS Indigo.
Any advice would be helpful. Thanks! CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3)
project(control)
find_package(catkin REQUIRED
dynamic_reconfigure
roscpp
message_generation
sensor_msgs
nav_msgs
sound_play
std_srvs
std_msgs
)
generate_dynamic_reconfigure_options(
cfg/Control_Params.cfg
)
add_message_files(
FILES
Velocity.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES control
CATKIN_DEPENDS dynamic_reconfigure message_runtime
DEPENDS system_lib
)
include_directories(
${catkin_INCLUDE_DIRS}
include
../common
)
add_executable(control src/control.cpp)
add_executable(stopService src/stopService.cpp)
add_dependencies(control control_gencpp control_gencfg)
add_dependencies(stopService stopService_gencpp stopService_gencfg)
target_link_libraries(control
${catkin_LIBRARIES}
)
target_link_libraries(stopService
${catkin_LIBRARIES}
)