Example #1
0
    void Start()
    {
        droneBody = this.GetComponent <Rigidbody>();
        c         = new droneController(new controlVars(pidVelX), new controlVars(pidVelY), new controlVars(pidVelZ), new controlVars(pidAngVelY), Time.fixedDeltaTime);

        cam1.enabled = true;
        cam2.enabled = true;
    }
Example #2
0
    void Start()
    {
        Application.targetFrameRate = 60;
        //ros connection
        //rosSocket = new RosSocket("ws://192.168.1.10:9090");
        rosSocket = transform.GetComponent <RosConnector>().RosSocket;

        publication_id = rosSocket.Advertize("/drone/pos", "geometry_msgs/Pose");

        droneBody = this.GetComponent <Rigidbody>();
        c         = new droneController(new controlVars(pidVelX), new controlVars(pidVelY), new controlVars(pidVelZ), new controlVars(pidAngVelY), Time.fixedDeltaTime);

        //cam1.enabled = false;
        //cam2.enabled = true;
    }