Skip to content
This package bridges the internal communication of a Xiaomi Vacuum Cleaner into ROS messages, provides an URDF model and contains configuration files for the navigation stack.
C++ CMake
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
include/xiaomi_bridge
launch
map
patches
src
urdf
.gitignore
CMakeLists.txt
README.md
package.xml

README.md

Xiaomi Vacuum Cleaner ROS Bridge

Introduction

This package bridges between a rooted Xiaomi Vacuum Cleaner, publishes its sensor data, and forwards Twist messages to drive the robot.

Functions

What works

  • Odometry
  • Driving
  • Laser Sensor
  • Cliff Sensor
  • Wall Sensor
  • Front Ultrasonic Sensor
  • Battery Info

What doesn't work

  • Motor Control (Vaccum, Main-Brush, Side-Brush)
  • Bumper
  • Wheel Drop Sensor

Requirements

1. Rooted Vacuum Cleaner: Please use the great work of Dennis Giese and Daniel Wegemer for doing this. Their repository can be found at https://github.com/dgiese/dustcloud.

2. Disable Watchdog for RoboController: On the robot, in "/opt/rockrobo/watchdog/ProcessList.conf" comment out the line "RoboController,setsid RoboController&,1,3,0"

3. Disable Firewall "Drop" rules for Player ports: On the robot, in "/opt/rockrobo/watchdog/rrwatchdoge.conf" comment out the lines "iptables -I INPUT -j DROP -p tcp --dport 6665" and "iptables -I INPUT -j DROP -p udp --dport 6665"

Notice:

The player client libraries are needed for this bridge and are built automatically. They are installed locally using the catkin_devel_prefix. This doesn't require root permissions and keeps the host system clean. Detailed information and how-tos for this library are available here, http://playerstage.sourceforge.net/doc/Player-svn/player

Bridge Node

The node can be started on another computer in the same network as the vacuum cleaner. It connects to the internally used player server for getting sensor data and commanding the robot.

Startup

  1. Make sure the RoboController is not running.
  2. Connect to the robot by ssh and start the RoboController via "/opt/rockrobo/cleaner/bin/RoboController".
  3. Push the "Home" button on the robot to let it search for the dock.
  4. Once the robot keeps moving, kill the RoboController via Ctrl-C
  5. Lift the robot to interrupt its navigation.
  6. Now you should just hear the LaserScanner turning. If so, the robot is ready to be controlled by you.

Details

  • Parameter
    • ~ vacuum_ip [str] | IP addres of the robot. default: 192.168.8.1
  • Topics
    • /cmd_vel [geometry_msgs::Twist]
    • /scan [sensor_msgs::LaserScan]
    • /odom [nav_msgs::Odometry]
    • /battery_state [sensor_msgs::BatteryState]
    • /front_sonar [sensor_msgs::Range]
    • /wall_distance [sensor_msgs::Range]
    • /cliff/front_right [sensor_msgs::Range]
    • /cliff/front_left [sensor_msgs::Range]
    • /cliff/right [sensor_msgs::Range]
    • /cliff/left [sensor_msgs::Range]
  • Launch Files
    • bringup.launch | starts the xiaomi_bridge_node, loads the robot model, and starts the robot state publisher. Contains the setting of the IP address parameter.
    • move_base.launch | starts the move_base node
    • navigation.launch | starts all needed nodes and loads all parameters for navigation
    • rviz.launch | starts rviz with the provided config file

Navigation

The configuration for the navigation stack is closely oriented to the TurtleBot. You can find more information and tutorials in its ROS wiki. http://wiki.ros.org/Robots/TurtleBot

rviz configuration overview

Known issues

  1. The robot can't be controlled while a bumper is pressed.
  2. Yes, the startup is that hacky. I am gratefully looking for another way to startup the motors and sensors. The best way would be, if that is even possible while the RoboController keeps running.
  3. Preventing the RoboController from running drastically limits the normal functions of the robot. Such as the buttons, the power indicator via LED color and the Mi Home app.
You can’t perform that action at this time.