Cannot load message class for .... Are your messages built?
I have seen the other topics about the similar error (like here http://answers.ros.org/question/10897... ), but they don't seem to fit to my problem.
I am using Ubuntu 12.04 and ROS Hydro.
I have a robotino_node which is publishing several things. They show up if I use rostopic list. i also can use rostopic type and rostopic info, here the robotino_node is listed as a publisher. But if I use rostopic hz or rostopic echo the error form the topic line shows up, eg
Cannot load message class for [robotino_msgs/PowerReadings]. Are your messages built?
rosmsg show does also work, eg
[robotino_msgs/PowerReadings]
time stamp
float current
float voltage
Now interestingly if I try rostopic echo with "bumper", which is the only std_msg published by the robotino_node it shows one time
data: False
---
but that's it.
I suspect that my cmake file for the messages is wrong, but I am not sure; it looks like this
# CATKIN_MIGRATION: removed during catkin migration
# cmake_minimum_required(VERSION 2.8.3)
project(robotino_msgs)
find_package(catkin REQUIRED COMPONENTS geometry_msgs std_msgs message_generation roscpp)
include_directories(include
${catkin_INCLUDE_DIRS}
)
add_message_files(
FILES
AnalogReadings.msg
BHAReadings.msg
DigitalReadings.msg
EncoderReadings.msg
GrapplerReadings.msg
GripperState.msg
MotorReadings.msg
NorthStarReadings.msg
PowerReadings.msg
SetBHAPressures.msg
SetBHAPressures.msg
SetGrapplerAxes.msg
SetGrapplerAxis.msg)
add_service_files(
FILES
ResetOdometry.srv
SetEncoderPosition.srv
SetGripperState.srv)
#add_dependencies(robotino_msgs geometry_msgs_generate_messages_cpp) #or yes?
#target_link_libraries(robotino_msgs ${catkin_LIBRARIES} ) # or yes
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES geometry_msgs std_msgs
)
# catkin_package parameters: http://ros.org/doc/groovy/api/catkin/html/dev_guide/generated_cmake_api.html#catkin-package
# TODO: fill in what other packages will need to use this package
catkin_package(
DEPENDS roscpp geometry_msgs std_msgs
CATKIN_DEPENDS # TODO
INCLUDE_DIRS # TODO include
LIBRARIES # TODO
)
My launch file looks like this
<launch>
<arg name="hostname" default="172.26.1.1" />
<node name="robotino_node" pkg="robotino_node" type="robotino_node" output="screen">
<param name="hostname" value="$(arg hostname)" />
<param name="max_linear_vel" value="0.5" />
<param name="min_linear_vel" value="0.05" />
<param name="max_angular_vel" value="3.0" />
<param name="min_angular_vel" value="0.1" />
<!-- <param name="downsample_kinect" value="true" />
<param name="leaf_size_kinect" value="0.04" /> entfernt da KinectNode nicht aktualisiert-->
<remap from="robotino_joint_states" to="joint_states" />
<!--remap from="image_raw" to="image"/-->
</node>
<!--
<node name="robotino_odometry_node" pkg="robotino_node" type="robotino_odometry_node" output="screen">
<param name="hostname" value="$(arg hostname)" />
</node>
-->
<!--
<node name="robotino_laserrangefinder_node" pkg="robotino_node" type="robotino_laserrangefinder_node" output="screen">
<param name="hostname" value="$(arg hostname)" />
<param name="laserRangeFinderNumber" value="0" />
</node>
-->
<!--
<node name="robotino_camera_node" pkg="robotino_node" type="robotino_camera_node" output="screen">
<param name="hostname" value="$(arg hostname)" />
<param name="cameraNumber" value="0" />
</node>
-->
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen">
<param name="publish_frequency" type="double" value="20.0" />
</node>
<!--
<node name="robotino_mapping_node" pkg="robotino_node" type="robotino_mapping_node" output="screen">
<param name="hostname" value="$(arg hostname)" />
</node>
-->
<!--node pkg="tf" type="static_transform_publisher" name="laser_link_broadcaster" args="0.12 0 0.025 0 0 0 base_link laser_link 50" /-->
<param name="robot_description" textfile="$(find robotino_description)/urdf/robotino.urdf" />
</launch>
So even if just the std_msgs work, shouldn't at least the bumper published with ...