You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Task Description: Create a ROS2 node that acts as a software-based emergency stop.
We've recently made the decision to drive our motors directly from the Jetson via its CAN bus controllers. ROS2 can only be "soft" real-time, or not real-time at all, so this is not ideal from our end. We need a node that can emergency stop, or "disable" the robot given a specific input.
Essentially, we'll subscribe to a published button value from either the GUI you create or from a joystick. If that button value ever reads "true" (after a debounce), the e-stop node should immediately publish a velocity of 0.0 to all of our robot's velocity controllers. In order to do this we'll actually need to set up the e-stop node as an "interceptor" of all of the robot's velocity traffic.
Let me explain the "interceptor" of velocity traffic" bit. Right now, in order to move the robot, you publish, to, for example differential_drive_controller/cmd_vel. Our joystick node publishes to this. Then the differential_drivetrain_controller subscribes to that and tells the robot to move at that velocity. We can't just have your e-stop publish to the differential_drive_controller/cmd_vel topic as well as the joystick because then if the e-stop is pressed the joystick would still be publishing to the velocity controller as well. Instead, we'll have the joystick publish to differential_drive_controller_estop/cmd_vel, and your e-stop node will subscribe to that. It will forward the values it receives to differential_drive_controller/cmd_vel. If the e-stop is pressed, the node should ignore any publishes to differential_drive_controller_estop/cmd_vel and instead publish 0.0 to differential_drive_controller/cmd_vel until the e-stop is disabled.
Task breakdown:
Create a branch off https://github.com/uwrobotics/uwrt_mars_rover/tree/user/soumya-khanna/220/drivetrain-xbox, user/[github-username/229/disable-node.
Within uwrt_mars_rover_utilities, create a package called uwrt_mars_rover_estop.
Create a node within that package which:
Subscribes to an array of geometry_msgs/Twist topics defined in the .h file (start with differential_drive_controller_estop/cmd_vel)
Forwards those Twist messages to the non-estop version of that topic.
If the estop is pressed, stops forwarding those Twist messages and instead publishes all 0s to the non-estop version of that topic.
For now, assume that the e-stop is pressed when a published topic, such as emergency_stop (which would just be a boolean value), publishes true. We'll tie it in with the joystick controller later.
The text was updated successfully, but these errors were encountered:
Task Description: Create a ROS2 node that acts as a software-based emergency stop.
We've recently made the decision to drive our motors directly from the Jetson via its CAN bus controllers. ROS2 can only be "soft" real-time, or not real-time at all, so this is not ideal from our end. We need a node that can emergency stop, or "disable" the robot given a specific input.
This input can either be from a ROS-based GUI, like done in rqt_estop in ROS1, or it can be from the joystick package we've been developing.
Essentially, we'll subscribe to a published button value from either the GUI you create or from a joystick. If that button value ever reads "true" (after a debounce), the e-stop node should immediately publish a velocity of
0.0
to all of our robot's velocity controllers. In order to do this we'll actually need to set up the e-stop node as an "interceptor" of all of the robot's velocity traffic.Let me explain the "interceptor" of velocity traffic" bit. Right now, in order to move the robot, you publish, to, for example
differential_drive_controller/cmd_vel
. Our joystick node publishes to this. Then the differential_drivetrain_controller subscribes to that and tells the robot to move at that velocity. We can't just have your e-stop publish to thedifferential_drive_controller/cmd_vel
topic as well as the joystick because then if the e-stop is pressed the joystick would still be publishing to the velocity controller as well. Instead, we'll have the joystick publish todifferential_drive_controller_estop/cmd_vel
, and your e-stop node will subscribe to that. It will forward the values it receives todifferential_drive_controller/cmd_vel
. If the e-stop is pressed, the node should ignore any publishes todifferential_drive_controller_estop/cmd_vel
and instead publish0.0
todifferential_drive_controller/cmd_vel
until the e-stop is disabled.Task breakdown:
https://github.com/uwrobotics/uwrt_mars_rover/tree/user/soumya-khanna/220/drivetrain-xbox
,user/[github-username/229/disable-node
.uwrt_mars_rover_utilities
, create a package calleduwrt_mars_rover_estop
.geometry_msgs/Twist
topics defined in the.h
file (start withdifferential_drive_controller_estop/cmd_vel
)For now, assume that the e-stop is pressed when a published topic, such as
emergency_stop
(which would just be a boolean value), publishestrue
. We'll tie it in with the joystick controller later.The text was updated successfully, but these errors were encountered: