Could not find the required component 'Float32' in ROS Service
I am trying to send float values from python client to C++ server using ros service call. I am getting this error message:
Could not find the required component 'Float32'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "Float32" with any
of the following names:
Float32Config.cmake
float32-config.cmake
Add the installation prefix of "Float32" to CMAKE_PREFIX_PATH or set
"Float32_DIR" to a directory containing one of the above files. If
"Float32" provides a separate development package or SDK, be sure it has
been installed.
Here is my CmakeList.txt:
cmake_minimum_required(VERSION 2.8.3)
project(pr2_package)
find_package(catkin REQUIRED COMPONENTS
moveit_core
moveit_ros_planning
moveit_ros_planning_interface
Float32
roscpp
rospy
std_msgs
message_generation
)
add_executable(pr2_package_1 src/gripper.cpp
)
target_link_libraries(pr2_package_1 ${catkin_LIBRARIES})
add_dependencies(pr2_package_1 ${PROJECT_NAME}_generate_messages_cpp)
## Generate messages in the 'msg' folder
add_message_files(
FILES
Pose.msg
)
## Generate services in the 'srv' folder
add_service_files(
FILES
PoseSend.srv
)
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
Float32
)
Here is my Pose.msg file:
Float32 data
Here is my srv file:
Float32 a
Float32 b
Float32 c
Float32 d
Float32 e
Float32 f
Float32 g
---
Are you expecting there to be a ROS package named
Float32
? Moreover, should that package produce aFloat32
message? Perhaps all of this is caused by the fact that you should be usingfloat32
in your message definition instead ofFloat32
.The actual error about "could not find find package" is because of the
Float32
line in yourfind_package
call.@jarvisschultz Ok, I will see if that works.