iRobotEducation/create3_docs

H2.5 FW - full safety override ignores /cmd_vel topic

slowrunner opened this issue · 3 comments

H2.5 firmware with "full" safety override ignores /cmd_vel topic

Create3 responds to /rotate_angle for example, but not /cmd_vel

  • Verified Create3 is publishing
$ ros2 topic list
/battery_state
/cliff_intensity
/cmd_audio
/cmd_lightring
/cmd_vel
/dock_status
/interface_buttons
/ir_intensity
/ir_opcode
/joy
/joy/set_feedback
/kidnap_status
/mobility_monitor/transition_event
/odom
/parameter_events
/robot_state/transition_event
/rosout
/slip_status
/static_transform/transition_event
/stop_status
/tf_static
pi@WaLiPi5:~/wali_pi5/c3ws $ 

  • and accepting service and action goals:
pi@WaLiPi5:~/wali_pi5/c3ws $ cmds/pub_180.sh 

*** PUB 180
ros2 action send_goal /rotate_angle irobot_create_msgs/action/RotateAngle "{angle: 3.14159,max_rotation_speed: 0.5}"
Waiting for an action server to become available...
Sending goal:
     angle: 3.14159
max_rotation_speed: 0.5

Goal accepted with ID: 82a6435d9e194df687b3971e31a48972

Result:
    pose:
  header:
    stamp:
      sec: 1709222547
      nanosec: 73896258
    frame_id: odom
  pose:
    position:
      x: 0.017357299104332924
      y: -0.0005571765941567719
      z: 9.282828978030011e-05
    orientation:
      x: 0.0014758383014984479
      y: -0.0002464390300625141
      z: 0.9999902545638742
      w: 0.004153546242726723

Goal finished with status: SUCCEEDED

  • Verified /cmd_vel topic is being published by USB0 connected system:
pi@WaLiPi5:~/wali_pi5/c3ws $ ros2 topic echo --once /cmd_vel
linear:
  x: -0.0
  y: 0.0
  z: 0.0
angular:
  x: 0.0
  y: 0.0
  z: -0.4999999701976776
---
pi@WaLiPi5:~/wali_pi5/c3ws $ ros2 topic echo --once /cmd_vel
linear:
  x: 0.14999999105930328
  y: 0.0
  z: 0.0
angular:
  x: 0.0
  y: 0.0
  z: -0.0
---
pi@WaLiPi5:~/wali_pi5/c3ws $ 

  • Log Output showing /rotate_angle success and status during period /cmd_vel topics should have caused motion:
Feb 29 16:02:41 Create3-WaLi user.notice create-platform: [WARN] [1709222561.223861217] [motion_control]: rotate_angle goal succeeded: rotated commanded angle
Feb 29 16:03:25 Create3-WaLi user.notice create-platform: [INFO] [1709222605.433915975] [system_health]: CPU usage: max 46 [%] mean 35 [%] RAM usage: 33/59 [MB]
Feb 29 16:04:25 Create3-WaLi user.notice create-platform: [INFO] [1709222665.406335984] [system_health]: CPU usage: max 45 [%] mean 35 [%] RAM usage: 33/59 [MB]
Feb 29 16:05:25 Create3-WaLi user.notice create-platform: [INFO] [1709222725.591542294] [system_health]: CPU usage: max 54 [%] mean 41 [%] RAM usage: 33/59 [MB]
Feb 29 16:06:25 Create3-WaLi user.notice create-platform: [INFO] [1709222785.594932773] [system_health]: CPU usage: max 81 [%] mean 46 [%] RAM usage: 33/59 [MB]
Feb 29 16:07:25 Create3-WaLi user.notice create-platform: [INFO] [1709222845.415104429] [system_health]: CPU usage: max 47 [%] mean 38 [%] RAM usage: 33/59 [MB]
Feb 29 16:08:25 Create3-WaLi user.notice create-platform: [INFO] [1709222905.408061477] [system_health]: CPU usage: max 50 [%] mean 37 [%] RAM usage: 33/59 [MB]
Feb 29 16:08:29 Create3-WaLi user.notice ntpd: Script called in periodic mode
Feb 29 16:09:25 Create3-WaLi user.notice create-platform: [INFO] [1709222965.407555417] [system_health]: CPU usage: max 54 [%] mean 40 [%] RAM usage: 33/59 [MB]
Feb 29 16:10:25 Create3-WaLi user.notice create-platform: [INFO] [1709223025.409140445] [system_health]: CPU usage: max 56 [%] mean 49 [%] RAM usage: 33/59 [MB]
Feb 29 16:11:25 Create3-WaLi user.notice create-platform: [INFO] [1709223085.411026369] [system_health]: CPU usage: max 69 [%] mean 53 [%] RAM usage: 32/59 [MB]
Feb 29 16:12:25 Create3-WaLi user.notice create-platform: [INFO] [1709223145.413557282] [system_health]: CPU usage: max 51 [%] mean 41 [%] RAM usage: 32/59 [MB]
  • Issue only occurs when safety_override is set to "full" (only change from proper behavior file with "backup_only" setting):
motion_control:
  ros__parameters:
    # safety_override options are 
    # "none" - standard safety profile, robot cannot backup more than an inch because of lack of cliff protection in rear, max speed 0.306m/s
    # "backup_only" - allow backup without cliff safety, but keep cliff safety forward and max speed at 0.306m/s
    # "full" - no cliff safety, robot will ignore cliffs and set max speed to 0.46m/s
    safety_override: "full"

robot_state:
  ros__parameters:
    # publish_hazard_msgs: default true, set false to noticeably reduce CPU and RAM useage
    publish_hazard_msgs: false
    # publish_odom_tfs: default true, if not needed will noticeably reduce CPU and RAM use
    publish_odom_tfs: false 
    # raw_kinematics_min_pub_period_ms: default 25 , -1 disables /imu, /mouse, /wheel_status, /wheel_ticks, /wheel_vels (-1 recommended)
    raw_kinematics_min_pub_period_ms: -1
    # hazards_pub_fixed_period_ms: default -1 disables fixed period hazard publication, pubs only when change noted, 1: publish as soon as possible, 2+ period for constant publishing 


cmd_vel_test_with_safety_override_full_and_backup_only.txt

  • Configuration:
    • Create3 with USB0 connection to Raspberry Pi compute board,
      FastDDS Discovery Server enabled (server 0 running on Raspberry Pi compute board)
      ntp.conf prefers chrony ntp server running on Raspberry Pi computer board
# Use RPi5 as preferred server
# Minpoll 2^4 = 16s
# Maxpoll 2^6 = 64s
server 192.168.186.3 prefer iburst minpoll 4 maxpoll 6
# Fallback if Pi5 is napping
# irobot servers
server 0.irobot.pool.ntp.org iburst minpoll 4 maxpoll 6
server 1.irobot.pool.ntp.org iburst minpoll 4 maxpoll 6
server 2.irobot.pool.ntp.org iburst minpoll 4 maxpoll 6
server 3.irobot.pool.ntp.org iburst minpoll 4 maxpoll 6
  • ROS 2 Humble running on Raspberry PI compute board
    • wali_node.py successfully undocks/docks Create3 using /undock and /dock action goals for 24/7 operation

Screenshot 2024-02-29 at 11 34 59 AM

System Info
>>>>>>> system IP address
10.0.0.67

>>>>>>> system version
H.2.5

>>>>>>> system sku
RCi3099

>>>>>>> system battery
Percentage:31
Capacity(mAh):1834

>>>>>>> system properties
   PRODUCT         : create3
   SERIAL          : e17628
   CLEAN MODE      : normal
   CONNS SVC MODE  : normal
   AP RADIO        : wlan1/g/6/[SHORT-GI-20][GF]/Create-D5DD/US
   AP IP ADDR      : 192.168.10.1
   CL IP           : dhcp/#/#/#
   CL DNS          : #/#/#
   CL DHCPCD T/O   : 3
   CL REG DOMAIN   : US
   ETH0 IP         : static/192.168.186.2
   USB0 IP         : 192.168.186.2/192.168.187.2/192.168.186.3
   SYSTEM_ACCESS   : locked
   DEVELOPMENT MODE: disabled
   RADIO_LIST      : wlan0 wlan1
   HOSTNAME        : Create3-WaLi
   ROBOT ID        : D5DDFAE6A49A45009420E9080CBF45D1
   BOOT COUNT      : 34
   LANGUAGE PACK   : unknown
   EXTRA LANGUAGE  : not_installed


>>>>>>> system date
Thu Feb 29 16:35:30 UTC 2024

>>>>>>> system uptime
 16:35:30 up 22:25,  load average: 1.48, 1.25, 1.18

>>>>>>> system memory
              total        used        free      shared  buff/cache   available
Mem:          59088       33144       11588         380       14356       23828
Swap:             0           0           0

>>>>>>> system ifconfig
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:11460 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11460 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2464530 (2.3 MiB)  TX bytes:2464530 (2.3 MiB)

usb0      Link encap:Ethernet  HWaddr A6:1A:0C:0D:66:5D  
          inet addr:192.168.186.2  Bcast:192.168.186.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:64578 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1860502 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:19375775 (18.4 MiB)  TX bytes:1418268144 (1.3 GiB)

wlan0     Link encap:Ethernet  HWaddr 4C:B9:EA:2E:98:7C  
          inet addr:10.0.0.67  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1847229 errors:0 dropped:44622 overruns:8 frame:8
          TX packets:1814632 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:660166253 (629.5 MiB)  TX bytes:1497939898 (1.3 GiB)
          Interrupt:6 


>>>>>>> system hciconfig


Oops. We see the source of the bug, will patch soon.

For now, if you set the parameter to "full" at run time instead of in the yaml, you can work around this bug (that is, ros2 param set /motion_control safety_override "full")

Hi @slowrunner , thanks for the report.
We released a new version (H.2.6) that fixes the problem.

Please open a new bug report if you find anything else!