personalrobotics / ada_ros2

ROS2 Hardware Interface and Description for the ADA Robot
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Controllers should die if watchdog fails #10

Closed amalnanavati closed 1 year ago

amalnanavati commented 1 year ago

Description

This PR adds a new launchfile, demo_feeding.launch.py, that launches all the same nodes as demo.launch.py but also launches a watchdog listener and completely terminates the launchfile if the watchdog fails.

Testing

Pull the code from ada_feeding#48

Setup: Sim

  1. Run the dummy FT sensor: ros2 run ada_feeding dummy_ft_sensor.py
  2. Run the watchdog: ros2 launch ada_feeding ada_feeding_launch.xml
  3. Launch MoveIt: ros2 launch ada_moveit demo_feeding.launch.py sim:=mock

Setup: Real Robot

  1. Run the FT sensor: ros2 run forque_sensor_hardware forque_sensor_hardware —ros-args -p host:=xxx.xxx.x.xx
    1. Re-tare the sensor: ros2 service call /wireless_ft/set_bias std_srvs/srv/SetBool "{data: true}"
  2. Run the watchdog: ros2 launch ada_feeding ada_feeding_launch.xml
  3. Launch MoveIt: ros2 launch ada_moveit demo_feeding.launch.py

Tests

Notes / Discussion Points

  1. The watchdog params and remapping for create_action_servers.py are defined in ada_feeding, whereas the same parameters/remapping are also defined in demo_feeding.launch.py. Are we okay with this?
  2. EDIT: This has now been addressed. Note that the order of launches becomes important, because we first have to start the watchdog, then start MoveIt, and then populate the planning scene, whereas right now the watchdog and planning scene are launched together. I'll probably modify ada_feeding#48 to have the planning scene node wait until there is a subscriber on the topic, to address this.
amalnanavati commented 1 year ago

Moved the watchdog listener into this repo and re-ran all tests in sim. Will next test in real.

amalnanavati commented 1 year ago

All tested and it works. Will merge.