PRBonn / bonnet

Bonnet: An Open-Source Training and Deployment Framework for Semantic Segmentation in Robotics.
GNU General Public License v3.0
323 stars 89 forks source link

ROS Unable to create network. Invalid yaml file ~/log/train.yaml #31

Closed richardlyf closed 6 years ago

richardlyf commented 6 years ago

SOLVED: For file path it has to be /home/$USER and not ~

Hi,

I'm running roslaunch bonnet_run bonnet_run.launch in the provided docker. I've downloaded the city_512 pretrained model and used cnn_freeze.py to save everything in ~/log However I'm getting the error Unable to create network. Invalid yaml file ~/log/train.yaml It seems like the line _cfg_train = YAML::LoadFile(path + "/train.yaml"); in bonnet_core, bonnet.cpp is failing for some reason.

My configs are: cnn_cfg.yaml

model_path: "~/log"
device: "/gpu:0"
verbose: true
backend: "tf" # tf (tensorflow, cpu or gpu mode) or trt (TensorRT nvidia gpu)

topic_cfg.yaml

# inputs
image_topic: /camera/rgb/image_raw

# outputs
bgr_topic: /bonnet/bgr
mask_topic: /bonnet/mask
color_mask_topic: /bonnet/color_mask

ERROR:

started roslaunch server http://25.43.1.109:40363/

SUMMARY
========

PARAMETERS
 * /bonnet_node/backend: tf
 * /bonnet_node/bgr_topic: /bonnet/bgr
 * /bonnet_node/color_mask_topic: /bonnet/color_mask
 * /bonnet_node/device: /gpu:0
 * /bonnet_node/image_topic: /camera/rgb/image...
 * /bonnet_node/mask_topic: /bonnet/mask
 * /bonnet_node/model_path: ~/log
 * /bonnet_node/verbose: True
 * /rosdistro: kinetic
 * /rosversion: 1.12.13

NODES
  /
    bonnet_node (bonnet_run/bonnet_node)

ROS_MASTER_URI=http://25.43.1.106:11311

process[bonnet_node-1]: started with pid [16115]
[ INFO] [1536089505.974622159]: Successfully launched node.
Unable to create network. 
Invalid yaml file ~/log/train.yaml
[ERROR] [1536089505.974933092]: SOMETHING WENT WRONG INITIALIZING CNN. EXITING
[bonnet_node-1] process has died [pid 16115, exit code 1, cmd /home/developer/catkin/devel/lib/bonnet_run/bonnet_node __name:=bonnet_node __log:=/home/developer/.ros/log/63444740-b077-11e8-8d9b-00044b794498/bonnet_node-1.log].
log file: /home/developer/.ros/log/63444740-b077-11e8-8d9b-00044b794498/bonnet_node-1*.log

Thanks for your help.

tano297 commented 6 years ago

Marking as solved!