Example #1
0
    void Start()
    {
        odometryPublisher = node.CreatePublisher <nav_msgs.msg.Odometry>(OdometryTopic);
        tfPublisher       = node.CreatePublisher <tf2_msgs.msg.TFMessage>(TfTopic);

        clock = new rclcs.Clock();

        odometryMsg = new nav_msgs.msg.Odometry();
        odometryMsg.header.frame_id = "/odom";
        odometryMsg.child_frame_id  = "/base_footprint";
        robotPose  = odometryMsg.pose;
        robotTwist = odometryMsg.twist;

        tfMsg = new tf2_msgs.msg.TFMessage();
        tfMsg.transforms_init(1);
        tfTransformStamped = tfMsg.transforms[0];
        tfTransformStamped.header.frame_id = "/odom";
        tfTransformStamped.child_frame_id  = "/base_footprint";

        odometryMsg.pose.covariance  = poseCovarianceDiagonal.CovarianceMatrixFromDiagonal();
        odometryMsg.twist.covariance = twistCovarianceDiagonal.CovarianceMatrixFromDiagonal();

        if (BaseRigidbody == null)
        {
            BaseRigidbody = GetComponentInChildren <Rigidbody>();
        }
    }
 void Start()
 {
     poseWithCovarianceStampedMessage = new geometry_msgs.msg.PoseWithCovarianceStamped();
     poseWithCovarianceStampedMessage.pose.covariance = poseCovarianceDiagonal.CovarianceMatrixFromDiagonal();
     poseWithCovarianceStampedMessage.header.frame_id = FrameId;
     publisher = node.CreatePublisher <geometry_msgs.msg.PoseWithCovarianceStamped>(TopicName);
 }
Example #3
0
    void Start()
    {
        publisher = node.CreatePublisher <sensor_msgs.msg.JointState>(JointStateTopic);

        if (Joint != null)
        {
            jointStateMsg.name = new List <string> {
                Joint.JointName
            };
        }
    }
    void Start()
    {
        if (ChildFrame == null)
        {
            ChildFrame = transform;
        }

        message = new geometry_msgs.msg.PoseStamped();
        message.header.frame_id = ParetFrameId;
        publisher       = node.CreatePublisher <geometry_msgs.msg.PoseStamped>(TopicName);
        lastPublishTime = clock.Now;
    }
 void Start()
 {
     jointStateMsg       = new sensor_msgs.msg.JointState();
     jointStatePublisher = node.CreatePublisher <sensor_msgs.msg.JointState>(JointStateTopicName);
     clock = new rclcs.Clock();
 }