示例#1
0
    private void ReceiveCartesianPositionRequest(NetworkMessage netMsg)
    {
        var msg = netMsg.ReadMessage <RequestCartesianPositionMessage>(); // irrelevent, client doesn't need to send us anything except the request itself
        RequestCartesianPositionMessage m = new RequestCartesianPositionMessage();

        float[] positions = KinovaAPI.GetCartesianPositions();
        m.x      = positions[0];
        m.y      = positions[1];
        m.z      = positions[2];
        m.thetaX = positions[3];
        m.thetaY = positions[4];
        m.thetaZ = positions[5];
        m.fp1    = positions[6];
        m.fp2    = positions[7];
        m.fp3    = 0;
        NetworkServer.SendToAll(MyMsgTypes.MSG_REQUEST_CARTESIAN_POSITION, m);
        Debug.Log("Sending frozen position!");
    }
示例#2
0
    public void RequestArmPositionsFromServer()
    {
        RequestCartesianPositionMessage m = new RequestCartesianPositionMessage();

        myClient.Send(MyMsgTypes.MSG_REQUEST_CARTESIAN_POSITION, m);
    }