private void construct(string ns, bool validate_name)
        {
            if (started_by_visual_studio)
            {
                return;
            }
            if (!ROS.initialized)
            {
                throw new Exception("You must call ROS.Init before instantiating the first nodehandle");
            }
            collection          = new NodeHandleBackingCollection();
            UnresolvedNamespace = ns;
            Namespace           = validate_name ? resolveName(ns) : resolveName(ns, true, true);

            ok = true;
            lock (nh_refcount_mutex)
            {
                if (nh_refcount == 0 && !ROS.isStarted())
                {
                    node_started_by_nh = true;
                    ROS.start();
                }
                ++nh_refcount;
            }
        }
示例#2
0
        private void construct(string ns, bool validate_name)
        {
            if (!ROS.initialized)
            {
                ROS.FREAKOUT();
            }
            collection          = new NodeHandleBackingCollection();
            UnresolvedNamespace = ns;
            Namespace           = validate_name ? resolveName(ns) : resolveName(ns, true, true);

            ok = true;
            lock (nh_refcount_mutex)
            {
                if (nh_refcount == 0 && !ROS.isStarted())
                {
                    node_started_by_nh = true;
                    ROS.start();
                }
                ++nh_refcount;
            }
        }