-
Notifications
You must be signed in to change notification settings - Fork 76
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
Adding device selection support #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this, just a few comments need to be addressed
src/zed_cpu_ros.cpp
Outdated
@@ -31,9 +31,10 @@ class StereoCamera | |||
* @param[in] resolution The resolution | |||
* @param[in] frame_rate The frame rate | |||
*/ | |||
StereoCamera(int resolution, double frame_rate): frame_rate_(30.0) { | |||
StereoCamera(int device, int resolution, double frame_rate) | |||
: frame_rate_(30.0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make this on the same line? Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 311cb52 :)
launch/zed_cpu_ros.launch
Outdated
@@ -1,6 +1,7 @@ | |||
<launch> | |||
<arg name="config_file_location" default="$(find zed_cpu_ros)/config/SN1267.conf"/> | |||
<arg name="camera_namespace" default="camera"/> | |||
<arg name="device" default="0"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to device_id every where
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 311cb52 :)
README.md
Outdated
show_image | Whether to use opencv show image | bool | ||
Parameter | Description | Value | ||
------------------------------|-------------------------------------------------------------|------------------------- | ||
device | device ID selection (if multiple cameras) | int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix the format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was using auto-formatting tool (Atom Beautify) which changed indentation in several files. I just reverse patched those changes.
…structor back in one line)
Thank you for your contribution!! |
Thx for your node, it's quite usefull to skip ZED-SDK (no GPU on my laptop).
Unfortunately, I wasn't able to use your node as it is, due to my laptop webcam taking the first video slot
/dev/video0
.The way to fix this issue was to change the device parameter here :
camera_ = new cv::VideoCapture(0);
tocamera_ = new cv::VideoCapture(1);
.It was quite easy to make it a launching argument for the node, so i did it :).
Hope it will be helpfull !