create_robot: Unknown mode detected

Hi, I’m using Roomba 642 and a simple USB-serial connection to connect it to my raspberry pi 3. When first I run roslaunch ca_driver create_2.launch, it outputs [CREATE] Unknown mode detected but I ignore it. Then, I run teleop_joy_keyboard and successfully control my roomba with the keyboard. However, when I try it again, this time when I run roslaunch ca_driver create_2.launch, it gives me an error as below and my roomba freezes. I’m running create_autonomy on ROS kinetic.

pi@pi-desktop:~/catkin_ws$ roslaunch ca_driver create_2.launch 
... logging to /home/pi/.ros/log/93e6802c-306c-11ea-85c7-b827eba5a161/roslaunch-pi-desktop-2378.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
xacro.py is deprecated; please use xacro instead
started roslaunch server http://pi-desktop:44355/

SUMMARY
========

PARAMETERS
 * /ca_driver/base_frame: base_footprint
 * /ca_driver/dev: /dev/ttyUSB0
 * /ca_driver/latch_cmd_duration: 0.2
 * /ca_driver/loop_hz: 10.0
 * /ca_driver/odom_frame: odom
 * /ca_driver/publish_tf: True
 * /ca_driver/robot_model: CREATE_2
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES
  /
    ca_driver (ca_driver/ca_driver)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)

ROS_MASTER_URI=http://localhost:11311

process[ca_driver-1]: started with pid [2431]
process[robot_state_publisher-2]: started with pid [2438]
[ INFO] [1578305369.481359865]: [CREATE] "CREATE_2" selected
[ INFO] [1578305370.552198949]: [CREATE] Connection established.
[ INFO] [1578305370.553044573]: [CREATE] Battery level 49.81 %
[ INFO] [1578305370.808227190]: [CREATE] Ready.
[ERROR] [1578305370.809554949]: [CREATE] Unknown mode detected
[ERROR] [1578305370.909520832]: [CREATE] Unknown mode detected
[ERROR] [1578305371.009491455]: [CREATE] Unknown mode detected
[ERROR] [1578305371.110775420]: [CREATE] Unknown mode detected
[ERROR] [1578305371.209784284]: [CREATE] Unknown mode detected
[ERROR] [1578305371.309791583]: [CREATE] Unknown mode detected
[ERROR] [1578305371.410613726]: [CREATE] Unknown mode detected
[ERROR] [1578305371.509811808]: [CREATE] Unknown mode detected
[ERROR] [1578305371.609841555]: [CREATE] Unknown mode detected
[create::Serial] serial error - End of file
[ERROR] [1578305371.709839584]: [CREATE] Unknown mode detected
[FATAL] [1578305371.711663644]: [CREATE] Runtime error: write: Input/output error
[ INFO] [1578305371.712741767]: [CREATE] Destruct sequence initiated.
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
  what():  write: Input/output error
[ca_driver-1] process has died [pid 2431, exit code -6, cmd /home/pi/catkin_ws/devel_isolated/ca_driver/lib/ca_driver/ca_driver __name:=ca_driver __log:=/home/pi/.ros/log/93e6802c-306c-11ea-85c7-b827eba5a161/ca_driver-1.log].
log file: /home/pi/.ros/log/93e6802c-306c-11ea-85c7-b827eba5a161/ca_driver-1*.log

I really hope you can help me with this error. Thanks!

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 26 (19 by maintainers)

Commits related to this issue

Most upvoted comments

I’m happy to review a pull request with a proposed workaround.

@vinnnyr It probably wouldn’t hurt to try to get iRobot to look into this possible bug. I have also opened a support ticket with them briefly explaining this issue and linking to this thread.

@jacobperron I think it’s safe to add an option to libcreate and create_driver to enable the mode reporting workaround, since the OI Mode reported in the sensor stream is consistently off-by-one. I have added this option to the mode_report_workaround branch in my forks of libcreate and create_robot. ( See commits https://github.com/process1183/libcreate/commit/33066aa1d8f8b34d045d23b53cb9f686c246eaf5 and https://github.com/process1183/create_robot/commit/24b60d784f8073071dbc8540ee6192c7106c78a5 ). Depending on iRobot’s response to the support ticket, we can either wait for them to fix the firmware, or I can open a pull request for my workaround option.

Right, I also didn’t think mode 4 was valid (and checked the spec.) I didn’t see a /diagnostics_agg topic, but there is a plain /diagnostics topic. Here’s one of the messages:

---
header:
  stamp:
    sec: 1643684803
    nanosec: 461987635
  frame_id: ''
status:
- level: "\0"
  name: 'create_driver: Battery Status'
  message: Battery is OK
  hardware_id: CREATE_2
  values:
  - key: Charge (Ah)
    value: '1.888'
  - key: Capacity (Ah)
    value: '2.068'
  - key: Temperature (Celsius)
    value: "\x15"
  - key: Current (A)
    value: '-0.111'
  - key: Voltage (V)
    value: '16.028'
  - key: Charging state
    value: Not charging
- level: "\x01"
  name: 'create_driver: Safety Status'
  message: Cliff detected
  hardware_id: CREATE_2
  values:
  - key: Wheeldrop
    value: 'False'
  - key: Cliff
    value: 'True'
- level: "\x01"
  name: 'create_driver: Serial Status'
  message: Corrupt packets detected. If the number of corrupt packets is increasing, data may be unreliable
  hardware_id: CREATE_2
  values:
  - key: Corrupt packets
    value: '8'
  - key: Total packets
    value: '17167'
- level: "\x02"
  name: 'create_driver: Base Mode'
  message: No message was set
  hardware_id: CREATE_2
  values: []
- level: "\0"
  name: 'create_driver: Driver Status'
  message: Maintaining loop frequency
  hardware_id: CREATE_2
  values: []
---

I definitely appear to be getting corrupted packets… I can also try directly attaching my laptop to the Roomba’s serial port, as you suggested, and running the create_driver from there.

Hi. I have also encountered this issue on a 690 using a RPi ZW and ROS2 Foxy. I am using the foxy branch of this create_robot repo (create_driver v1.3.0) and themaster branch of libcreate (v2.0.0). The problem appears to be caused by libcreate reporting the mode as 4. I made a simple change to create_driver.cpp so it includes the mode in the error message, and got the following console output.

josh@roomba:~$ ros2 run create_driver create_driver
[INFO] [1643605421.270118629] [create_driver]: [CREATE] "CREATE_2" selected
[INFO] [1643605422.390801433] [create_driver]: [CREATE] Connection established.
[INFO] [1643605422.393783411] [create_driver]: [CREATE] Battery level 94.05 %
[INFO] [1643605422.892660763] [create_driver]: [CREATE] Ready.
[ERROR] [1643605423.019346836] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605423.095406280] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605423.194536555] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605423.294530824] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605423.394526093] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605423.494524361] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605423.594800628] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605423.694520899] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605423.794520167] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605423.894517436] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605423.994521705] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605424.094808971] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605424.194519242] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605424.294591510] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605424.394601779] [create_driver]: [CREATE] Unknown mode (4) detected
[ERROR] [1643605424.494618047] [create_driver]: [CREATE] Unknown mode (4) detected
^C[INFO] [1643605424.506785958] [rclcpp]: signal_handler(signal_value=2)
[INFO] [1643605424.558102583] [create_driver]: [CREATE] Destruct sequence initiated.

I was not able to test libcreate 1.6.1 or 1.6.0 due to build failures. Please let me know if you would like more info or want me to test any changes!