示例#1
0
    public new static void CallBack(ROSBridgeMsg msg)
    {
        GameObject robot = GameObject.Find("Dalek");

        if (robot == null)
        {
            Debug.Log("Can't find the robot???");
        }
        else
        {
            PoseMsg pose = (PoseMsg)msg;
            robot.transform.position = new Vector3(pose.GetX(), 0.2f, pose.GetY());
            robot.transform.rotation = Quaternion.AngleAxis(-pose.GetTheta() * 180.0f / 3.1415f, Vector3.up);
        }
    }