ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

beginner_tutorials/msg/Num.msg: Invalid declaration: int 64 num

asked 2016-02-07 19:14:32 -0500

Vivek gravatar image

updated 2022-01-22 16:16:31 -0500

Evgeny gravatar image

Whenever I open my terminal I get the following warning ROS_DISTRO was set to 'jade' before. Please make sure that the environment does not mix paths from different distributions.

Also when I run catkin-make I get the following error:

~/catkin_ws$ catkin_make
Base path: /home/vivek/catkin_ws
Source space: /home/vivek/catkin_ws/src
Build space: /home/vivek/catkin_ws/build
Devel space: /home/vivek/catkin_ws/devel
Install space: /home/vivek/catkin_ws/install
#### Running command: "make cmake_check_build_system" in "/home/vivek/catkin_ws/build"
-- Using CATKIN_DEVEL_PREFIX: /home/vivek/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/indigo
-- This workspace overlays: /opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/vivek/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.14
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
-- Using these message generators: gencpp;genlisp;genpy
/opt/ros/indigo/share/genmsg/cmake/pkg-genmsg.cmake.em:56: error: <class 'genmsg.base.InvalidMsgSpec'>: /home/vivek/catkin_ws/src/beginner_tutorials/msg/Num.msg: Invalid declaration: int 64 num
Traceback (most recent call last):
  File "/usr/bin/empy", line 3276, in <module>
    if __name__ == '__main__': main()
  File "/usr/bin/empy", line 3274, in main
  File "/usr/bin/empy", line 3257, in invoke
    interpreter.wrap(interpreter.file, (file, name))
  File "/usr/bin/empy", line 2262, in wrap
  File "/usr/bin/empy", line 2253, in wrap
  File "/usr/bin/empy", line 2326, in file, done, locals)
  File "/usr/bin/empy", line 2368, in safe
    self.parse(scanner, locals)
  File "/usr/bin/empy", line 2388, in parse, locals)
  File "/usr/bin/empy", line 1403, in run
    interpreter.execute(self.code, locals)
  File "/usr/bin/empy", line 2565, in execute
    exec(statements, self.globals)
  File "<string>", line 38, in <module>
  File "/opt/ros/indigo/lib/python2.7/dist-packages/genmsg/", line 45, in find_msg_dependencies_with_type
    spec = genmsg.msg_loader.load_msg_from_file(msg_context, msg_file, full_type_name)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/genmsg/", line 284, in load_msg_from_file
    raise InvalidMsgSpec('%s: %s'%(file_path, e))
genmsg.base.InvalidMsgSpec: /home/vivek/catkin_ws/src/beginner_tutorials/msg/Num.msg: Invalid declaration: int 64 num
CMake Error at /opt/ros/jade/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  "/usr/bin/python" "/usr/bin/empy" "--raw-errors" "-F"
  "/opt/ros/indigo/share/genmsg/cmake/pkg-genmsg.cmake.em") returned error
  code 1
Call Stack (most recent call first):
  /opt/ros/jade/share/catkin/cmake/em_expand.cmake:25 (safe_execute_process)
  /opt/ros/indigo/share/genmsg/cmake/genmsg-extras.cmake:300 (em_expand)
  beginner_tutorials/CMakeLists.txt:13 (generate_messages)

-- Configuring incomplete, errors occurred!
See also "/home/vivek/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/vivek/catkin_ws/build/CMakeFiles/CMakeError.log".
make ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-07 19:18:40 -0500

ahendrix gravatar image

The key error here is:

genmsg.base.InvalidMsgSpec: /home/vivek/catkin_ws/src/beginner_tutorials/msg/Num.msg: Invalid declaration: int 64 num

It looks like your message definition is incorrect.

There is no space in the int64 type. For Num.msg, try:

int64 num
edit flag offensive delete link more


Thank you!

Vivek gravatar image Vivek  ( 2016-02-07 19:58:31 -0500 )edit

Question Tools

1 follower


Asked: 2016-02-07 19:08:27 -0500

Seen: 2,339 times

Last updated: Jul 04 '16