axis_camera
axis_camera copied to clipboard
camera_info not published (self is missing when getting a member value)
bug in axis.py line 128: cimsg.header.stamp = msg.header.stamp // (exception is thrown here!) should read cimsg.header.stamp = self.msg.header.stamp
This is true, but that function is not actually called from anywhere, I don't think. How are you triggering the problem?
Hi, true :) I completely forgot that I actually added an explicit call to it, after publishMsg() is invoked after line 75 I added: self.publishCameraInfoMsg() Without it the bug would never manifest itself
Publishing camera_info is useful if you want to get a rectified image e.g. using image_proc package (it needs /axis/image_raw and /axis/camera_info topics)
To get an uncompressed image at /axis/image_raw I run ROS_NAMESPACE=axis rosrun image_transport republish compressed in:=image_raw raw out:=image_raw
Best, Marcin
On Thu, Nov 27, 2014 at 1:12 PM, Mike Purvis [email protected] wrote:
This is true, but that function is not actually called from anywhere, I don't think. How are you triggering the problem?
— Reply to this email directly or view it on GitHub https://github.com/clearpathrobotics/axis_camera/issues/30#issuecomment-64782957 .
Would you consider submitting a PR which more comprehensively enables camera calibration, and includes as part of it a bugfix for this issue?
Sure, I'll try to do it during the weekend, actually I derived a bit more general script, which could work with any mjpeg stream in particular with http vlc stream (which can in turn transcode any input stream into http mjpeg). That may not be the most effective way, but effectively you can even stream from rtsp servers, video files etc.
Best, Marcin
On Thu, Nov 27, 2014 at 2:58 PM, Mike Purvis [email protected] wrote:
Would you consider submitting a PR which more comprehensively enables camera calibration, and includes as part of it a bugfix for this issue?
— Reply to this email directly or view it on GitHub https://github.com/clearpathrobotics/axis_camera/issues/30#issuecomment-64793250 .
Hi all,
As a side note, there is a working patch for gstreamer and mjpeg stream (it must be in this discussion thread somewhere).
I've found it to be the less CPU intensive on small cpus (e.g. atom)
HTH
Cedric, mobile, big-thumbed and concise On Dec 4, 2014 5:40 PM, "mmllee" [email protected] wrote:
Sure, I'll try to do it during the weekend, actually I derived a bit more general script, which could work with any mjpeg stream in particular with http vlc stream (which can in turn transcode any input stream into http mjpeg). That may not be the most effective way, but effectively you can even stream from rtsp servers, video files etc.
Best, Marcin
On Thu, Nov 27, 2014 at 2:58 PM, Mike Purvis [email protected] wrote:
Would you consider submitting a PR which more comprehensively enables camera calibration, and includes as part of it a bugfix for this issue?
— Reply to this email directly or view it on GitHub < https://github.com/clearpathrobotics/axis_camera/issues/30#issuecomment-64793250>
.
— Reply to this email directly or view it on GitHub https://github.com/clearpathrobotics/axis_camera/issues/30#issuecomment-65661126 .
@cedricpradalier When I was trying to spruce this driver up in July, I added a launchfile which uses gscam instead of the built-in driver: https://github.com/clearpathrobotics/axis_camera/blob/master/launch/axis_gscam.launch
Unfortunately, I had enough problems with it that I wasn't content to recommend that approach as the default. I don't recall now what all went wrong, but it was fiddly to get working and would be difficult to deploy as a deb without cooperation from some upstream maintainers.
This is very true. The really good http package is not in the default repositories (not sure why) and the gscam package does not publish jpeg (compressed) object by default. That being said, it manages connection in a smoother more reliable way and uses way less CPU than the python driver (or the default http client of gstreamer).
I'd recommend that only for people with a very tight processing budget (such as the kingfisher, in my case). In our case, it has recorded close to 2 million images so far, so I find it quite reliable after my finetuning.
Regards.
On Thu, Dec 4, 2014 at 8:24 PM, Mike Purvis [email protected] wrote:
@cedricpradalier https://github.com/cedricpradalier When I was trying to spruce this driver up in July, I added a launchfile which uses gscam instead of the built-in driver: https://github.com/clearpathrobotics/axis_camera/blob/master/launch/axis_gscam.launch
Unfortunately, I had enough problems with it that I wasn't content to recommend that approach as the default. I don't recall now what all went wrong, but it was fiddly to get working and would be difficult to deploy as a deb without cooperation from some upstream maintainers.
— Reply to this email directly or view it on GitHub https://github.com/clearpathrobotics/axis_camera/issues/30#issuecomment-65687386 .
Cedric Pradalier
Hi all, I solved this issue. You have put these lines into the axis.py:
- in "publishFramesContinuously(self):" put .... self.publishMsg() self.publishCameraInfoMsg() ..... -in "publishCameraInfoMsg(self):" put .... cimsg = self.axis.cinfo.getCameraInfo() #SUB #cimsg.header.stamp = msg.header.stamp #SUB cimsg.header.stamp =self. msg.header.stamp #ADD cimsg.header.frame_id = self.axis.frame_id cimsg.width = self.axis.width cimsg.height = self.axis.height self.axis.caminfo_pub.publish(cimsg) #ADD ..... Now the camera_info topic is rightly published
Regard, Alessandro
The issue is not very related to its tittle anymore. It's an interesting discussion tho. If anyone makes a PR to fix the camera_info stuff I would be glad to give it a try and merge.
@alexcordella: can you render your previous message in some more-readable form?
I submitted a pull request to fix this issue. #38 implements what was originally being discussed and what @alexcordella was describing.
Open axis.py: 1- Function "publishFramesContinuously(self):" put .... self.publishMsg() self.publishCameraInfoMsg() ..... 2- Function "publishCameraInfoMsg(self):" put .... cimsg = self.axis.cinfo.getCameraInfo() #cimsg.header.stamp = msg.header.stamp cimsg.header.stamp =self.msg.header.stamp cimsg.header.frame_id = self.axis.frame_id cimsg.width = self.axis.width cimsg.height = self.axis.height self.axis.caminfo_pub.publish(cimsg) ....
Now the camera_info topic is rightly published. Let me know if now is readable.
I agree with this fix, just worked for me. Makes callibration much more feasible to use now.
Also worked for me