0
$\begingroup$

Rosanswers logo

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

Originally posted by jbrown on ROS Answers with karma: 101 on 2015-07-23

Post score: 0


Original comments

Comment by gvdhoorn on 2015-07-24:
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?

Comment by jbrown on 2015-07-24:
This is for ROS Indigo. I edited my question to include my CMakeLists.txt.

Comment by jbrown on 2015-07-30:
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.

Comment by jbrown on 2015-08-04:
This is on the Jetson TK1 board if anybody is interested.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by 130s with karma: 10937 on 2016-12-22

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.