Exemple #1
0
        public bool getData(ulong time_, ref TransformStorage data_out, ref string error_str)
        {
            TransformStorage temp1 = null, temp2 = null;
            int num_nodes = findClosest(ref temp1, ref temp2, time_, ref error_str);

            switch (num_nodes)
            {
            case 0:
                return(false);

            case 1:
                data_out = temp1;
                break;

            case 2:
                if (temp1.frame_id == temp2.frame_id)
                {
                    interpolate(temp1, temp2, time_, ref data_out);
                }
                else
                {
                    data_out = temp1;
                }
                break;

            default:
                ROS.FREAKOUT();
                break;
            }
            return(true);
        }