magazino / pylon_camera

ROS-Driver for Basler Cameras
BSD 3-Clause "New" or "Revised" License
78 stars 108 forks source link

Default config/MTU problem #52

Open andersgb1 opened 5 years ago

andersgb1 commented 5 years ago

Maybe I'm just too inexperienced with YAML, but I had great trouble tracking down the reason why I couldn't get my GigE camera to work. It turned out that the MTU had to go down to the (common) 1500 - the current default is 3000:

https://github.com/magazino/pylon_camera/blob/cf3b209208a1a3634cef10cb4f41f223744c51b0/src/pylon_camera/pylon_camera_parameter.cpp#L64

I wanted to just use the provided default config file so my intuition was to uncomment both GigE parameters by uncommenting the following four lines:

https://github.com/magazino/pylon_camera/blob/ced4d4fb1b1a68877eddb2e8b6be8590dad606ec/config/default.yaml#L111-L119

But then the problem is that the "nesting" can only be done once, i.e. the twofold appearance of gige: makes the node only load the last setting (the packet delay).

A suggested fix would be to simply remove line 118.

codyhex commented 5 years ago

I have the same issue, a better solution will be not force setting the camera config or load some use set config from the camera that is tested working.

This thing is now giving me so much trouble.

bmegli commented 5 years ago

@andersgb1

In pylon_camera/config/default.yaml

Option 1

gige/mtu_size: 9000
gige/inter_pkg_delay: 1000

Option 2

gige: {mtu_size: 2000, inter_pkg_delay: 1000}

Option 3

gige:
 mtu_size: 7000
 inter_pkg_delay: 700

I would say that that option 1 makes most sense in default yaml. User may just uncomment the relevant lines, even without understanding yaml syntax.

bmegli commented 5 years ago

Ok, while option 1 works, I am not sure it is a proper YAML.

I am unable to find this syntax in YAML specification

So option 1 makes less sense as default now...