How to run a control Python script on real kobuki
I have finished testing my python script for a turtlebot to perform a obstacle avoidance task, using bumper sensor. What should I do to test the code on a real Kobuki. My code basically looks like this:
#!/usr/bin/env python
import rospy
import math
from geometry_msgs.msg import Twist
from std_msgs.msg import Float32
from kobuki_msgs.msg import BumperEvent
import sys, select, termios, tty
# some global variables
# series of callback and helper functions
def move():
# content of move action
if __name__ == '__main__':
try:
move()
except rospy.ROSInterruptException:
pass
I tested the functionalities of the code on the gazebo simulation of turtlebot because I didn't find the kobuki model for my gazebo version. I wonder how can I import my code into a real kobuki(best if with wire connections) and test how my code works on a real robot?
Asked by Haoran Bai on 2019-12-07 15:35:07 UTC
Comments
Preferred way would be you make master-slave connection between laptop and kobuki, where ROS master us running on kobuki while your laptop would be a slave, and you run your node on your laptop.
Asked by Choco93 on 2019-12-09 02:43:55 UTC