ERROR at drone.get_global_namespace()


I have an error when calling:

namespace = drone.get_global_namespace()

This is the error:

AttributeError: navigation instance has no attribute ‘get_global_namespace’

This is the complete code:

import time
from flyt_python import api
import rospy
from sensor_msgs.msg import Image
drone = api.navigation(timeout=120000)
namespace = drone.get_global_namespace()

P.S. I have latest installation of FlytStim and Ubuntu 16.04 (i did a fresh install a few days ago).


get_global_namespace API is not available in python. Because global namespace is not required to use any python APIs. That is a problem with documentation. Fixing it up.


Thank you for the prompt reply.
However, I want to subscribe to a topic and therefore I need to have the namespace.
I guess I will have to use:

import rospy
ns = rospy.get_namespace()



Currently, subscribing to a rostopic via flyt-python-binding is not available. So yes, either you have to write a rospy code, or you can try coding in flyt-cpp-binding as it supports subscriptions to rostopic. You can find how to subscribe to attitude data in our api documentation.


Thanks for the info!