MATLAB Answers

Matlab error on Ros custom message

11 views (last 30 days)
Hi,
I know this has been asked before, but I have tried to follow all the suggestions without any error free result.
I am using 'rosgenmsg' with this 'package.xml' file:
<?xml version="1.0"?>
-<package>
<name>qualisys</name>
<version>0.0.1</version>
<description>Convert msg of Qualisys to ROS compatible format</description>
<maintainer email="kartikmohta@gmail.com">Kartik Mohta</maintainer>
<maintainer email="sunke.polyu@gmail.com">Ke Sun</maintainer>
<maintainer email="quchao@seas.upenn.edu">Chao Qu</maintainer>
<license>Apache-2.0</license>
<author>Kartik Mohta</author>
<url type="repository">https://github.com/kartikmohta/qualisys</url>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>message_generation</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>std_srvs</build_depend>
<buils_depend>geometry_msgs</buils_depend>
<exec_depend>message_runtime</exec_depend>
<depend>std_msgs</depend>
<depend>std_srvs</depend>
<depend>geometry_msgs</depend>
<depend>roscpp</depend>
<depend>tf</depend>
<export> </export>
</package
_________________________
And getting the following result:
>> rosgenmsg('C:\Users\twa\Documents\Packages')
Checking subfolder "qualisys" for custom messages.
Building custom message files for the following packages:
qualisys
:rosjava_messages is spawning subprojects: [qualisys]
Creating properties on demand (a.k.a. dynamic properties) has been deprecated and is scheduled to be removed in Gradle 2.0. Please read http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html for information on the replacement for dynamic properties.
Deprecated dynamic property: "mavenRepository" on "org.ros.gradle_plugins.RosPluginExtension_Decorated@21a66d45", value: "null".
:qualisys:bugfixtask
:qualisys:generateSources
:qualisys:compileJavawarning: [options] bootstrap class path not set in conjunction with -source 1.6
C:\Users\twa\Documents\Packages\matlab_gen\build\rosjava_build\qualisys\build\generated-src\qualisys\Marker.java:12: error: package geometry_msgs does not exist
geometry_msgs.Point getPosition();
^
C:\Users\twa\Documents\Packages\matlab_gen\build\rosjava_build\qualisys\build\generated-src\qualisys\Marker.java:13: error: package geometry_msgs does not exist
void setPosition(geometry_msgs.Point value);
^
C:\Users\twa\Documents\Packages\matlab_gen\build\rosjava_build\qualisys\build\generated-src\qualisys\SetPoseRequest.java:10: error: package geometry_msgs does not exist
geometry_msgs.Pose getPose();
^
C:\Users\twa\Documents\Packages\matlab_gen\build\rosjava_build\qualisys\build\generated-src\qualisys\SetPoseRequest.java:11: error: package geometry_msgs does not exist
void setPose(geometry_msgs.Pose value);
^
C:\Users\twa\Documents\Packages\matlab_gen\build\rosjava_build\qualisys\build\generated-src\qualisys\Subject.java:14: error: package geometry_msgs does not exist
geometry_msgs.Point getPosition();
^
C:\Users\twa\Documents\Packages\matlab_gen\build\rosjava_build\qualisys\build\generated-src\qualisys\Subject.java:15: error: package geometry_msgs does not exist
void setPosition(geometry_msgs.Point value);
^
C:\Users\twa\Documents\Packages\matlab_gen\build\rosjava_build\qualisys\build\generated-src\qualisys\Subject.java:16: error: package geometry_msgs does not exist
geometry_msgs.Quaternion getOrientation();
^
C:\Users\twa\Documents\Packages\matlab_gen\build\rosjava_build\qualisys\build\generated-src\qualisys\Subject.java:17: error: package geometry_msgs does not exist
void setOrientation(geometry_msgs.Quaternion value);
^
8 errors
1 warning
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':qualisys:compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 4.307 secs
An error occurred while building custom messages. See the full error message above.
Possible reasons for the error:
1. The msg or srv files may have syntax errors.
2. The dependencies on other message packages may not be declared correctly in the build_depends tags in the package.xml.
3. Messages packages declared as dependencies may not be available.
4. The custom message packages may be missing a build dependency on "message_generation".
See the ROS Custom Messages documentation for more information.
___________________________
What can bee the problem? What I'm doing wrong?
Regards
Torgeir Wahl, NTNU

  0 Comments

Sign in to comment.

Accepted Answer

Cam Salzberger
Cam Salzberger on 22 Apr 2020
Hello Torgeir,
I believe that you simply have a typo or two that is preventing the custom message generator from finding the required dependencies. The main one is that "buils_depend" should be "build_depend"
<buils_depend>geometry_msgs</buils_depend>
You also have a dash in front of the package tag:
-<package>
Not sure if that matters, but it looked odd.
Also note that only format 1 for the package definition is accepted for now, which has "build_depend" and "run_depend" but no "depend" tags. See here and here for similar questions, and here for an explanation of what changed in format 2.
-Cam

  1 Comment

Torgeir Wahl
Torgeir Wahl on 23 Apr 2020
Thank you, for your typo check, lol. I thought there where some syntax check, so I didn't bother to check.
Regards
Torgeir

Sign in to comment.

More Answers (0)