Skip to content

Commit

Permalink
weird minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DinoSage committed Apr 7, 2024
1 parent f3da2d9 commit 6593d76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/rktl_control/rktl_control/keyboard_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def main():
rclpy.init(args=sys.argv)
node = rclpy.create_node('keyboard')

effort_pub = node.create_publisher(ControlEffort, 'effort', queue_size=1)
effort_pub = node.create_publisher(ControlEffort, 'effort', 1)
reset_srv = node.create_client(Empty, '/sim_reset')

wrapper(main)
Expand Down
11 changes: 6 additions & 5 deletions src/rktl_sim/rktl_sim/sim_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(self):
# rospy.init_node('simulator')
rclpy.init(args=sys.argv)
global node
node = rclpy.create_node("simulator")
self.node = rclpy.create_node("simulator")


mode = self.get_sim_param('~mode')
Expand All @@ -73,7 +73,8 @@ def __init__(self):
self.mode = SimulatorMode.REALISTIC
else:
#rospy.signal_shutdown('unknown sim mode set "{}"'.format(mode))
self.destroy_node('unknown sim mode set "{}"'.format(mode))
self.node.destroy_node()
#rclpy.shutdown()


self.cmd_lock = Lock()
Expand Down Expand Up @@ -113,7 +114,7 @@ def check_urdf(self, urdf_path):

if urdf_path is None:
#rospy.signal_shutdown('no urdf path set for "{}"'.format(urdf_path))
self.destroy_node('no urdf path set for "{}"'.format(urdf_path))
self.node.destroy_node()
try:
raise Exception('no urdf path set for "{}"'.format(urdf_path))
except Exception as e:
Expand All @@ -127,7 +128,7 @@ def check_urdf(self, urdf_path):

if not os.path.isfile(urdf_path):
#rospy.signal_shutdown('no urdf file exists at path {}'.format(urdf_path))
self.destroy_node('no urdf file exists at path {}'.format(urdf_path))
self.node.destroy_node()


def effort_cb(self, effort_msg, car_id):
Expand Down Expand Up @@ -404,7 +405,7 @@ def update_all_cars(self):

if 'name' not in car_config:
#rospy.signal_shutdown('no "name" set for car config in sim')
self.destroy_node('no "name" set for car config in sim')
self.node.destroy_node()

car_name = car_config['name']
if 'randomize_pose' in car_config:
Expand Down

0 comments on commit 6593d76

Please sign in to comment.