Skip to content

Commit

Permalink
added return after one instance of destroying node
Browse files Browse the repository at this point in the history
  • Loading branch information
DinoSage committed Apr 7, 2024
1 parent 44917d7 commit baf222b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/rktl_sim/rktl_sim/sim_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,15 @@ def __init__(self):
else:
#rospy.signal_shutdown('unknown sim mode set "{}"'.format(mode))
self.node.destroy_node()#f'unknown sim mode set "{mode}"')
return



self.cmd_lock = Lock()
self.reset_lock = Lock()
self.car_cmd = (0.0, 0.0)


#render_enabled = self.get_sim_param('~render', secondParam=False)
#self.status_pub = rospy.Publisher('match_status', MatchStatus, queue_size=1)
self.status_pub = self.node.create_publisher(MatchStatus, 'match_status', 1)
Expand All @@ -92,7 +95,7 @@ def __init__(self):
elif self.mode == SimulatorMode.IDEAL:
#self.ball_odom_pub = rospy.Publisher('/ball/odom', Odometry, queue_size=1)
self.ball_odom_pub = self.node.create_publisher(Odometry, '/ball/odom', 1)

# Services
# rospy.Service('sim_reset_car_and_ball', Empty, self.reset_cb)
# rospy.Service('sim_reset_ball', Empty, self.reset_ball_cb)
Expand All @@ -106,6 +109,7 @@ def __init__(self):
rate.sleep()
except rclpy.ROSInterruptException:
pass



def check_urdf(self, urdf_path):
Expand Down

0 comments on commit baf222b

Please sign in to comment.