Xiaomi Vacuum Cleaner ROS Bridge
This package bridges between a rooted Xiaomi Vacuum Cleaner, publishes its sensor data, and forwards Twist messages to drive the robot.
- Laser Sensor
- Cliff Sensor
- Wall Sensor
- Front Ultrasonic Sensor
- Battery Info
What doesn't work
- Motor Control (Vaccum, Main-Brush, Side-Brush)
- Wheel Drop Sensor
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"
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
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.
- Make sure the RoboController is not running.
- Connect to the robot by ssh and start the RoboController via "/opt/rockrobo/cleaner/bin/RoboController".
- Push the "Home" button on the robot to let it search for the dock.
- Once the robot keeps moving, kill the RoboController via Ctrl-C
- Lift the robot to interrupt its navigation.
- Now you should just hear the LaserScanner turning. If so, the robot is ready to be controlled by you.
- ~ vacuum_ip [str] | IP addres of the robot. default: 192.168.8.1
- /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
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
- The robot can't be controlled while a bumper is pressed.
- 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.
- 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.