Example #1
0
    public override int GetHashCode()
    {
        int hash = 1;

        if (header_ != null)
        {
            hash ^= Header.GetHashCode();
        }
        if (leftImage_ != null)
        {
            hash ^= LeftImage.GetHashCode();
        }
        if (rightImage_ != null)
        {
            hash ^= RightImage.GetHashCode();
        }
        if (pointCloud_ != null)
        {
            hash ^= PointCloud.GetHashCode();
        }
        if (navSatFix_ != null)
        {
            hash ^= NavSatFix.GetHashCode();
        }
        if (odometry_ != null)
        {
            hash ^= Odometry.GetHashCode();
        }
        return(hash);
    }
Example #2
0
 // Update is called once per frame
 void Update()
 {
     if (run)
     {
         sensor = updateGPS();
         rosSocket.Publish(publication_id, sensor);
     }
 }
Example #3
0
 public void MergeFrom(SEVData other)
 {
     if (other == null)
     {
         return;
     }
     if (other.header_ != null)
     {
         if (header_ == null)
         {
             header_ = new global::Header();
         }
         Header.MergeFrom(other.Header);
     }
     if (other.leftImage_ != null)
     {
         if (leftImage_ == null)
         {
             leftImage_ = new global::Image();
         }
         LeftImage.MergeFrom(other.LeftImage);
     }
     if (other.rightImage_ != null)
     {
         if (rightImage_ == null)
         {
             rightImage_ = new global::Image();
         }
         RightImage.MergeFrom(other.RightImage);
     }
     if (other.pointCloud_ != null)
     {
         if (pointCloud_ == null)
         {
             pointCloud_ = new global::PointCloud2();
         }
         PointCloud.MergeFrom(other.PointCloud);
     }
     if (other.navSatFix_ != null)
     {
         if (navSatFix_ == null)
         {
             navSatFix_ = new global::NavSatFix();
         }
         NavSatFix.MergeFrom(other.NavSatFix);
     }
     if (other.odometry_ != null)
     {
         if (odometry_ == null)
         {
             odometry_ = new global::Odometry();
         }
         Odometry.MergeFrom(other.Odometry);
     }
 }
Example #4
0
    private NavSatFix updateGPS()
    {
        NavSatFix navFix = new NavSatFix();

        navFix.header.frame_id          = frameId;
        navFix.status.status            = 0;
        navFix.status.service           = 1;
        navFix.position_covariance_type = 0;
        float[] matrixUnknown = { 1, 0, 0, 0, 1, 0, 0, 0, 1 };
        navFix.position_covariance = matrixUnknown;

        //TODO get and convert UTM to GPS

        return(navFix);
    }