Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError in publishCameraState when camera is not ready on PTZ camera #55

Merged
merged 8 commits into from
May 26, 2020
Merged

Conversation

sgemme-csa
Copy link
Contributor

On Axis P5532-E, axis_camera.axis_ptz.publishCameraState will launch a KeyError if the ROS driver is started too soon after the camera has booted. I did not fully investigated it but, for some reason, even though the GET request returns a response, it does not have the 'zoom' field. Therefore, when publishCameraState tries to access self.cameraPosition['zoom'], a KeyError is raised, causing the Thread polling the telemetry to crash. I added a catch KeyError in publishCameraState.

Sebastien Gemme added 8 commits May 21, 2019 09:34
Signed-off-by: Sebastien Gemme <sebastien.gemme@canada.ca>
… time after startup would cause a KeyError because the fiels in the response were not present, now catchin the KeyError exception to fix the problem

Signed-off-by: Sebastien Gemme <sebastien.gemme@canada.ca>
…n time after startup would causes a KeyError because the fields in the response were not present. Now catching the KeyError exception to fix the problem.

Signed-off-by: Sebastien Gemme <sebastien.gemme@canada.ca>
Signed-off-by: Sebastien Gemme <sebastien.gemme@canada.ca>
Signed-off-by: Sebastien Gemme <sebastien.gemme@canada.ca>
@civerachb-cpr civerachb-cpr merged commit 5d21cf1 into ros-drivers:master May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants