Replies: 1 comment
-
If the UAV is jittering, it may be that you are sending the command pose too fast (and your code would suggest that, you do not have a rate.sleep() in your while loop). Ideally, you should only publish the goal pose once and let the UAV finish it before sending another command. Can you try publishing just one goal pose using rostopic pub -1? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I publishing the PoseStamped message via terminal and the drone moves correctly to the position. But I'm trying to make a simple ros node to move from one point to another using the same message:
`
#!/usr/bin/env python3
import rospy
from time import sleep
from geometry_msgs.msg import PoseStamped
from std_msgs.msg import String
rospy.init_node("drone_controller")
drone = rospy.Publisher("/red/tracker/input_pose", PoseStamped, queue_size=10)
rate = rospy.Rate(2)
pose = PoseStamped()
pose.pose.position.y = 12
pose.pose.position.z = 5
if name == "main":
while not rospy.is_shutdown():
drone.publish(pose)
print(pose)
`
After running the node, the messages are correctly being published to the /red/tracker/input_pose topic (i checked by echoing the topic) but the drone isnt moving to the place I specified. After getting out of the node, I try to manually publish to the topic once again via terminal but the drone just jitters this time and doesnt go to the specified position. I pretty much have to restart the entire simulation if i want to manually control it via terminal.
update: while running the node script, the drone seems to jitter also, i dont know why its jittering.
Beta Was this translation helpful? Give feedback.
All reactions