Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile issue #1

Open
BrutusTT opened this issue Jun 10, 2018 · 2 comments
Open

compile issue #1

BrutusTT opened this issue Jun 10, 2018 · 2 comments

Comments

@BrutusTT
Copy link

Installing WCS in a fresh workspace gives the following error:

-- +++ processing catkin package: 'communication_node'
-- ==> add_subdirectory(WCS/communication_node)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Generating .msg files for action communication_node/Registration /home/ubuntu/catkin_ws/src/WCS/communication_node/action/Registration.action
CMake Error at /opt/ros/kinetic/share/genmsg/cmake/genmsg-extras.cmake:263 (message):
Messages depends on unknown pkg: sample_packages (Missing
'find_package(sample_packages)'?)
Call Stack (most recent call first):
WCS/communication_node/CMakeLists.txt:89 (generate_messages)

It seems to me that the communication_node depends on sample_packages, but adding it as a build dependency (package.xml) gives a circular dependency error. On the other side, removing the dependency in the CMakeList.txt of the communication_node gives compilation errors in the that package.

How do I break the cycle properly?

@MH-Bravo-Six
Copy link
Collaborator

The core functionality of WCS lies with communication_node and gazebo_information_plugins.
the sole purpose of sample_package is showing how to use APIs provided by communication_node and containing some sample codes,hence its name.Therefore, you don't really need sample_package to use WCS as long as you can use APIs according to the tutorial. Also, note that communication_node depends on sample_package because some message files in communication_node/msg depend on message files in sample_package/msg. One naive solution is to modify CMakeList.txt of communication_node so that it no longer compiles the message files that depend on sample_package. Be aware, with this solution you won't be able to use example scripts and codes in sample_package.

As of June 15th, I've updated WCS with some minor debugging. Now, sample_package no longer depends on communication_node. I compiled sample_package first, and then the whole WCS without any problem.

As a better and proper solution, I suggest you to clone WCS again and try to compile only the sample_package. After successful compilation of sample_package you can then try to compile the whole WCS.

@taherahmadi
Copy link
Owner

taherahmadi commented Jun 16, 2018

The circular dependency resolved, please check it again.

the main reason for putting a sample_package there is if you are going to send some custom data (something that is not already provided in communication_node package) between your robots, find out how to import your custom msg into communication_node.
in that order, you need to define your msg like sample_message.msg in sample_package/msg then create a new message in the communication_node package and similar to Data_sample.msg in communication_node/msg, put your message as an entry in that file.

  • in case of distance_service.h error just attemp to build again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants