def publish_state(self): if not None in (self.x, self.y, self.v, self.psi): curr_state = state_est() curr_state.header.stamp = rospy.Time.now() curr_state.psi = self.psi curr_state.v = self.v curr_state.x_adj = self.x curr_state.y_adj = self.y curr_state.x = curr_state.x_adj curr_state.y = curr_state.y_adj self.state_pub.publish(curr_state)
def publish_state(self): if not None in (self.x, self.y, self.v, self.psi): curr_state = state_est() curr_state.header.stamp = rospy.Time.now() curr_state.psi = self.psi curr_state.v = self.v curr_state.x_adj = self.x # + self.x_off - self.axle_dist*cos(self.psi) curr_state.y_adj = self.y # + self.y_off - self.axle_dist*sin(self.psi) curr_state.x = curr_state.x_adj curr_state.y = curr_state.y_adj self.state_pub.publish(curr_state)