ros callback for turtlebot
i just want the turtlebot to stop after one revolution or drawing a circle....i am doing this using twist msg and i also give the linear and angular velocity in the publisher and also have also subscribed to the topic published, i don't know what to do after this. I am new to ROS and still learning python. i really need this help (basically i want the bot to come back to its initial position after one revolution)
Asked by Krishna99 on 2020-10-23 01:48:01 UTC
Comments
Is this homework? This same question has been asked at least three times on Stackoverflow over the last month or so. The answer is always the same: you'll need to learn about closed-loop control. It's also best to share your code and ask specific questions about it rather than only describing the task you are given and asking for a solution.
Asked by chfritz on 2020-10-23 11:31:44 UTC
!/usr/bin/env python
import rospy from geometry_msgs.msg import Twist from turtlesim.msg import Pose
def pose_callback(ms): print("msg.theta")
def revolve():
if name == 'revolve': try: revolve() except rospy.ROSInterruptException: pass
Asked by Krishna99 on 2020-10-23 13:05:39 UTC
this is the code i have been working on. i just want write a callback function for this script where the turtlebot stops to its initial position after drawing a circle. i also don't know that my code is working or not because whenever i execute the file it spawns a new command line and no output. It would be really helpful for me, i am a beginner in ROS and in python i feel a bit hard to troubleshoot the problem which i face
Thank You
Asked by Krishna99 on 2020-10-23 13:10:12 UTC