How to run a control Python script on real kobuki

asked 2019-12-07 14:35:07 -0600

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?

edit retag flag offensive close merge delete

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.

Choco93 gravatar imageChoco93 ( 2019-12-09 01:43:55 -0600 )edit