void Awake()
        {
            List <UnityEngine.Transform> localLinkList = PR2Common.GetLinksInChildren(this.transform.root);

            foreach (UnityEngine.Transform localLink in localLinkList)
            {
                if (localLink.name == PR2Common.Link.base_footprint.ToString())
                {
                    TransformStamped localTransformStamped = new TransformStamped();
                    localTransformStamped.header.frame_id = PR2Common.OdomName;
                    localTransformStamped.child_frame_id  = localLink.name;

                    TfInfo localTfInfo = new TfInfo(localLink, localTransformStamped);

                    this.localTfInfoList.Add(localTfInfo);
                }
                else
                {
                    TransformStamped localTransformStamped = new TransformStamped();
                    localTransformStamped.header.frame_id = localLink.parent.name;
                    localTransformStamped.child_frame_id  = localLink.name;

                    TfInfo localTfInfo = new TfInfo(localLink, localTransformStamped);

                    this.localTfInfoList.Add(localTfInfo);
                }
            }

            this.synchronizer = this.GetComponent <PR2PubSynchronizer>();

            this.publishSequenceNumber = this.synchronizer.GetAssignedSequenceNumber();

            this.isUsingThread = this.synchronizer.useThread;
        }
Esempio n. 2
0
        void Awake()
        {
            this.synchronizer = this.GetComponent <PR2PubSynchronizer>();

            this.publishSequenceNumber = this.synchronizer.GetAssignedSequenceNumber();

            this.isUsingThread = this.synchronizer.useThread;
        }