• The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-1 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-2 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-3 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-4 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-5 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-6 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-7 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-8 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-9 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-10 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-11 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-12 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-13 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-14 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-15 has been created.
  • The directory /opt/www/bruyninckxh2/web/tmp/drutex-3e4aa43f02c7382ff11cd397a1c39d53-16 has been created.

[Bug 492] New: Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit
Summary: Update CameraComponents to meet Component Guidelines
Product: OCL
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: project
Priority: P2
Component: Hardware
AssignedTo: orocos-dev [..] ...
ReportedBy: ruben [dot] smits [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

The CameraComponents do not yet meet the Component Guidelines (see Orocos-Dev
ML).

Action points:

- make deployment available for all camera related components
- supply full api documentation
- supply component documentation
- supply demo application

Ruben

Ruben Smits's picture

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

Ruben Smits <ruben [dot] smits [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |

--- Comment #18 from Ruben Smits <ruben [dot] smits [..] ...> 2008-01-22 13:09:47 ---
Reopen bug until the documentation, a test application and a deployer
configuration file is added

Ruben

Ruben Smits's picture

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

Ruben Smits <ruben [dot] smits [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED

--- Comment #17 from Ruben Smits <ruben [dot] smits [..] ...> 2008-01-21 14:14:50 ---
patch committed:

svn ci CaptureCamera.cpp CaptureCamera.hpp cpf/CaptureCamera.cpf -m "committing
reviewed patch 218, i added some minor changes for the remarks"
Sending CaptureCamera.cpp
Sending CaptureCamera.hpp
Sending cpf/CaptureCamera.cpf
Transmitting file data ...
Committed revision 28849.

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

--- Comment #16 from Klaas Gadeyne <klaas [dot] gadeyne [..] ...> 2008-01-21 14:12:06 ---
(In reply to comment #15)
> > Patch seems ok to me. Some minor remarks.
> > - Add some statement how the values for cv were chosen (even if it's done by
> > trial and error)
> > - I think (but I'm not sure) the startHook and cleanupHook functions are
> > executed in real-time, so you should avoid the use of the logger in those
>
> I think you mean stopHook no? Ok, good to know! Should I update this in a next
> patch?

Yes (or check the RTT code and prove me wrong)

> > - The doxygen documentation of some of the properties contains some units (eg.
> > shutter time), but it would be nice if the used unit would also be visible in
> > the property description and the cpf file, so that people can see it when using
> > the taskbrowser for instance
>
> I think in a next patch I will be adding more properties. I will fix that too
> then.

Adding more properties should be done in a separate bugreport. Patches in this
bugreport should only modify the Camera component so it meets the new OCL
guidelines.

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

--- Comment #15 from François Cauwe <francois [..] ...> 2008-01-19 19:47:25 ---
(In reply to comment #14)
> Created an attachment (id=218)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=218) [details]
> Francois' patch that respects original coding style to make it more readable
Thanks! I added the the config lines[1] in my ~/.emacs file, so next patches
should be fine.

> This patch is a version that respects the original coding style, and hence more
> readable. Note that the coding style used in the hpp file is different from
> the one in the cpp file, but fixing that should be in a separate patch since it
> makes reviewing too hard.
>
> Patch seems ok to me. Some minor remarks.
> - Add some statement how the values for cv were chosen (even if it's done by
> trial and error)
> - I think (but I'm not sure) the startHook and cleanupHook functions are
> executed in real-time, so you should avoid the use of the logger in those

I think you mean stopHook no? Ok, good to know! Should I update this in a next
patch?

> - The doxygen documentation of some of the properties contains some units (eg.
> shutter time), but it would be nice if the used unit would also be visible in
> the property description and the cpf file, so that people can see it when using
> the taskbrowser for instance

I think in a next patch I will be adding more properties. I will fix that too
then.

François

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

Klaas Gadeyne <klaas [dot] gadeyne [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Attachment #217 is|0 |1
obsolete| |

--- Comment #14 from Klaas Gadeyne <klaas [dot] gadeyne [..] ...> 2008-01-19 17:27:12 ---
Created an attachment (id=218)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=218)
Francois' patch that respects original coding style to make it more readable

This patch is a version that respects the original coding style, and hence more
readable. Note that the coding style used in the hpp file is different from
the one in the cpp file, but fixing that should be in a separate patch since it
makes reviewing too hard.

Patch seems ok to me. Some minor remarks.
- Add some statement how the values for cv were chosen (even if it's done by
trial and error)
- I think (but I'm not sure) the startHook and cleanupHook functions are
executed in real-time, so you should avoid the use of the logger in those
- The doxygen documentation of some of the properties contains some units (eg.
shutter time), but it would be nice if the used unit would also be visible in
the property description and the cpf file, so that people can see it when using
the taskbrowser for instance

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

François Cauwe <francois [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Attachment #216 is|0 |1
obsolete| |

--- Comment #13 from François Cauwe <francois [..] ...> 2008-01-19 14:48:11 ---
Created an attachment (id=217)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=217)
updated patch for CaptureCamera component that adds V4L support with white
spaces

Because I think coding guidelines are important, I updated my patch to use
whitespaces instead of tabs.
Any further comments are welcome!

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

--- Comment #12 from François Cauwe <francois [..] ...> 2008-01-19 01:31:35 ---
(In reply to comment #10)
> (In reply to comment #7)
> > I would like to submit it in pieces, but don't know how to split a patch in a
> > non time consuming way.
>
> You can't. The "proper" way is to do fix one thing at a time (e.g by having
> multiple checkouts). No problem for this time, but it makes your patches
> _very_ hard to read and hence to review.

But you should also understand that you loose a lot of "engeneering time" doing
some bureaucratic work of splitting everything in little pieces and maintaining
5 versions, when your main target make something that works, and that is well
documented.

For this patch I would have to spit different branches, wait for commits, merge
again, make new patches, wait again for someone to commit. Well at the end you
tend to say, I don't care...

It would be easy to do if you would use a real distributed revision control
system, where I could have local commits and you could review it and at the end
pull my changes to the main branch.

>
> > > 2/ Your patch is unreadable due to indentation changes. Please fix these first
> > > or generate your patch using the diff commands I suggested on the mailinglist.
> > I generated my patch using the commands you proposed in bug #473, but it seems
> > that you ment[2] "svn diff --diff-cmd diff -x "-u -p""
> >
> > [1] http://lists.mech.kuleuven.be/pipermail/orocos-dev/2008-January/003749.html
> > [2] http://lists.mech.kuleuven.be/pipermail/orocos-dev/2008-January/003731.html
> >
>
> Indeed, but those commands are only works if your patch does _not_ change
> whitespace! So normally your patch does not comply to what Peter specified as
> the orocos coding style (I don't like it either btw :-)
> You can make your patches more readable by omitting whitespace changes in the
> patch
> svn diff --diff-cmd diff -x "-u -p -w".

I should be really nice to have a document on the website for new
developpers...
Where can I find the orocos coding style? Did I missed a part of the
documentation?
I think Orocos has a lot of good documentation, it's just sometimes hard to
find the right web page / pdf / template / ... But it aways exists somewhere :)

> BTW: Is there some documentation with with versions of opencv this was tested
> for instance?
I think there is only one version of opencv that is stable and it's the 1.0.

[Bug 492] Update CameraComponents to meet Component Guidelines

On Jan 19, 2008 1:31 AM, François Cauwe <francois [..] ...> wrote:

This discussion is completely unrelated to the bug, so I just reply to the list.

[...]
> > > I would like to submit it in pieces, but don't know how to split a patch in a
> > > non time consuming way.
> >
> > You can't. The "proper" way is to do fix one thing at a time (e.g by having
> > multiple checkouts). No problem for this time, but it makes your patches
> > _very_ hard to read and hence to review.
>
> But you should also understand that you loose a lot of "engeneering time" doing
> some bureaucratic work of splitting everything in little pieces and maintaining
> 5 versions, when your main target make something that works, and that is well
> documented.
>
> For this patch I would have to spit different branches, wait for commits, merge
> again, make new patches, wait again for someone to commit. Well at the end you
> tend to say, I don't care...

I beg to differ.
1/ We're not talking here about 5 versions here, we're talking about
one patch that does 3 things at a time.
2/ The process is a simple as simple as doing twice a SVN co, twice an
svn diff, and one svn up. I _know_ this takes somewhat longer than
doing it all at once, but that's the short term price you pay for a
long time reward. That what this process is all about.
3/ If your patches are small and clean, and according to the
guidelines, reviewing them takes 5 minutes time and they will be
committed faster
4/ We're not just talking about making _your_ application work here,
we're talking about including patches in the OCL library, which should
be a good example for people on how to create components.

The orocos project is not the linux kernel, but have you ever wondered
what kernel maintainers would do with patches that do different things
than they claim, and are full of clutter due to the fact that
submitters don't respect kernel coding style?

> It would be easy to do if you would use a real distributed revision control
> system, where I could have local commits and you could review it and at the end
> pull my changes to the main branch.

If the above actions of creating 2 checkouts already bothers you, I
think distributed rc is not something you want...

> > > > 2/ Your patch is unreadable due to indentation changes. Please fix these first
> > > > or generate your patch using the diff commands I suggested on the mailinglist.
> > > I generated my patch using the commands you proposed in bug #473, but it seems
> > > that you ment[2] "svn diff --diff-cmd diff -x "-u -p""
> > >
> > > [1] http://lists.mech.kuleuven.be/pipermail/orocos-dev/2008-January/003749.html
> > > [2] http://lists.mech.kuleuven.be/pipermail/orocos-dev/2008-January/003731.html
> > >
> >
> > Indeed, but those commands are only works if your patch does _not_ change
> > whitespace! So normally your patch does not comply to what Peter specified as
> > the orocos coding style (I don't like it either btw :-)
> > You can make your patches more readable by omitting whitespace changes in the
> > patch
> > svn diff --diff-cmd diff -x "-u -p -w".
>
> I should be really nice to have a document on the website for new
> developpers...

There is www.orocos.org/rtt-dev, but I agree it's not

> Where can I find the orocos coding style? Did I missed a part of the
> documentation?

There have been some discussions about this on the mailinglist, but I
can't find it on the website either :-( Must be in the mailinglist
archives only.

> I think Orocos has a lot of good documentation, it's just sometimes hard to
> find the right web page / pdf / template / ... But it aways exists somewhere :)
>
> > BTW: Is there some documentation with with versions of opencv this was tested
> > for instance?
> I think there is only one version of opencv that is stable and it's the 1.0.

Installed from source, or a distro package?

k

[Bug 492] Update CameraComponents to meet Component Guidelines

Op zaterdag 19-01-2008 om 13:10 uur [tijdzone +0100], schreef Klaas
Gadeyne:
> On Jan 19, 2008 1:31 AM, François Cauwe <francois [..] ...> wrote:
>
> This discussion is completely unrelated to the bug, so I just reply to the list.
>
> [...]
> > > > I would like to submit it in pieces, but don't know how to split a patch in a
> > > > non time consuming way.
> > >
> > > You can't. The "proper" way is to do fix one thing at a time (e.g by having
> > > multiple checkouts). No problem for this time, but it makes your patches
> > > _very_ hard to read and hence to review.
> >
> > But you should also understand that you loose a lot of "engeneering time" doing
> > some bureaucratic work of splitting everything in little pieces and maintaining
> > 5 versions, when your main target make something that works, and that is well
> > documented.
> >
> > For this patch I would have to spit different branches, wait for commits, merge
> > again, make new patches, wait again for someone to commit. Well at the end you
> > tend to say, I don't care...
>
> I beg to differ.
> 1/ We're not talking here about 5 versions here, we're talking about
> one patch that does 3 things at a time.
> 2/ The process is a simple as simple as doing twice a SVN co, twice an
> svn diff, and one svn up. I _know_ this takes somewhat longer than
> doing it all at once, but that's the short term price you pay for a
> long time reward. That what this process is all about.
> 3/ If your patches are small and clean, and according to the
> guidelines, reviewing them takes 5 minutes time and they will be
> committed faster
> 4/ We're not just talking about making _your_ application work here,
> we're talking about including patches in the OCL library, which should
> be a good example for people on how to create components.
>
> The orocos project is not the linux kernel, but have you ever wondered
> what kernel maintainers would do with patches that do different things
> than they claim, and are full of clutter due to the fact that
> submitters don't respect kernel coding style?

I agree about that, the title and the content of the bug was different.
It should be more less "clean up the camera component". Sorry for this
confusion, I just agreed to do it like that with Ruben.

> > It would be easy to do if you would use a real distributed revision control
> > system, where I could have local commits and you could review it and at the end
> > pull my changes to the main branch.
> If the above actions of creating 2 checkouts already bothers you, I
> think distributed rc is not something you want...
With a good use of distribute revisions control system, it's much easier
to maintain different changes, and merge then with the main tree.

> > > > > 2/ Your patch is unreadable due to indentation changes. Please fix these first
> > > > > or generate your patch using the diff commands I suggested on the mailinglist.
> > > > I generated my patch using the commands you proposed in bug #473, but it seems
> > > > that you ment[2] "svn diff --diff-cmd diff -x "-u -p""
> > > >
> > > > [1] http://lists.mech.kuleuven.be/pipermail/orocos-dev/2008-January/003749.html
> > > > [2] http://lists.mech.kuleuven.be/pipermail/orocos-dev/2008-January/003731.html
> > > >
> > >
> > > Indeed, but those commands are only works if your patch does _not_ change
> > > whitespace! So normally your patch does not comply to what Peter specified as
> > > the orocos coding style (I don't like it either btw :-)
> > > You can make your patches more readable by omitting whitespace changes in the
> > > patch
> > > svn diff --diff-cmd diff -x "-u -p -w".
> >
> > I should be really nice to have a document on the website for new
> > developpers...
>
> There is www.orocos.org/rtt-dev, but I agree it's not
>
> > Where can I find the orocos coding style? Did I missed a part of the
> > documentation?
>
> There have been some discussions about this on the mailinglist, but I
> can't find it on the website either :-( Must be in the mailinglist
> archives only.
The first time I googled it I didn't found it directly, but this time I
found it:
you mean this?
http://lists.mech.kuleuven.be/pipermail/orocos/2001-September/000168.html

> > I think Orocos has a lot of good documentation, it's just sometimes hard to
> > find the right web page / pdf / template / ... But it aways exists somewhere :)
> >
> > > BTW: Is there some documentation with with versions of opencv this was tested
> > > for instance?
> > I think there is only one version of opencv that is stable and it's the 1.0.
>
> Installed from source, or a distro package?

The ubuntu distro package, so that other users can easily reuse
everything by installing orocos and opencv with apt-get install.

Thanks for the feedback!

François

[Bug 492] Update CameraComponents to meet Component Guidelines

On Jan 19, 2008 2:10 PM, François Cauwe <francois [..] ...> wrote:
[...]
> > > Where can I find the orocos coding style? Did I missed a part of the
> > > documentation?
> >
> > There have been some discussions about this on the mailinglist, but I
> > can't find it on the website either :-( Must be in the mailinglist
> > archives only.
> The first time I googled it I didn't found it directly, but this time I
> found it:
> you mean this?
> http://lists.mech.kuleuven.be/pipermail/orocos/2001-September/000168.html

Yes, and


for .emacs and vi startup code

Even better, from

I just recall that the coding style document is part of the trunk/rtt/
tree. See doc/coding_style.txt

I'll add this info to the pages describing the result of the
discussion about code quality.

Klaas

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

--- Comment #11 from Klaas Gadeyne <klaas [dot] gadeyne [..] ...> 2008-01-19 00:17:25 ---
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #1)
> > > Created an attachment (id=210)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=210) [details] [details] [details]
> > > patch for CaptureCamera component
> > >
> > > A first patch from Francois Cauwe that updates the CaptureCamera component to
> > > RTT 1.4, and make it work again.
> >
> > Thx for your patch! Remarks inline...
> >
> > - PeriodicActivity cameraTask(0,0.2, camera.engine() );
> > + PeriodicActivity cameraTask(0,0.01, camera.engine() );
> >
> > I fail to see what this change of frequency has to do with RTT 1.4 compliance?
> >
> > [...]
> > IplImage* _empty;
> > +
> > bool _update;
> > };
> >
> > Please keep whitespace changes for separate patches
> >
> > }//namespace
> > Index: CMakeLists.txt
> > ===================================================================
> > --- CMakeLists.txt (revision 28821)
> > +++ CMakeLists.txt (working copy)
> > @@ -11,12 +11,12 @@
> >
> > GLOBAL_ADD_COMPONENT( orocos-camera ${SRCS} )
> > GLOBAL_ADD_INCLUDE( ocl ${HPPS})
> > - COMPONENT_ADD_LIBS( orocos-camera ${OpenCV_LIBRARIES}
> > - ${GTHREAD_LIBS} ${GTK_LIBS}
> > - jpeg
> > - raw1394
> > - dc1394_control
> > - avcodec
> > - avformat)
> > -
> > + COMPONENT_ADD_LIBS( orocos-camera ${OpenCV_LIBRARIES})
> > +# ${GTHREAD_LIBS} ${GTK_LIBS}
> > +# jpeg
> > +# raw1394
> > +# dc1394_control
> > +# avcodec
> > +# avformat)
> > +#
> >
> > What's the rationale behind omitting these libraries and what's the link with
> > RTT 1.4?
>
> These libraries are linked in dynamically. There is no direct link with RTT
> 1.4 but do you suggest we create a bug for all these kind of changes or just
> commit them using our "common sense".
>
> > Index: CaptureCamera.cpp
> > ===================================================================
> > --- CaptureCamera.cpp (revision 28821)
> > +++ CaptureCamera.cpp (working copy)
> > @@ -45,7 +45,6 @@
> >
> > this->ports()->addPort(&_image);
> > this->ports()->addPort(&_capture_time);
> > - _empty = cvCreateImage(cvSize(640,480),8,3);
> > //Adding Properties
> > //=================
> > this->properties()->addProperty( &_capture_mode );
> > @@ -65,7 +64,7 @@
> >
> > CaptureCamera::~CaptureCamera()
> > {
> > - cvReleaseImage(&_empty);
> > + //cvReleaseImage(_empty);
> > }
> >
> > You better remove the line if you removed it above
> >
> > bool CaptureCamera::startup()
> > @@ -94,15 +93,14 @@
> > //Initialize dataflow
> > //===================
> > _capture_time.Set(TimeService::Instance()->ticksGet());
> > - _image.Set(*cvQueryFrame(_capture));
> > +
> > + _empty=cvQueryFrame(_capture);
> > + _image.Set(*_empty);
> > if(_show_image.value()){
> > - cvNamedWindow(_image.getName().c_str(),CV_WINDOW_AUTOSIZE);
> > - cvShowImage(_image.getName().c_str(),&_empty);
> > - cvWaitKey(3);
> > - cvShowImage(_image.getName().c_str(),&_empty);
> > - cvWaitKey(3);
> > + cvNamedWindow(_image.getName().c_str(),CV_WINDOW_AUTOSIZE);
> > + cvShowImage(_image.getName().c_str(),_empty);
> > + cvWaitKey(3);
> >
> > Note the magic number...
>
> It's really a magic number ;), 1 or 2 does not work, 3 did the trick. Maybe we
> should add some comment about why it's a magic number.

Indeed :-)

> > General remark:
> > Does this patch real only fixes compliance with RTT 1.4 as stated?
> >
>
> No, not even that. it only made it work again. Some "wmeeusse" did some changes
> that broke the code. It compiled, but it did not work anymore.
>
> This patch only fixed the basic working of the code without making it
> deployable or changing the old "startup"-etc hooks into the RTT-1.4's
> "startHook" etc.
>
> But because i would like to use svn in it's full power i do not like big
> patches that take a long time to create but commit small changes and do not
> risk to loose some code along the way.

I fully agree. That's why I even think that this patch should have been split.

> The next patch should have been cut into 2 pieces. One that added the
> deployment abilities and configuration. And a second one that added the V4L
> support.
>

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

--- Comment #10 from Klaas Gadeyne <klaas [dot] gadeyne [..] ...> 2008-01-19 00:13:06 ---
(In reply to comment #7)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > Created an attachment (id=213)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=213) [details] [details] [details]
> > > patch for CaptureCamera component that adds V4L support
>
> [...]
>
> > > All feedback is welcome.
> >
> > 1/ I think (most parts of) this patch belongs in another bug report? Support
> > for another driver is not something that falls under "meet OCL requirements".
> The thing is that I updated the component for my requirements and in meantime
> bye reading some docs I also ported the component to RTT 1.4 following the mail
> of Peter [1].
> I would like to submit it in pieces, but don't know how to split a patch in a
> non time consuming way.

You can't. The "proper" way is to do fix one thing at a time (e.g by having
multiple checkouts). No problem for this time, but it makes your patches
_very_ hard to read and hence to review.

> > 2/ Your patch is unreadable due to indentation changes. Please fix these first
> > or generate your patch using the diff commands I suggested on the mailinglist.
> I generated my patch using the commands you proposed in bug #473, but it seems
> that you ment[2] "svn diff --diff-cmd diff -x "-u -p""
>
> [1] http://lists.mech.kuleuven.be/pipermail/orocos-dev/2008-January/003749.html
> [2] http://lists.mech.kuleuven.be/pipermail/orocos-dev/2008-January/003731.html
>

Indeed, but those commands are only works if your patch does _not_ change
whitespace! So normally your patch does not comply to what Peter specified as
the orocos coding style (I don't like it either btw :-)
You can make your patches more readable by omitting whitespace changes in the
patch
svn diff --diff-cmd diff -x "-u -p -w".

BTW: Is there some documentation with with versions of opencv this was tested
for instance?

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

--- Comment #9 from François Cauwe <francois [..] ...> 2008-01-18 21:51:08 ---
(In reply to comment #5)
> (In reply to comment #1)
> > Created an attachment (id=210)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=210) [details] [details]
> > patch for CaptureCamera component
> >
> > A first patch from Francois Cauwe that updates the CaptureCamera component to
> > RTT 1.4, and make it work again.
>
> Thx for your patch! Remarks inline...
>
> - PeriodicActivity cameraTask(0,0.2, camera.engine() );
> + PeriodicActivity cameraTask(0,0.01, camera.engine() );
>
> I fail to see what this change of frequency has to do with RTT 1.4 compliance?
>
> [...]
> IplImage* _empty;
> +
> bool _update;
> };
>
> Please keep whitespace changes for separate patches
>
> }//namespace
> Index: CMakeLists.txt
> ===================================================================
> --- CMakeLists.txt (revision 28821)
> +++ CMakeLists.txt (working copy)
> @@ -11,12 +11,12 @@
>
> GLOBAL_ADD_COMPONENT( orocos-camera ${SRCS} )
> GLOBAL_ADD_INCLUDE( ocl ${HPPS})
> - COMPONENT_ADD_LIBS( orocos-camera ${OpenCV_LIBRARIES}
> - ${GTHREAD_LIBS} ${GTK_LIBS}
> - jpeg
> - raw1394
> - dc1394_control
> - avcodec
> - avformat)
> -
> + COMPONENT_ADD_LIBS( orocos-camera ${OpenCV_LIBRARIES})
> +# ${GTHREAD_LIBS} ${GTK_LIBS}
> +# jpeg
> +# raw1394
> +# dc1394_control
> +# avcodec
> +# avformat)
> +#
>
> What's the rationale behind omitting these libraries and what's the link with
> RTT 1.4?

I think these lines where needed with self compiled versions of opencv and/or
with a old version of FindOpencv.cmake . Now the latest opencv has a package
config file that take care of these dependencies.

> General remark:
> Does this patch real only fixes compliance with RTT 1.4 as stated?

Maybe we should change the bug title to "Update CaptureCamera component" ;)
But I think the end goal of this bug is correctly stated.

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

François Cauwe <francois [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Attachment #213 is|0 |1
obsolete| |

--- Comment #8 from François Cauwe <francois [..] ...> 2008-01-18 21:41:22 ---
Created an attachment (id=216)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=216)
updated patch for CaptureCamera component that adds V4L support

Patch generated with the "svn diff --diff-cmd diff -x "-u -p"" command.

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

François Cauwe <francois [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
CC| |francois [..] ...

--- Comment #7 from François Cauwe <francois [..] ...> 2008-01-18 21:40:04 ---
(In reply to comment #4)
> (In reply to comment #3)
> > Created an attachment (id=213)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=213) [details] [details]
> > patch for CaptureCamera component that adds V4L support

[...]

> > All feedback is welcome.
>
> 1/ I think (most parts of) this patch belongs in another bug report? Support
> for another driver is not something that falls under "meet OCL requirements".
The thing is that I updated the component for my requirements and in meantime
bye reading some docs I also ported the component to RTT 1.4 following the mail
of Peter [1].
I would like to submit it in pieces, but don't know how to split a patch in a
non time consuming way.

> 2/ Your patch is unreadable due to indentation changes. Please fix these first
> or generate your patch using the diff commands I suggested on the mailinglist.
I generated my patch using the commands you proposed in bug #473, but it seems
that you ment[2] "svn diff --diff-cmd diff -x "-u -p""

[1] http://lists.mech.kuleuven.be/pipermail/orocos-dev/2008-January/003749.html
[2] http://lists.mech.kuleuven.be/pipermail/orocos-dev/2008-January/003731.html

Ruben Smits's picture

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

--- Comment #6 from Ruben Smits <ruben [dot] smits [..] ...> 2008-01-18 20:47:47 ---
(In reply to comment #5)
> (In reply to comment #1)
> > Created an attachment (id=210)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=210) [details] [details]
> > patch for CaptureCamera component
> >
> > A first patch from Francois Cauwe that updates the CaptureCamera component to
> > RTT 1.4, and make it work again.
>
> Thx for your patch! Remarks inline...
>
> - PeriodicActivity cameraTask(0,0.2, camera.engine() );
> + PeriodicActivity cameraTask(0,0.01, camera.engine() );
>
> I fail to see what this change of frequency has to do with RTT 1.4 compliance?
>
> [...]
> IplImage* _empty;
> +
> bool _update;
> };
>
> Please keep whitespace changes for separate patches
>
> }//namespace
> Index: CMakeLists.txt
> ===================================================================
> --- CMakeLists.txt (revision 28821)
> +++ CMakeLists.txt (working copy)
> @@ -11,12 +11,12 @@
>
> GLOBAL_ADD_COMPONENT( orocos-camera ${SRCS} )
> GLOBAL_ADD_INCLUDE( ocl ${HPPS})
> - COMPONENT_ADD_LIBS( orocos-camera ${OpenCV_LIBRARIES}
> - ${GTHREAD_LIBS} ${GTK_LIBS}
> - jpeg
> - raw1394
> - dc1394_control
> - avcodec
> - avformat)
> -
> + COMPONENT_ADD_LIBS( orocos-camera ${OpenCV_LIBRARIES})
> +# ${GTHREAD_LIBS} ${GTK_LIBS}
> +# jpeg
> +# raw1394
> +# dc1394_control
> +# avcodec
> +# avformat)
> +#
>
> What's the rationale behind omitting these libraries and what's the link with
> RTT 1.4?

These libraries are linked in dynamically. There is no direct link with RTT
1.4 but do you suggest we create a bug for all these kind of changes or just
commit them using our "common sense".

> Index: CaptureCamera.cpp
> ===================================================================
> --- CaptureCamera.cpp (revision 28821)
> +++ CaptureCamera.cpp (working copy)
> @@ -45,7 +45,6 @@
>
> this->ports()->addPort(&_image);
> this->ports()->addPort(&_capture_time);
> - _empty = cvCreateImage(cvSize(640,480),8,3);
> //Adding Properties
> //=================
> this->properties()->addProperty( &_capture_mode );
> @@ -65,7 +64,7 @@
>
> CaptureCamera::~CaptureCamera()
> {
> - cvReleaseImage(&_empty);
> + //cvReleaseImage(_empty);
> }
>
> You better remove the line if you removed it above
>
> bool CaptureCamera::startup()
> @@ -94,15 +93,14 @@
> //Initialize dataflow
> //===================
> _capture_time.Set(TimeService::Instance()->ticksGet());
> - _image.Set(*cvQueryFrame(_capture));
> +
> + _empty=cvQueryFrame(_capture);
> + _image.Set(*_empty);
> if(_show_image.value()){
> - cvNamedWindow(_image.getName().c_str(),CV_WINDOW_AUTOSIZE);
> - cvShowImage(_image.getName().c_str(),&_empty);
> - cvWaitKey(3);
> - cvShowImage(_image.getName().c_str(),&_empty);
> - cvWaitKey(3);
> + cvNamedWindow(_image.getName().c_str(),CV_WINDOW_AUTOSIZE);
> + cvShowImage(_image.getName().c_str(),_empty);
> + cvWaitKey(3);
>
> Note the magic number...

It's really a magic number ;), 1 or 2 does not work, 3 did the trick. Maybe we
should add some comment about why it's a magic number.

> General remark:
> Does this patch real only fixes compliance with RTT 1.4 as stated?
>

No, not even that. it only made it work again. Some "wmeeusse" did some changes
that broke the code. It compiled, but it did not work anymore.

This patch only fixed the basic working of the code without making it
deployable or changing the old "startup"-etc hooks into the RTT-1.4's
"startHook" etc.

But because i would like to use svn in it's full power i do not like big
patches that take a long time to create but commit small changes and do not
risk to loose some code along the way.

The next patch should have been cut into 2 pieces. One that added the
deployment abilities and configuration. And a second one that added the V4L
support.

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

--- Comment #5 from Klaas Gadeyne <klaas [dot] gadeyne [..] ...> 2008-01-18 17:54:48 ---
(In reply to comment #1)
> Created an attachment (id=210)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=210) [details]
> patch for CaptureCamera component
>
> A first patch from Francois Cauwe that updates the CaptureCamera component to
> RTT 1.4, and make it work again.

Thx for your patch! Remarks inline...

- PeriodicActivity cameraTask(0,0.2, camera.engine() );
+ PeriodicActivity cameraTask(0,0.01, camera.engine() );

I fail to see what this change of frequency has to do with RTT 1.4 compliance?

[...]
IplImage* _empty;
+
bool _update;
};

Please keep whitespace changes for separate patches

}//namespace
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 28821)
+++ CMakeLists.txt (working copy)
@@ -11,12 +11,12 @@

GLOBAL_ADD_COMPONENT( orocos-camera ${SRCS} )
GLOBAL_ADD_INCLUDE( ocl ${HPPS})
- COMPONENT_ADD_LIBS( orocos-camera ${OpenCV_LIBRARIES}
- ${GTHREAD_LIBS} ${GTK_LIBS}
- jpeg
- raw1394
- dc1394_control
- avcodec
- avformat)
-
+ COMPONENT_ADD_LIBS( orocos-camera ${OpenCV_LIBRARIES})
+# ${GTHREAD_LIBS} ${GTK_LIBS}
+# jpeg
+# raw1394
+# dc1394_control
+# avcodec
+# avformat)
+#

What's the rationale behind omitting these libraries and what's the link with
RTT 1.4?

Index: CaptureCamera.cpp
===================================================================
--- CaptureCamera.cpp (revision 28821)
+++ CaptureCamera.cpp (working copy)
@@ -45,7 +45,6 @@

this->ports()->addPort(&_image);
this->ports()->addPort(&_capture_time);
- _empty = cvCreateImage(cvSize(640,480),8,3);
//Adding Properties
//=================
this->properties()->addProperty( &_capture_mode );
@@ -65,7 +64,7 @@

CaptureCamera::~CaptureCamera()
{
- cvReleaseImage(&_empty);
+ //cvReleaseImage(_empty);
}

You better remove the line if you removed it above

bool CaptureCamera::startup()
@@ -94,15 +93,14 @@
//Initialize dataflow
//===================
_capture_time.Set(TimeService::Instance()->ticksGet());
- _image.Set(*cvQueryFrame(_capture));
+
+ _empty=cvQueryFrame(_capture);
+ _image.Set(*_empty);
if(_show_image.value()){
- cvNamedWindow(_image.getName().c_str(),CV_WINDOW_AUTOSIZE);
- cvShowImage(_image.getName().c_str(),&_empty);
- cvWaitKey(3);
- cvShowImage(_image.getName().c_str(),&_empty);
- cvWaitKey(3);
+ cvNamedWindow(_image.getName().c_str(),CV_WINDOW_AUTOSIZE);
+ cvShowImage(_image.getName().c_str(),_empty);
+ cvWaitKey(3);

Note the magic number...

General remark:
Does this patch real only fixes compliance with RTT 1.4 as stated?

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

Klaas Gadeyne <klaas [dot] gadeyne [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
CC| |klaas [dot] gadeyne [..] ...

--- Comment #4 from Klaas Gadeyne <klaas [dot] gadeyne [..] ...> 2008-01-18 17:45:07 ---
(In reply to comment #3)
> Created an attachment (id=213)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=213) [details]
> patch for CaptureCamera component that adds V4L support
>
> This includes:
> * Support for 'v4l' video driver, and possible other video drivers such as
> ffmpeg (for simulation).
> * Ports the camera component to RTT 1.4, and make it deployable.
> * Adds the possibility to change camera settings.
> * Puts the CameraCapture in Error state when it's not possible to grab a new
> frame
> * Reports a lot more warnings.
>
> Todo list:
> * More docs
> * Make certain values unchangeable
>
> All feedback is welcome.

1/ I think (most parts of) this patch belongs in another bug report? Support
for another driver is not something that falls under "meet OCL requirements".
2/ Your patch is unreadable due to indentation changes. Please fix these first
or generate your patch using the diff commands I suggested on the mailinglist.

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

--- Comment #3 from François Cauwe <francois [..] ...> 2008-01-18 16:46:18 ---
Created an attachment (id=213)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=213)
patch for CaptureCamera component that adds V4L support

This includes:
* Support for 'v4l' video driver, and possible other video drivers such as
ffmpeg (for simulation).
* Ports the camera component to RTT 1.4, and make it deployable.
* Adds the possibility to change camera settings.
* Puts the CameraCapture in Error state when it's not possible to grab a new
frame
* Reports a lot more warnings.

Todo list:
* More docs
* Make certain values unchangeable

All feedback is welcome.

Ruben Smits's picture

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

--- Comment #2 from Ruben Smits <ruben [dot] smits [..] ...> 2008-01-18 14:47:51 ---
svn ci -m "Makes the CaptureCamera component work again with RTT 1.4, applying
patch 210 for bug 492"
Sending camera/CMakeLists.txt
Sending camera/CaptureCamera.cpp
Sending camera/CaptureCamera.hpp
Sending camera/tests/main.cpp
Transmitting file data ....
Committed revision 28843.

Ruben Smits's picture

[Bug 492] Update CameraComponents to meet Component Guidelines

For more infomation about this bug, visit

Ruben Smits <ruben [dot] smits [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|orocos- |ruben [dot] smits [..] ...
|dev [..] ... |

--- Comment #1 from Ruben Smits <ruben [dot] smits [..] ...> 2008-01-18 14:43:40 ---
Created an attachment (id=210)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=210)
patch for CaptureCamera component

A first patch from Francois Cauwe that updates the CaptureCamera component to
RTT 1.4, and make it work again.

Ruben