ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Cannot load message class for []. Are your messages built?

asked 2015-07-23 15:54:36 -0500

jbrown gravatar image

updated 2015-07-24 08:30:45 -0500

gvdhoorn gravatar image

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).

Any advice would be helpful. Thanks!

Edit 1: 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}
)
edit retag flag offensive close merge delete

Comments

Please add (the relevant sections of) your CMakeLists.txt (remove any boilerplate comments first please). Without more info, we can only guess. Also: which version of ROS is this?

gvdhoorn gravatar image gvdhoorn  ( 2015-07-24 02:38:09 -0500 )edit

This is for ROS Indigo. I edited my question to include my CMakeLists.txt.

jbrown gravatar image jbrown  ( 2015-07-24 07:07:37 -0500 )edit

It looks to be an issue either with the code or the controller I am using. I am using a Moga Pro bluetooth controller. I set it up correctly.

jbrown gravatar image jbrown  ( 2015-07-30 16:59:37 -0500 )edit

This is on the Jetson TK1 board if anybody is interested.

jbrown gravatar image jbrown  ( 2015-08-04 16:06:48 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-12-22 13:23:15 -0500

130s gravatar image

updated 2019-09-20 07:49:23 -0500

Seems to me that http://wiki.ros.org/rosmsg#rosmsg_show is saying the syntax is package/messageType for rosmsg show. Your error message also says unknown package. So:

rosmsg show control/Velocity

(control is the name of the node, Velocity is the messageType),

Try specifying package name before the slash, instead of a node name.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2015-07-23 15:54:36 -0500

Seen: 4,543 times

Last updated: Sep 20 '19