예제 #1
0
        public void Start()
        {
            rosSocket = transform.GetComponent <RosConnector>().RosSocket;
            rosSocket.Subscribe("/odom", "nav_msgs/Odometry", updateOdometry, UpdateTime);

            odometryTransformManager = UrdfModel.GetComponent <OdometryTransformManager>();
        }
예제 #2
0
    //private static string OdometryObjectName = "base_footprint";

    public void patch()
    {
        OdometryTransformManager odometryTransformApplyer = UrdfModel.GetComponent <OdometryTransformManager>();

        if (odometryTransformApplyer != null)
        {
            DestroyImmediate(odometryTransformApplyer);
        }

        UrdfModel.AddComponent <OdometryTransformManager>();
    }
예제 #3
0
    public static void patch(GameObject UrdfModel)
    {
        GameObject gameObject = UrdfModel.transform.Find(OdometryObjectName).gameObject;
        OdometryTransformManager odometryTransformApplyer = gameObject.GetComponent <OdometryTransformManager>();

        if (odometryTransformApplyer != null)
        {
            Object.DestroyImmediate(odometryTransformApplyer);
        }

        gameObject.AddComponent <OdometryTransformManager>();
    }