This one is for somebody who wants to reinstall it totally and setup by themselves.
Some reference:
- kobuki docs including the kobuki self not ROS/drawing: https://iclebo-kobuki.readthedocs.io/en/latest/basic_usage.html
- Manual book for turtlebot2 kobuki: https://learn.turtlebot.com/2015/02/01/1/ [But most of them are redundant]
- Official repo: https://github.com/yujinrobot/kobuki.git
reference: yujinrobot/kobuki#427, yujinrobot/kobuki#382
sudo apt update && sudo apt-get install liborocos-kdl-dev libusb-dev libftdi-dev ros-noetic-joy ros-noetic-ecl-core ros-noetic-ecl-console ros-noetic-ecl-mobile-robot -yclone this repo:
mkdir -p ~/kobuki_ws/src && cd ~/kobuki_ws/src
git clone TODO_public_link # this repobuild, if you want to setup sensor also, please follow Sensor setup
cd ~/kobuki_ws
catkin buildkobuki.cppfor the serial read thing.subscriber_callbacks.cpptopic will send to kobuki
Every sensor have their own driver, we need install them first, here we give two examples on how to setup livox and VLP-16. But maybe the NUC in the kobuki already have it if you are not from the scratch and reinstall everything.
Dependencies are velodyne need:
sudo apt update && apt install -y libpcap-dev
cd ~/kobuki_ws/src && mkdir driver && cd driver
git clone https://github.com/ros-drivers/velodyne.git
git clone https://github.com/Livox-SDK/livox_ros_driver.git
cd ~/kobuki_ws
catkin buildReference: ros_wiki_get_started_VLP16, using the wireshark to
sudo apt update && sudo add-apt-repository ppa:wireshark-dev/stable
sudo apt install wiresharkOpen it with sudo
sudo wiresharkYou can check the ip addr if you forget here, and also which ip the sensor looking for.
Livox SDK:
git clone https://github.com/Livox-SDK/Livox-SDK
cd Livox-SDK
cd build && cmake ..
make
sudo make install-
you need change the config file,
base.yaml, the most import thing is:device_port: /dev/ttyUSB0
-
Open the minimal one:
roslaunch kobuki_node minimal.launch
-
AND THEN run keyboard control, so we can start the kobuki!
roslaunch kobuki_keyop keyop.launch
if everything success, we will see this, and then press keyboard
↑button:Forward/back arrows : linear velocity incr/decr. Right/left arrows : angular velocity incr/decr. Spacebar : reset linear/angular velocities. d : disable motors. e : enable motors. q : quit.
-
Remote controller [Logitech F710 setup]
# check the lsusb turtle@turtle-nuc /home » lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 006: ID 046d:c21f Logitech, Inc. F710 Wireless Gamepad [XInput Mode] # <=== joy Bus 001 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC # <=== serial
Most of time is in the
/dev/inputasjs0, we can edit with:sudo vim /etc/udev/rules.d/10-colca.rules KERNEL=="js*", SUBSYSTEM=="input", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c21f", MODE:="0777",SYMLINK+="logitech_joy" KERNEL=="ttyUSB*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE:="0777",SYMLINK+="kobuki_serial" service udev reload service udev restart # important step!! plugin out and in again!
And we will see things by running following command, so that even more device is here, we will not lose them.
turtle@turtle-nuc /home » ls -l /dev | grep -E "logitech|kob" lrwxrwxrwx 1 root root 7 mar 10 10:37 kobuki_serial -> ttyUSB0 lrwxrwxrwx 1 root root 9 mar 10 10:31 logitech_joy -> input/js0
-
Control Manual, Here is the button said
- START : to start the robot, if you want to STOP, press
BACK - BACK : to stop robot
- MODE : PLEASE TURN OFF THE MODE
- RB && RIGHT mini sticks: forward speed
- RB && LEFT mini sticks: left/right turn
- START : to start the robot, if you want to STOP, press
Some problem you may met, record here:
-
Cannot open /dev/ttyUSB0: Permission denied #26 esp8266/source-code-examples#26
-
serial problem: https://stackoverflow.com/questions/11403932/python-attributeerror-module-object-has-no-attribute-serial
-
Kobuki: malformed sub-payload detected: yujinrobot/kobuki#382