I want to control the vehicle through topic '/g500/pose', then i writed this code.

asked 2020-09-27 21:19:43 -0500

YXW gravatar image

I want to control the vehicle through topic '/dataNavigator', then i wrote this code.

rospy.init_node('position_publisher')
pub = rospy.Publisher('/dataNavigator', Odometry,queue_size=10)
odom = Odometry()
odom.pose.pose.position.x = 0
odom.pose.pose.position.y = 0
odom.pose.pose.position.z = 4
time.sleep(1)
pub.publish(odom)

After this code, the vehicle disappeared. I don't know what's wrong.

edit retag flag offensive close merge delete