-
Notifications
You must be signed in to change notification settings - Fork 598
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
[Community assistance needed] libavcodec multi-version compatibility #203
Comments
#202 looks to have a root in FFMPEG version difference between Ubuntu 18.04 and 20.04 |
@twdragon if we are smart about this redesign we could re-use the same graph TD;
ROS1_wrapper_node-->libavcodec_wrapper_lib;
ROS2_wrapper_node-->libavcodec_wrapper_lib;
libavcodec_wrapper_lib-->libavcodec
And then the user could swap in and out libavcodec versions if the |
@flynneva great offer! I will review this code a bit later. However, there could be an issue with passing data via pointers through the library API. I will investigate this and then, probably, we can provide a wrapper together. But anyhow, I will prefer the templatized C++ API header wrapper over the library. What do you think about the kind of implementation? Also, we need to look at the changes in |
@twdragon fyi I have a test branch and PR open on my fork that might be useful to you / us testing this concept of merging the two code bases (ROS 1 and ROS 2 branches). |
@twdragon I think I've got the ROS 1 and ROS 2 branches merged and compiling: flynneva#2 I dont have an Ubuntu 20.04 machine but if you or someone else could test to make sure the ROS 1 node still works using that branch maybe we could go ahead and merge it in. |
- The node implemented as singleton with monopolistic device access model (one node per device) - Moved and separated into different blocks the the code using V4L2, ROS and FFMPEG APIs - Removed message pointers completely, the node uses runtime- constant shared object addresses - Debugged FFMPEG decoder algorithm, removed memory leak. Closes ros-drivers#211 - Added (using @flynneva's code) the conditional compilation directives to exploit properly versioned libavcodec API. Closes ros-drivers#207 - Closes ros-drivers#203 - Added separated launch files to run the node and to test it using image_view. Removed image_view from ROS dependencies. - Node parameters with convenient defaults moved from the launch file to YML file for the parameter server - Documented parameter names and default values
- The node implemented as singleton with monopolistic device access model (one node per device) - Moved and separated into different blocks the the code using V4L2, ROS and FFMPEG APIs - Removed message pointers completely, the node uses runtime- constant shared object addresses - Debugged FFMPEG decoder algorithm, removed memory leak. Closes ros-drivers#211 - Added (using @flynneva's code) the conditional compilation directives to exploit properly versioned libavcodec API. Closes ros-drivers#207 - Closes ros-drivers#203 - Added separated launch files to run the node and to test it using image_view. Removed image_view from ROS dependencies. - Node parameters with convenient defaults moved from the launch file to YML file for the parameter server - Documented parameter names and default values
- The node implemented as singleton with monopolistic device access model (one node per device) - Moved and separated into different blocks the the code using V4L2, ROS and FFMPEG APIs - Removed message pointers completely, the node uses runtime- constant shared object addresses - Debugged FFMPEG decoder algorithm, removed memory leak. Closes ros-drivers#211 - Added (using @flynneva's code) the conditional compilation directives to exploit properly versioned libavcodec API. Closes ros-drivers#207 - Closes ros-drivers#203 - Added separated launch files to run the node and to test it using image_view. Removed image_view from ROS dependencies. - Node parameters with convenient defaults moved from the launch file to YML file for the parameter server - Documented parameter names and default values
- The node implemented as singleton with monopolistic device access model (one node per device) - Moved and separated into different blocks the the code using V4L2, ROS and FFMPEG APIs - Removed message pointers completely, the node uses runtime- constant shared object addresses - Debugged FFMPEG decoder algorithm, removed memory leak. Closes ros-drivers#211 - Added (using @flynneva's code) the conditional compilation directives to exploit properly versioned libavcodec API. Closes ros-drivers#207 - Closes ros-drivers#203 - Added separated launch files to run the node and to test it using image_view. Removed image_view from ROS dependencies. - Node parameters with convenient defaults moved from the launch file to YML file for the parameter server - Documented parameter names and default values
- The node implemented as singleton with monopolistic device access model (one node per device) - Moved and separated into different blocks the the code using V4L2, ROS and FFMPEG APIs - Removed message pointers completely, the node uses runtime- constant shared object addresses - Debugged FFMPEG decoder algorithm, removed memory leak. Closes ros-drivers#211 - Added (using @flynneva's code) the conditional compilation directives to exploit properly versioned libavcodec API. Closes ros-drivers#207 - Closes ros-drivers#203 - Added separated launch files to run the node and to test it using image_view. Removed image_view from ROS dependencies. - Node parameters with convenient defaults moved from the launch file to YML file for the parameter server - Documented parameter names and default values
- The node implemented as singleton with monopolistic device access model (one node per device) - Moved and separated into different blocks the the code using V4L2, ROS and FFMPEG APIs - Removed message pointers completely, the node uses runtime- constant shared object addresses - Debugged FFMPEG decoder algorithm, removed memory leak. Closes ros-drivers#211 - Added (using @flynneva's code) the conditional compilation directives to exploit properly versioned libavcodec API. Closes ros-drivers#207 - Closes ros-drivers#203 - Added separated launch files to run the node and to test it using image_view. Removed image_view from ROS dependencies. - Node parameters with convenient defaults moved from the launch file to YML file for the parameter server - Documented parameter names and default values
- The node implemented as singleton with monopolistic device access model (one node per device) - Moved and separated into different blocks the the code using V4L2, ROS and FFMPEG APIs - Removed message pointers completely, the node uses runtime- constant shared object addresses - Debugged FFMPEG decoder algorithm, removed memory leak. Closes ros-drivers#211 - Added (using @flynneva's code) the conditional compilation directives to exploit properly versioned libavcodec API. Closes ros-drivers#207 - Closes ros-drivers#203 - Added separated launch files to run the node and to test it using image_view. Removed image_view from ROS dependencies. - Node parameters with convenient defaults moved from the launch file to YML file for the parameter server - Documented parameter names and default values
- The node implemented as singleton with monopolistic device access model (one node per device) - Moved and separated into different blocks the the code using V4L2, ROS and FFMPEG APIs - Removed message pointers completely, the node uses runtime- constant shared object addresses - Debugged FFMPEG decoder algorithm, removed memory leak. Closes ros-drivers#211 - Added (using @flynneva's code) the conditional compilation directives to exploit properly versioned libavcodec API. Closes ros-drivers#207 - Closes ros-drivers#203 - Added separated launch files to run the node and to test it using image_view. Removed image_view from ROS dependencies. - Node parameters with convenient defaults moved from the launch file to YML file for the parameter server - Documented parameter names and default values
@knorth55 @twdragon so what is the plan here? I see you guys are doing a lot on the Can we add a ROS 1 node wrapper to the What is your guys' strategy? |
@flynneva I think this is a kind of backport PR from
My plan is the first one or the third one. So the only problem is who will do the merging. |
@flynneva Oh, I didn't see flynneva#2 . I implement ROS1 CI, so please check that, too. BTW, why don't you use |
@flynneva @knorth55 guys, as I see, we all did a great job dividing ROS and V4L APIs inside the package in parallel. Thank you very much! In fact, we now have two variations of internal API splitting V4L and ROS parts. I had a look at the code and this is what I can say:
Since as @knorth55 mentioned, the merge is labour-consuming, I can suggest starting with thinking about what kind of internal API would be easier to use, as we have now two viable variations. What do you think? |
I thought #231 is a back-porting PR, but it introduces new and different structure from How about applying @twdragon 's strutcture change first to
|
@knorth55 as I mentioned here before:
Thus, it is not actually a backport, but it proposes encapsulation of the all V4L/FFMPEG-related stuff in the dedicated library. @flynneva @knorth55 do you think it is possible to make |
@twdragon Sorry, I didn't ask you deeply, especially about backward compatiblity. @twdragon
Also, my suggestion order can be inversed. |
@twdragon yes. That is exactly what my branch / PR above proves is possible: flynneva#2
@knorth55 @twdragon feel free to take the changes I have in flynneva#2 and make an MR to the |
@flynneva excellent! I will examine your MR and try to prepare it for merge. Can I rely on your experience and consider a successful build on ROS2 is already done? I should ask because I do not use ROS2 in my work |
In fact, the backward compatibility is maintained almost automatically because if you do not set any parameters the camera is configured automatically by the V4L driver with defaults determined via USB profile data exchange. I decided to leave then the camera "as is" in case the user configuration is not feasible because this autoconfiguration rarely provokes errors (excluding some built-in laptop cameras). About understanding the new parameter handling model: I discovered that on some cameras (for example, on Dell Latitude 3470 built-in embedded USB webcam) some parameters ( |
This week, i cannot make time to work on it. @flynneva i want to ask you a question about CI. |
@knorth55 what is industrial CI? I've never heard of it. The PR I linked to above also included a rewrite for the CI to also run ROS 1 and ROS 2 in CI for each pull request. Check it out and let me know if you have any questions. Feel free to copy+paste it as well and make changes as you see fit. |
@flynneva I use In |
@knorth55 I really like the solution that I came up with on the PR I mentioned above: flynneva#2 Have you looked at it yet? I am hesitant to migrate to Are there features that are on |
@flynneva I checked flynneva#2. the big difference is that BTW, can you also check this issue ros-gbp/usb_cam-release#2 ? |
@knorth55 it can and does. I think we should stick with the official
@knorth55 this isn't really related to this thread at all, but sure. It is all managed via terraform, so all you need to do is add yourself here and make a PR. Tag me in the PR and I can approve in case they need my approval. |
@knorth55 @twdragon can either one of you take what is in flynneva#2 and make a PR to this repo's |
i agree.
I didnt know that ros2 has the good management system. |
@flynneva |
Dear collaborators! Due to the Linux distributions being stick to different versions of
libavcodec
software stack, it is needed now to refactor a bit of the code and make it more modular and compatible with both old and new versions oflibavcodec
.It is strongly encouraged to test the package on the different
libavcodec
versions and to create issues with feedback and bug reports. It is also encouraged to create pull requests with the introduction of the compiler rules making the code compatible with different versions oflibavcodec
API!The text was updated successfully, but these errors were encountered: