@@ -0,0 +1,920 @@
+#!/usr/bin/env python%0A%0Aimport json%0Aimport os.path as osp%0Aimport rospy%0A%0A%0Adef main():%0A    json_dir = rospy.get_param('~json_dir')%0A    location = rospy.get_param('~location')%0A    location_path = osp.join(json_dir, 'item_location_file.json')%0A    with open(location_path) as location_f:%0A        data = json.load(location_f)%0A    if location == 'bins':%0A        bins = data%5Blocation%5D%0A        bin_contents = %7B%7D%0A        for bin_ in bins:%0A            bin_contents%5Bbin_%5B'bin_id'%5D%5D = bin_%5B'contents'%5D%0A        rospy.set_param('~param', bin_contents)%0A    elif location == 'boxes':%0A        boxes = data%5Blocation%5D%0A        box_contents = %7B%7D%0A        for box in boxes:%0A            box_contents%5Bbox%5B'size_id'%5D%5D = box%5B'contents'%5D%0A        rospy.set_param('~param', box_contents)%0A    else:  # tote contents%0A        rospy.set_param('~param', data%5Blocation%5D)%0A%0Aif __name__ == '__main__':%0A    rospy.init_node('set_location_in_rosparam')%0A    main()%0A

add set_location_in_rosparam node