Cannot generate custom msgs anymore, kinetic, 16.04

asked 2018-08-27 07:45:40 -0500

Markus gravatar image

updated 2018-08-29 08:41:42 -0500

Hey there, from today I cannot build anymore my custom msgs package. Anyone of you had such an error before:

catkin build ball_tracking_msgs

/bin/sh: 1: Syntax error: "(" unexpected
make[2]: *** [CMakeFiles/_ball_tracking_msgs_generate_messages_check_deps_BallState] Error 2
make[1]: *** [CMakeFiles/_ball_tracking_msgs_generate_messages_check_deps_BallState.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2

I had this error never before.... and on other machines my packages builds.... I installed blender today like this:

sudo apt-get update && sudo apt-get install python-software-properties
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:thomas-schiex/blender
sudo apt update && sudo apt install blender

Is the above blender installation responsible for my errors?

cmake_minimum_required(VERSION 2.8.3)
project(ball_tracking_msgs)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

find_package(catkin REQUIRED COMPONENTS roscpp actionlib_msgs actionlib message_generation std_msgs geometry_msgs)
## Generate messages in the 'msg' folder
add_message_files(
  FILES
  BallState.msg
)
## Generate added messages and services with any dependencies listed here
generate_messages(
  DEPENDENCIES
  actionlib_msgs
  std_msgs
  geometry_msgs
)

catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES turtlebot3_exercise_msgs
  CATKIN_DEPENDS roscpp actionlib_msgs actionlib message_runtime std_msgs geometry_msgs
#  DEPENDS system_lib
)

## Mark other files for installation (e.g. launch and bag files, etc.)
install(DIRECTORY msg
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
  FILES_MATCHING PATTERN "*.msg"
)

install(DIRECTORY action
  DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
  FILES_MATCHING PATTERN "*.action"
)

BallState.msg:

std_msgs/Header header
uint32 uid

geometry_msgs/Point position
geometry_msgs/Point velocity

float64 diameter  # real ball diameter   (true diameter)
float64 diameter_px # diameter in pixels (pixel domain) (for rgb), measured / detected diameter for depth

# Row-major representation of the 3x3 covariance matrix
# The orientation parameters use a fixed-axis representation.
# In order, the parameters are:
# (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
float64[6] covariance

# computed confidence value [0..1] representing the trust into the model
float64 confidence

VERBOSE=1 catkin_make -j1 gives:

/usr/bin/cmake -H"/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/src" -B"/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/build" --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start "/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/build/CMakeFiles" "/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/build/CMakeFiles/progress.marks"
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/build'
make -f ball_tracking_msgs/CMakeFiles/_ball_tracking_msgs_generate_messages_check_deps_MoveBaseFeedback.dir/build.make ball_tracking_msgs/CMakeFiles/_ball_tracking_msgs_generate_messages_check_deps_MoveBaseFeedback.dir/depend
make[2]: Entering directory '/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/build'
cd "/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/build" && /usr/bin/cmake -E cmake_depends "Unix Makefiles" "/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/src" "/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/src/ball_tracking_msgs" "/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/build" "/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/build/ball_tracking_msgs" "/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/build/ball_tracking_msgs/CMakeFiles/_ball_tracking_msgs_generate_messages_check_deps_MoveBaseFeedback.dir/DependInfo.cmake" --color=
Dependee "/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/build/ball_tracking_msgs/CMakeFiles/_ball_tracking_msgs_generate_messages_check_deps_MoveBaseFeedback.dir/DependInfo.cmake" is newer than depender "/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/build/ball_tracking_msgs/CMakeFiles/_ball_tracking_msgs_generate_messages_check_deps_MoveBaseFeedback.dir/depend.internal".
Dependee "/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/build/ball_tracking_msgs/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/markus/Documents/01_Studium/11_Semester_(Masterarbeit)/my_catkin_ws/build/ball_tracking_msgs ...
(more)
edit retag flag offensive close merge delete

Comments

Have you tried deleting your build and devel folders already (ie: catkin clean -y)? Does the same thing happen with catkin_make? And what is the contents of BallState.msg and your CMakeLists.txt?

gvdhoorn gravatar image gvdhoorn  ( 2018-08-27 08:06:22 -0500 )edit

yeah I did catkin clean -y see updates above.

Markus gravatar image Markus  ( 2018-08-27 08:38:10 -0500 )edit
1

I don't see anything obviously wrong.

Could you try on a clean install (ie: in a Docker container)? That way we could exclude local configuration being incorrect.

/bin/sh: 1: Syntax error: "(" unexpected

This suggests that some script either contains an error, the wrong interpreter ..

gvdhoorn gravatar image gvdhoorn  ( 2018-08-28 03:47:17 -0500 )edit
1

.. is being used or sh is being used for something which is not even a shell script.

Perhaps running the build in verbose mode can show the command line that is being executed at that point.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-28 03:48:22 -0500 )edit

I just reinstalled ros-kinetic.... but have still the same error. I cannot build any code with messages anymore and have no clue why..... -> is this a python issue?

Markus gravatar image Markus  ( 2018-08-29 08:03:05 -0500 )edit

Have you already tried with catkin_make like I suggested earlier?

And a verbose build I believe is with VERBOSE=1 catkin_make -j1.

And please copy-paste a bit more of the output, typically problems show up quite a bit earlier than the exact line the (last) msg is printed.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-29 08:14:14 -0500 )edit

Please clean your workspace before running the catkin_make command.

I just reinstalled ros-kinetic....

that is not a clean install btw. A clean install would be a clean ubuntu, but let's not do that. A docker container would be easier.

is this a python issue?

that could be.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-29 08:15:15 -0500 )edit

Ok i just did this the verbose catkin make see above. (of course i cleaned before), I never worked with docker is it significantly faster than using ros in a virtual box? Just tried a clean install in a virtual machine and all works fine.....

Markus gravatar image Markus  ( 2018-08-29 08:40:32 -0500 )edit