rossrv list not listing custom services
I am trying to get my custom service to be listed. When I run rossrv list
I get the following output:
ambf_walker/DesiredJointsCmd
control_msgs/QueryCalibrationState
control_msgs/QueryTrajectoryState
control_toolbox/SetPidGains
controller_manager_msgs/ListControllerTypes
controller_manager_msgs/ListControllers
controller_manager_msgs/LoadController
controller_manager_msgs/ReloadControllerLibraries
controller_manager_msgs/SwitchController
controller_manager_msgs/UnloadController
diagnostic_msgs/AddDiagnostics
diagnostic_msgs/SelfTest
dvrk_ambf_extensions/ComputeIK
dynamic_reconfigure/Reconfigure
gazebo_msgs/ApplyBodyWrench
gazebo_msgs/ApplyJointEffort
gazebo_msgs/BodyRequest
gazebo_msgs/DeleteLight
gazebo_msgs/DeleteModel
gazebo_msgs/GetJointProperties
gazebo_msgs/GetLightProperties
gazebo_msgs/GetLinkProperties
gazebo_msgs/GetLinkState
gazebo_msgs/GetModelProperties
gazebo_msgs/GetModelState
gazebo_msgs/GetPhysicsProperties
gazebo_msgs/GetWorldProperties
gazebo_msgs/JointRequest
gazebo_msgs/SetJointProperties
gazebo_msgs/SetJointTrajectory
gazebo_msgs/SetLightProperties
gazebo_msgs/SetLinkProperties
gazebo_msgs/SetLinkState
gazebo_msgs/SetModelConfiguration
gazebo_msgs/SetModelState
gazebo_msgs/SetPhysicsProperties
gazebo_msgs/SpawnModel
laser_assembler/AssembleScans
laser_assembler/AssembleScans2
map_msgs/GetMapROI
map_msgs/GetPointMap
map_msgs/GetPointMapROI
map_msgs/ProjectedMapsInfo
map_msgs/SaveMap
map_msgs/SetMapProjections
nav_msgs/GetMap
nav_msgs/GetPlan
nav_msgs/LoadMap
nav_msgs/SetMap
nodelet/NodeletList
nodelet/NodeletLoad
nodelet/NodeletUnload
polled_camera/GetPolledImage
roscpp/Empty
roscpp/GetLoggers
roscpp/SetLoggerLevel
roscpp_tutorials/TwoInts
rospy_tutorials/AddTwoInts
rospy_tutorials/BadTwoInts
rviz/SendFilePath
sensor_msgs/SetCameraInfo
simple_test/MyTest
std_srvs/Empty
std_srvs/SetBool
std_srvs/Trigger
tf/FrameGraph
tf2_msgs/FrameGraph
topic_tools/DemuxAdd
topic_tools/DemuxDelete
topic_tools/DemuxList
topic_tools/DemuxSelect
topic_tools/MuxAdd
topic_tools/MuxDelete
topic_tools/MuxList
topic_tools/MuxSelect
turtlesim/Kill
turtlesim/SetPen
turtlesim/Spawn
turtlesim/TeleportAbsolute
turtlesim/TeleportRelative
This is my CMakeList for the package:
cmake_minimum_required(VERSION 2.8.3)
if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif (POLICY CMP0048)
project(rbdl_server)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package (Boost COMPONENTS program_options filesystem REQUIRED)
get_filename_component(PARENT_CMAKE ../cmake ABSOLUTE)
set (CMAKE_MODULE_PATH ${PARENT_CMAKE} )
# message(STATUS "foo include dir: " ${PARENT_CMAKE} )
FIND_PACKAGE (RBDL REQUIRED)
FIND_PACKAGE (Eigen3 3.0.0 REQUIRED)
FIND_PACKAGE (yaml-cpp REQUIRED)
#FIND_PACKAGE (RBDL REQUIRED)
#find_package(RBDL REQUIRED PATHS "/home/shreyas/rbdl/examples/simple/")
find_package(catkin REQUIRED COMPONENTS
roscpp
geometry_msgs
std_msgs
tf
message_generation
rbdl_model
)
add_service_files(
FILES
RBDLModel.srv
RBDLForwardDynamics.srv
RBDLInverseDynamics.srv
RBDLJacobian.srv
RBDLKinimatics.srv
RBDLInverseKinimatics.srv
RBDLBodyNames.srv
RBDLModelAlignment.srv
)
generate_messages(
DEPENDENCIES
std_msgs # Or other packages containing msgs
geometry_msgs
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES rbdl_server rbdl_model
CATKIN_DEPENDS std_msgs message_runtime roscpp
CATKIN_DEPENDS roscpp
# DEPENDS system_lib
DEPENDS Eigen
DEPENDS rbdl_model
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(${rbdl_model_INCLUDE_DIRS})
include_directories( include ${RBDL_MODEL_INCLUDE_DIRS} ${YAML_CPP_INCLUDE_DIR} ${EIGEN3_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} ${Eigen_INCLUDE_DIRS})
find_package (GLFW REQUIRED)
find_package (Boost COMPONENTS program_options filesystem REQUIRED)
include_directories (${GLFW_INCLUDE_DIRS})
FIND_PACKAGE (RBDL REQUIRED)
FIND_PACKAGE (Eigen3 3.0.0 REQUIRED)
include_directories(include ${RBDL_MODEL_INCLUDE_DIRS} ${Eigen_INCLUDE_DIRS} ${RBDL_INCLUDE_DIR})
include_directories(RBDL_MODEL_INCLUDE_DIRS)
set(RBDL_HRD_FILES
include/${PROJECT_NAME}/RBDLServer.h
)
set(RBDL_SRC_FILES
src/RBDLServer.cpp
)
## Declare a C++ library
add_library(${PROJECT_NAME} ${RBDL_SRC_FILES} ${RBDL_HRD_FILES})
add_dependencies(${PROJECT_NAME} ${catkin_EXPORTED_TARGETS})
## Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME} ${YAML_CPP_LIBRARIES} ${Eigen_LIBRARIES} ${RBDL_LIBRARY} ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${RBDL_MODEL_LIBRARIES} rbdl_model )
set (RBDL_SERVER_INCLUDE_DIRS include)
set (RBDL_SERVER_LIBRARIES rbdl_server)
set(SOURCE_FILES
src/rbdl_server_node.cpp)
add_executable (rbdl_server_node ${SOURCE_FILES})
target_link_libraries (rbdl_server_node ${PROJECT_NAME})
add_executable (rbdl_main src/main.cpp)
target_link_libraries (rbdl_main ${PROJECT_NAME})
install(
TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
)
install(
DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
I am not sure why I cannot see my custom service messages. I think that is causing other issues I am having with my simulink model ...
Have you checked your ROS_PACKAGE_PATH and have sourced the setup.bash? when you try to run a node from your package (using roslaunch or rosrun), does ROS system find your node? I usually check this when ROS doesn't find my package.
That is what is confusing me, when i use them in a node, it works but when I try to find them using
rossrv list
it does not find them. I think that this is causing an issue when I try to compile my Simulink controller