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

I have errors trying to catkinize MIDG II package

asked 2016-10-26 03:26:24 -0500

AbdRenawi gravatar image

updated 2017-04-25 03:13:31 -0500

gvdhoorn gravatar image

I am trying to catkinize a package I found on Github to run my "Microrobotics MIDG II INS/GPS" sensor on ROS. I used "catkinize" and follwed the instructions to edit my CMakeList and package files.

After finishing all steps I am getting this error messge and I couldn't find any help to fix it.

midgPacket.cpp:(.text+0xa15): undefined reference to `ros::console::setLogLocationLevel(ros::console::LogLocation*, ros::console::levels::Level)'
midgPacket.cpp:(.text+0xa1f): undefined reference to `ros::console::checkLogLocationEnabled(ros::console::LogLocation*)'
midgPacket.cpp:(.text+0xa6a): undefined reference to `ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, char const*, int, char const*, char const*, ...)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/renawi/catkin_ws/devel/lib/midg/Midg] Error 1
make[1]: *** [midg/CMakeFiles/Midg.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

My CMakeList file:

cmake_minimum_required(VERSION 2.8.3)
find_package(catkin REQUIRED COMPONENTS roscpp geometry_msgs std_msgs sensor_msgs message_generation)
include_directories(include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} ${GSTREAMER_INCLUDE_DIRS})

# Set the build type.  Options are:
#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
#  Debug          : w/ debug symbols, w/o optimization
#  Release        : w/o debug symbols, w/ optimization
#  RelWithDebInfo : w/ debug symbols, w/ optimization
#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

#set the default path for built executables to the "bin" directory
#set the default path for built libraries to the "lib" directory

#uncomment if you have defined messages
#uncomment if you have defined services
#  IMU.srv

#common commands for building c++ executables and libraries
#add_library(${PROJECT_NAME} src/Midg_II.cpp)
#target_link_libraries(${PROJECT_NAME} Midg)

#target_link_libraries(${midg}-test ${midg})
#add_executable(midg midg/midg.cpp)
#target_link_libraries(example ${PROJECT_NAME})


## Generate added messages and services with any dependencies listed here
generate_messages(DEPENDENCIES geometry_msgs std_msgs)

# catkin_package parameters: 

# TODO: fill in what other packages will need to use this package
catkin_package(CATKIN_DEPENDS geometry_msgs std_msgs message_runtime roscpp sensor_msgs)

#install(DIRECTORY include/${PROJECT_NAME}/
#  )

add_executable(Midg src/Midg_II.cpp src/drivers/midgPacket.cpp)
add_dependencies(Midg ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

There are many of the "undefined reference to..." messages showing up before the error message

Any help?

edit retag flag offensive close merge delete


Please use the Preformatted Text button (the one with 101010 on it) to format things like console text, contents of CMakeLists.txt, compiler errors and code snippets.

Please use the edit button/link (below your question) to fix the formatting.


gvdhoorn gravatar image gvdhoorn  ( 2016-10-26 06:00:49 -0500 )edit

Also: when posting CMakeLists.txt (thanks for that btw, always a good idea when posting compiler and/or linker errors), please remove all the boilerplate comments from them (lines starting with #).

gvdhoorn gravatar image gvdhoorn  ( 2016-10-26 06:01:35 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-04-23 02:33:55 -0500

AbdRenawi gravatar image

Solved, I created a new driver for MIDG II INS/GPS sensor that works on any platform that supports ROS. available at:

edit flag offensive delete link more

Question Tools


Asked: 2016-10-26 03:26:24 -0500

Seen: 235 times

Last updated: Apr 25 '17