Circular Dependency - Matlab Simulink
Hi all,
I'm trying out the Matlab Simulink Robotics Systems Toolbox and I'm getting a circular dependency error when I try and build. All I'm doing is subscribing to a sensormsgs topic and then publishing the same message on a normal stdmsgs topic. Even when I try and build just this ROS node on it's own with no other I get the error below. What's interesting is if I change the subscribed topic to a std_msgs/float32 for example it builds fine.
CMake Error at /media/sf_ADS/build/catkin_generated/order_packages.cmake:7 (message):
Circular dependency in subset of packages:
rosbag, rostest, sensor_msgs, topic_tools
Call Stack (most recent call first):
/opt/ros/kinetic/share/catkin/cmake/catkin_workspace.cmake:42 (include)
CMakeLists.txt:63 (catkin_workspace)
-- Configuring incomplete, errors occurred!
See also "/media/sf_ADS/build/CMakeFiles/CMakeOutput.log".
See also "/media/sf_ADS/build/CMakeFiles/CMakeError.log".
Makefile:1032: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
This is the CMakeLists.txt - is it correct?
cmake_minimum_required(VERSION 2.8.3)
project(rostest)
set(CMAKE_VERBOSE_MAKEFILE ON)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp
sensor_msgs
std_msgs
)
add_definitions(
-DMODEL=ROSTest -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DONESTEPFCN=1 -DTERMFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -D__MW_TARGET_USE_HARDWARE_RESOURCES_H__ -DROS_PROJECT -DMW_SCHED_OTHER -DSTACK_SIZE=64 -DRT=RT )
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
CATKIN_DEPENDS roscpp sensor_msgs std_msgs
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
# include_directories(include)
include_directories(
include
${PROJECT_SOURCE_DIR}
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
## Get list of .c files in project source directory
file(GLOB ${PROJECT_NAME}_C_SOURCES RELATIVE ${PROJECT_SOURCE_DIR} ${PROJECT_SOURCE_DIR}/*.c)
## Declare executable
add_executable(rostest_node
ROSTest.cpp
ROSTest_data.cpp
ert_main.cpp
linuxinitialize.cpp
slros_busmsg_conversion.cpp
slros_initialize.cpp
slros_generic_param.cpp
${${PROJECT_NAME}_C_SOURCES}
)
## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
# add_dependencies(beginner_tutorials_node beginner_tutorials_generate_messages_cpp)
## Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}_node
${catkin_LIBRARIES}
${Boost_LIBRARIES}
rt
)
set_target_properties(${PROJECT_NAME}_node PROPERTIES COMPILE_FLAGS " ")
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive" )
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include stdbool.h" )
and this is the package.xml
<package>
<name>rostest</name>
<version>1.0.0</version>
<description>
This package is generated from ROSTest Simulink model.
</description>
<maintainer email="rosuser@test.com">ROS User</maintainer>
<license>BSD</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>std_msgs</build_depend>
<run_depend>roscpp</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>std_msgs</run_depend>
</package>
I don't understand enough about this yet and can't interpret the log/error file well enough.
Any help would be much appreciated!
Thanks guys
Asked by DRos on 2018-08-24 04:16:40 UTC
Comments