Skip to content

Commit

Permalink
added file
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasFrey96 committed Feb 22, 2024
1 parent b10df1d commit 5748748
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey.
# All rights reserved. Licensed under the MIT license.
# See LICENSE file in the project root for details.
#
#
# Copyright (c) 2022-2024, ETH Zurich, Matias Mattamala, Jonas Frey.
# All rights reserved. Licensed under the MIT license.
# See LICENSE file in the project root for details.
#
import rospkg
import rospy
import os

def reload_rosparams(enabled, node_name, camera_cfg):
if enabled:
try:
rospy.delete_param(node_name)
except:
pass

rospack = rospkg.RosPack()
wvn_path = rospack.get_path("wild_visual_navigation_ros")
os.system(f"rosparam load {wvn_path}/config/wild_visual_navigation/default.yaml {node_name}")
wvn_anymal = rospack.get_path("wild_visual_navigation_anymal")
os.system(f"rosparam load {wvn_anymal}/config/wild_visual_navigation/inputs/{camera_cfg}.yaml {node_name}")

0 comments on commit 5748748

Please sign in to comment.