mirror of
https://github.com/bjoernellens1/rmp220_middleware.git
synced 2024-11-21 23:43:46 +00:00
changes in operation: testing
This commit is contained in:
parent
6a7087ec37
commit
0b57cbd437
@ -124,8 +124,8 @@ class StateMachineNode(Node):
|
||||
self.timeout = 20.0
|
||||
|
||||
def timer_callback(self):
|
||||
# if self.chassis_mode == State.DISABLED or self.chassis_mode == State.STOPPED or self.chassis_mode == State.PASSIVE:
|
||||
# return # Do nothing if chassis is disabled, stopped or passive --> should save processing power
|
||||
if self.chassis_mode == State.DISABLED or self.chassis_mode == State.STOPPED or self.chassis_mode == State.PASSIVE:
|
||||
return # Do nothing if chassis is disabled, stopped or passive --> should save processing power
|
||||
if self.state == State.ENABLED:
|
||||
if self.timeout <= 0:
|
||||
self.state = State.PAUSED
|
||||
@ -139,8 +139,8 @@ class StateMachineNode(Node):
|
||||
self.state = State.ENABLED
|
||||
self.get_logger().info("State: ENABLED (cmd_vel)")
|
||||
self.enable_chassis()
|
||||
if self.state == State.PAUSED and (self.abs_x < 0.1 and self.abs_z < 0.1): # Is this even necessary?
|
||||
self.cmd_vel_pub.publish(self.twist)
|
||||
# if self.state == State.PAUSED and (self.abs_x < 0.1 and self.abs_z < 0.1): # Is this even necessary?
|
||||
# self.cmd_vel_pub.publish(self.twist)
|
||||
|
||||
def main(args=None):
|
||||
rclpy.init(args=args)
|
||||
|
Loading…
Reference in New Issue
Block a user