Ros package run my code with problem : resource not found : core_api


i am wrote a python code and i use flyt_python api on my code
the i create a ros package to run the python code
but all the module work well except api.navigation()
when i call it show me the bellow problem:ResourceNotFound: core_api

import api successed
[pyros_ros] Proc started as [17200]
<pyzmp.service.Service object at 0x8eac8570> MSGBUILDSVC
[INFO] [1557488253.829469]: RosInterface pyros_ros node started with args : []
[INFO] [1557488253.846592]: [pyros.rosinterface.ros_interface] ROS Interface initialized with:
- services :
- /get_global_namespace
- /./navigation/arm
- /.
- /./navigation/land
- /.
- /./navigation/position_hold
- /.
- /./navigation/position_set_global
- /.
- /./navigation/exec_script
- /.
- /./navigation/waypoint_set
- /.
- /./navigation/waypoint_clear
- /.
- /./navigation/waypoint_set_current
- /.
- /./navigation/rtl
- /.
- /./param/param_set
- /.
- /./param/param_get
- /.
- /./param/param_load
- /.
- /./param/param_delete
- /.
- topics :
- /./mavros/state
- /.
- /./mavros/imu/data_euler
- /.
- /./mavros/global_position/global
- /.
- /./mavros/vfr_hud
- /.
- /./mavros/distance_sensor/lidarlite_pub
- /.
- /.*/mavros/payload_adc
- params : []
- enable_cache : False
Process pyros_ros:
Traceback (most recent call last):
File “/usr/lib/python2.7/multiprocessing/”, line 258, in _bootstrap
File “/usr/lib/python2.7/multiprocessing/”, line 114, in run
self._target(*self._args, **self._kwargs)
File “/flyt/flytos/flytcore/lib/python2.7/dist-packages/pyros/”, line 165, in run
File “/usr/local/lib/python2.7/dist-packages/pyzmp/”, line 455, in run
exitstatus = self.eventloop(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/pyzmp/”, line 418, in eventloop
status = self._target(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/pyzmp/”, line 250, in receive_reply
self._loop_target(*args, **kwargs)
File “/flyt/flytos/flytcore/lib/python2.7/dist-packages/pyros/”, line 210, in update
File “/flyt/flytos/flytcore/lib/python2.7/dist-packages/pyros/rosinterface/”, line 659, in update
File “/flyt/flytos/flytcore/lib/python2.7/dist-packages/pyros/baseinterface/”, line 511, in update
File “/flyt/flytos/flytcore/lib/python2.7/dist-packages/pyros/baseinterface/”, line 215, in _transient_change_detect
File “/flyt/flytos/flytcore/lib/python2.7/dist-packages/pyros/baseinterface/”, line 246, in _transient_change_diff
File “/flyt/flytos/flytcore/lib/python2.7/dist-packages/pyros/baseinterface/”, line 132, in _update_transients
File “/flyt/flytos/flytcore/lib/python2.7/dist-packages/pyros/baseinterface/”, line 123, in _update_transients
File “/flyt/flytos/flytcore/lib/python2.7/dist-packages/pyros/rosinterface/”, line 152, in ServiceMaker
File “/flyt/flytos/flytcore/lib/python2.7/dist-packages/pyros/rosinterface/”, line 50, in init
File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslib/”, line 62, in load_manifest
sys.path = _generate_python_path(package_name, _rospack) + sys.path
File “/opt/ros/kinetic/lib/python2.7/dist-packages/roslib/”, line 93, in _generate_python_path
m = rospack.get_manifest(pkg)
File “/usr/lib/python2.7/dist-packages/rospkg/”, line 167, in get_manifest
return self._load_manifest(name)
File “/usr/lib/python2.7/dist-packages/rospkg/”, line 211, in _load_manifest
retval = self._manifests[name] = parse_manifest_file(self.get_path(name), self._manifest_name, rospack=self)
File “/usr/lib/python2.7/dist-packages/rospkg/”, line 203, in get_path
raise ResourceNotFound(name, ros_paths=self._ros_paths)
> ResourceNotFound: core_api
> ROS path [0]=/opt/ros/kinetic/share/ros
> ROS path [1]=/home/odroid/catkin_ws/src
> ROS path [2]=/opt/ros/kinetic/share


can anyone help me please?


It is a sourcing issue.
You have sourced a catkin workspace placed at ’ /home/odroid/catkin_ws/src’ in your /home/odroid/.bashrc file.

Please remove the above line and any line pertaining to ROS from .bashrc file
Open a new terminal, FlytOS and its APIs will work just fine.

To use your workspace,

  • open a new terminal, and go to your workspace
  • clean up the build and devel folder of workspace
  • compile it again.
  • add this line: source /home/odroid/catkin_ws/devel/setup.bash in .bashrc file

thanks for your answer
but in my /home/odroid/.bashrc does not have any line to point to ros.
my FlytOS and all API work well out of the ros package and i run the python file and API properly.
but when i use ros package i am faced with core_api problem.
i did your solution but it doesnt work.
i cleaned up the build and devel folders and i compiled it again and i added the source /home/odroid/catkin_ws/devel/setup.bash to .bashrc and sourced it again. However, the problem has still remained.
my package name is auto and my launch file is auto_drone.launch. and i run it by

roslaunch auto auto_drone.launch

in my launch file i wrote these lines:

<node name="drone_auto_final" pkg="auto" type="" output="screen" />

all the codes and modules was compiled and executed properly but when i run this line below

from flyt_python import api

the problem happen.
Thanks for your attention in advance. I was wondering to reply.


my problem is solved.
very thanks for your answer.
i added some sources to my code and its my mistake.