Trying to load a library of functions from a ROS package's init.pl file, json_prolog gives the error:
ERROR: /home/path/my_package/prolog/init.pl:19:
source_sink `library(my_lib)' does not exist
Warning: /home/path/my_package/prolog/init.pl:19:
Goal (directive) failed: user:use_module(library(my_lib))
The init.pl file uses the code
:- use_module(library('my_lib')).
to load a file 'my_lib.pl' located in the same directory as init.pl.
When starting the package using rosrun rosprolog rosprolog my_package
the module gets compiled and loaded fine.
I suspect the problem is that JSONPrologNode.java uses ensure_loaded('/home/path/my_package/prolog/init.pl')
instead of register_ros_package(my_package)
which is what rosprolog uses.
Originally posted by zsaigol on ROS Answers with karma: 225 on 2013-08-22
Post score: 0