Page 1 of 1

RosInterface custom message

Posted: 02 Dec 2016, 12:53
by tmalheiro
Dear coppelia,

I am trying to add a custom message to vrep RosInterface (Ackermann_msgs), but I am encountering a issue. using ubuntu16.04, VREP 3.3.2 and Ros Kinetic.
I was able to clone GitHub RosInterface and compile it.
Editing meta/messages.txt, I have appended the message type ackermann_msgs/AckermannDrive.
Installing ackermann_msgs from ros repo (sudo apt-get install ros-kinetic-ackermann-msgs ), it builds with no problem.
Nevertheless, by cloning ackermann_msgs into catkin tools workspace, compilation fails due to missing ackermann header files:

Errors << vrep_ros_interface:make /home/tug/ws/logs/vrep_ros_interface/build.make.001.log
In file included from /home/tug/ws/src/vrep_ros_interface/include/vrep_ros_interface.h:80:0,
from /home/tug/ws/src/vrep_ros_interface/src/vrep_ros_interface.cpp:1:
/home/tug/ws/build/vrep_ros_interface/generated/ros_msg_io.h:7:43: fatal error: ackermann_msgs/AckermannDrive.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/v_repExtRosInterface.dir/src/vrep_ros_interface.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/tug/ws/build/vrep_ros_interface/generated/ros_msg_io.cpp:1:0:
/home/tug/ws/build/vrep_ros_interface/generated/ros_msg_io.h:7:43: fatal error: ackermann_msgs/AckermannDrive.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/v_repExtRosInterface.dir/generated/ros_msg_io.cpp.o] Error 1
make[1]: *** [CMakeFiles/v_repExtRosInterface.dir/all] Error 2
make: *** [all] Error 2
cd /home/tug/ws/build/vrep_ros_interface; catkin build --get-env vrep_ros_interface | catkin env -si /usr/bin/make --jobserver-fds=6,7 -j; cd -

Changing CMakelist and including ackermann_msgs in find_package(), compilation is successful.
Is this the expected behavior?

thanks,
Best,
Tiago

Re: RosInterface custom message

Posted: 03 Dec 2016, 12:11
by fferri
Yes, you have to add the msg package as a dependency of vrep_ros_interface as well.

Re: RosInterface custom message

Posted: 07 Dec 2016, 11:53
by tmalheiro
ok, thanks!

I was wondering why, but with your information and trying to understand it, I can understand why such difference.
Thank you!
btw, excellent plugin!
Best,
Tiago