Custom msg error quiz 6

Hi good afternoon. I´m getting this error and i don´t know how to fix it. I was looking at the forum if more people had the same problem and i tried the solutions that were posted but is not working.

`float64 side
int32 repetitions

bool succes`

CMAKELIST CODE

cmake_minimum_required(VERSION 3.0.2)
project(services_quiz)

find_package(catkin REQUIRED COMPONENTS
  std_msgs
  message_generation
)

add_service_files(
	FILES
   	BB8CustomServiceMessage.srv
   
)

generate_messages(
	DEPENDENCIES
   	std_msgs 
)

catkin_package(
	CATKIN_DEPENDS
	rospy
)

.XML Code(only the changed)

<buildtool_depend>catkin</buildtool_depend>
  <build_depend>rospy</build_depend>
  <build_depend>std_msgs</build_depend>
  <build_depend>message_generation</build_depend>
  <build_export_depend>rospy</build_export_depend>
  <exec_depend>rospy</exec_depend>
  <build_export_depend>std_msgs</build_export_depend>
  <exec_depend>std_msgs</exec_depend>
  <build_export_depend>message_runtime</build_export_depend>
  <exec_depend>message_runtime</exec_depend>

if you need also the python and launch files i can also provide the code.

Thanks in advance.

include_directories(
${catkin_INCLUDE_DIRS}
)

try this one on CMakeLists.txt

is there already, I don´t what can be.

it seems to me that you might need to add message_runtime to your catkin_package{}, and maybe std_msgs to the find_package{}.

Also, does it correctly build? Did you source? Does your custom service appear when you rossrv list?

yes I did it both build and source. Also the service appears in the list. But now I can´t check the other because the IDE code is bugged and i can´t acces to my files.

i got the solution. from <package.srv> import namemsg namemsgResponse and i was using nameResponse.

1 Like