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

Camera calibration file ERROR #2

Closed
harke opened this issue Nov 27, 2012 · 11 comments
Closed

Camera calibration file ERROR #2

harke opened this issue Nov 27, 2012 · 11 comments

Comments

@harke
Copy link

harke commented Nov 27, 2012

Hi,
When I launch the track.launch file I have a problem with the camera calibration file and it can not see the window with the front camera video. I am able to send commands from my PS3 controller and I can see the window with the battery level. Has somebody any idea how to solve the problem with the camera calibration file. The output of the tracker.launch is given below.

[ERROR] [1354020767.039146310]: Unable to open camera calibration file [/home/aga/.ros/camera_info/ardrone_front.yaml]

[ERROR] [1354020767.039304102]: Unable to open camera calibration file [/home/aga/.ros/camera_info/ardrone_bottom.yaml]

Thanks!

@sameerparekh
Copy link
Contributor

Hi Harke-- the camera calibration error is most likely not your problem. Whenever I launch I get that error as well, and it works fine. The node that displays the window is the same one that accepts commands from your PS3 controller, so it must be running ok. My first guess is that maybe your highgui/opencv installation is not working properly with your display. Are you able to run other opencv python scripts with highgui?

On Tuesday, November 27, 2012 at 8:09 AM, harke wrote:

Hi,
When I launch the track.launch file I have a problem with the camera calibration file and it can not see the window with the front camera video. I am able to send commands from my PS3 controller and I can see the window with the battery level. Has somebody any idea how to solve the problem with the camera calibration file. The output of the tracker.launch is given below.
[ERROR] [1354020767.039146310]: Unable to open camera calibration file [/home/aga/.ros/camera_info/ardrone_front.yaml]
[ERROR] [1354020767.039304102]: Unable to open camera calibration file [/home/aga/.ros/camera_info/ardrone_bottom.yaml]
Thanks!


Reply to this email directly or view it on GitHub (#2).

@harke
Copy link
Author

harke commented Nov 27, 2012

ahh maybe the reason is that I am starting separated joystick node rosrun ps3joy ps3joy.py
If I start the track.launch without starting first rosrun ps3joy ps3joy.py I get and error.
[ERROR] [1354022368.125870784]: Couldn't open joystick /dev/input/js0. Will retry every second..
and after starting rosrun ps3joy ps3joy.py when I look to the /dev/input/ my joystick is listed as js0.

@sameerparekh
Copy link
Contributor

I don't think that would prevent the tracking front camera window from showing up. The track.launch file doesn't launch ps3joy.py because I use the PS3 gamepad directly connected over USB, not over bluetooth. I haven't been able to get the PS3 gamepad to work over bluetooth actually. So I think you do need to run ps3joy.py if you are using bluetooth. Maybe it is being hidden by the battery percent window?

-s

On Tuesday, November 27, 2012 at 8:28 AM, harke wrote:

ahh maybe the reason is that I am starting separated joystick node rosrun ps3joy ps3joy.py
If I start the track.launch without starting first rosrun ps3joy ps3joy.py I get and error.
[ERROR] [1354022368.125870784]: Couldn't open joystick /dev/input/js0. Will retry every second..
and after starting rosrun ps3joy ps3joy.py when I look to the /dev/input/ my joystick is listed as js0.


Reply to this email directly or view it on GitHub (#2 (comment)).

@harke
Copy link
Author

harke commented Nov 27, 2012

I have manage now to use the joystick defined like in the track.launch with the usb cable. But still have the same problem like before can not see the video streaming (it is not hidden by the battery percent window, I looked behind :D Should the highgui be properly working if I am able to run rosrun image_view image_view image:=/ardrone/front/image_raw in this case I get the video streaming of course just the raw image no other functionalities. Do you have any idea how to get your video window?

@sameerparekh
Copy link
Contributor

I'm not really sure off the top of my head, unfortunately.

One thing you can try to see if the tracking is even working is to run

rosrun image_view image_view image:=/ardrone_tracker/image

after you've launched track.launch. That won't give you everything that the image view that the control node pops up but it should give you the yellow box around the target and the lbp and lk tracking timers on the screen.

-s

On Tuesday, November 27, 2012 at 8:47 AM, harke wrote:

I have manage now to use the joystick defined like in the track.launch with the usb cable. But still have the same problem like before can not see the video streaming (it is not hidden by the battery percent window, I looked behind :D I did not run any highgui programs. Do you have any suggestion what is the simplest way to try it?


Reply to this email directly or view it on GitHub (#2 (comment)).

@harke
Copy link
Author

harke commented Nov 28, 2012

yes, the /ardrone_tracker/image works, it streams video, but still the same problem when I launch the track.launch. I do not have any idea :(

@harke
Copy link
Author

harke commented Nov 28, 2012

I did not say it before but I have lot of exeption when I run the track.launch file. Could this be a reason?

aga@aga:~/fuerte_workspace/ardrone_ros/ardrone_ros_pkg/trunk/launch$ roslaunch track.launch
... logging to /home/aga/.ros/log/25ec1c94-3948-11e2-881c-e8e0b7a8db5f/roslaunch-aga-3025.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://aga:41902/

SUMMARY

PARAMETERS

  • /ardrone_tracker/cascadefile
  • /joy_node/dev
  • /rosdistro
  • /rosversion

NODES
/
ardrone_control (falkor_ardrone/ardrone_control.py)
ardrone_driver (ardrone_autonomy/ardrone_driver)
ardrone_follow (falkor_ardrone/ardrone_follow.py)
ardrone_tracker (falkor_ardrone/ardrone_tracker.py)
joy_node (joy/joy_node)
plot_battery (rxtools/rxplot)

auto-starting new master
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[master]: started with pid [3050]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 25ec1c94-3948-11e2-881c-e8e0b7a8db5f
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[rosout-1]: started with pid [3063]
started core service [/rosout]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[ardrone_driver-2]: started with pid [3075]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[ardrone_tracker-3]: started with pid [3076]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[ardrone_follow-4]: started with pid [3077]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[ardrone_control-5]: started with pid [3078]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[joy_node-6]: started with pid [3081]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[plot_battery-7]: started with pid [3106]
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
self.run()
File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/timer.py", line 194, in run
self._callback(TimerEvent(last_expected, last_real, current_expected, current_real, last_duration))
File "/home/aga/fuerte_workspace/falkor_ardrone/nodes/ardrone_follow.py", line 256, in timer_cb
self.setLedAnim( 0, 2 )
File "/home/aga/fuerte_workspace/falkor_ardrone/nodes/ardrone_follow.py", line 164, in setLedAnim
self.led_service( type = animType, freq = freq, duration = 255 )
File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 432, in call
return self.call(_args, *_kwds)
File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 492, in call
service_uri = self._get_service_uri(request)
File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 460, in _get_service_uri
raise ServiceException("service [%s] unavailable"%self.resolved_name)
ServiceException: service [/ardrone/setledanimation] unavailable

WARNING: topic [/ardrone/navdata/batteryPercent] does not appear to be published yet
[ERROR] [1354099290.951335790]: Unable to open camera calibration file [/home/aga/.ros/camera_info/ardrone_front.yaml]
[ERROR] [1354099290.951888503]: Unable to open camera calibration file [/home/aga/.ros/camera_info/ardrone_bottom.yaml]

@sameerparekh
Copy link
Contributor

aha! Thanks. So these exceptions you can ignore: (some sort of python bug, according to answers.ros.org)

Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored
process[ardrone_driver-2]: started with pid [3075]
But this exception:

Exception in thread Thread-3:

Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in bootstrap_inner
self.run()
File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/timer.py", line 194, in run
self._callback(TimerEvent(last_expected, last_real, current_expected, current_real, last_duration))
File "/home/aga/fuerte_workspace/falkor_ardrone/nodes/ardrone_follow.py", line 256, in timer_cb
self.setLedAnim( 0, 2 )
File "/home/aga/fuerte_workspace/falkor_ardrone/nodes/ardrone_follow.py", line 164, in setLedAnim
self.led_service( type = animType, freq = freq, duration = 255 )
File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 432, in __call
return self.call(_args, *_kwds)
File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 492, in call
service_uri = self._get_service_uri(request)
File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 460, in _get_service_uri
raise ServiceException("service [%s] unavailable"%self.resolved_name)
ServiceException: service [/ardrone/setledanimation] unavailable
Means that the follow node tried to start up before the ardrone_driver node was done initializing. I've fixed that recently, get the latest version from github, that should fix it.

It's frustrating that there are so many ignorable exceptions, it is hard to find the problematic ones.

On Wednesday, November 28, 2012 at 5:43 AM, harke wrote:

I did not say it before but I have lot of exeption when I run the track.launch file. Could this be a reason?
aga@aga:~/fuerte_workspace/ardrone_ros/ardrone_ros_pkg/trunk/launch$ roslaunch track.launch
... logging to /home/aga/.ros/log/25ec1c94-3948-11e2-881c-e8e0b7a8db5f/roslaunch-aga-3025.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://aga:41902/
SUMMARY
PARAMETERS
/ardrone_tracker/cascadefile
/joy_node/dev
/rosdistro
/rosversion

NODES
/
ardrone_control (falkor_ardrone/ardrone_control.py)
ardrone_driver (ardrone_autonomy/ardrone_driver)
ardrone_follow (falkor_ardrone/ardrone_follow.py)
ardrone_tracker (falkor_ardrone/ardrone_tracker.py)
joy_node (joy/joy_node)
plot_battery (rxtools/rxplot)
auto-starting new master
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored
process[master]: started with pid [3050]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 25ec1c94-3948-11e2-881c-e8e0b7a8db5f
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored
process[rosout-1]: started with pid [3063]
started core service [/rosout]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored
process[ardrone_driver-2]: started with pid [3075]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored
process[ardrone_tracker-3]: started with pid [3076]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored
process[ardrone_follow-4]: started with pid [3077]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored
process[ardrone_control-5]: started with pid [3078]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored
process[joy_node-6]: started with pid [3081]
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in ignored
process[plot_battery-7]: started with pid [3106]
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 551, in bootstrap_inner
self.run()
File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/timer.py", line 194, in run
self._callback(TimerEvent(last_expected, last_real, current_expected, current_real, last_duration))
File "/home/aga/fuerte_workspace/falkor_ardrone/nodes/ardrone_follow.py", line 256, in timer_cb
self.setLedAnim( 0, 2 )
File "/home/aga/fuerte_workspace/falkor_ardrone/nodes/ardrone_follow.py", line 164, in setLedAnim
self.led_service( type = animType, freq = freq, duration = 255 )
File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 432, in __call
return self.call(_args, *_kwds)
File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 492, in call
service_uri = self._get_service_uri(request)
File "/opt/ros/fuerte/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 460, in _get_service_uri
raise ServiceException("service [%s] unavailable"%self.resolved_name)
ServiceException: service [/ardrone/setledanimation] unavailable
WARNING: topic [/ardrone/navdata/batteryPercent] does not appear to be published yet
[ERROR] [1354099290.951335790]: Unable to open camera calibration file [/home/aga/.ros/camera_info/ardrone_front.yaml]
[ERROR] [1354099290.951888503]: Unable to open camera calibration file [/home/aga/.ros/camera_info/ardrone_bottom.yaml]


Reply to this email directly or view it on GitHub (#2 (comment)).

@harke
Copy link
Author

harke commented Nov 28, 2012

Thanks the last version work :) Could I please ask two question more, let say if I would like to follow a red ball in which way I would define the cascade file? Or more generally could I select on the video window an object of interest and then follow it? If I want to change the joystick command for the velocities do I change the coefficients k
cmd.angular.x = cmd.angular.y = 0
cmd.angular.z = data.axes[2] * 3.14/k0
cmd.linear.z = data.axes[3] * k1
cmd.linear.x = data.axes[1] * k2
cmd.linear.y = data.axes[0] * k3

Thanks again!

@sameerparekh
Copy link
Contributor

Great! I'm not sure if a cascade classifier is the right approach to use when tracking a red ball. But here's a reference on how to train a cascade classifier:

http://note.sonots.com/SciSoftware/haartraining.html

I have used Amazon EC2 to speed up the training. Otherwise it takes way too long.

If you want to change the tracking algo to use something other than a cascade classifier, you'll need to modify the tracker.py python module. The legacy github repo, https://github.com/FalkorSystems/ardrone_autonomy, has some samples of other tracking methods used. I settled eventually on the cascade because it worked best for my application.

And I think the answer to your final question is yes.

-s

On Wednesday, November 28, 2012 at 9:05 AM, harke wrote:

Thanks the last version work :) Could I please ask two question more, let say if I would like to follow a red ball in which way I would define the cascade file? Or more generally could I select on the video window an object of interest and then follow it? If I want to change the joystick command for the velocities do I change the coefficients k
cmd.angular.x = cmd.angular.y = 0
cmd.angular.z = data.axes[2] * 3.14/k0
cmd.linear.z = data.axes[3] * k1
cmd.linear.x = data.axes[1] * k2
cmd.linear.y = data.axes[0] * k3
Thanks again!


Reply to this email directly or view it on GitHub (#2 (comment)).

@harke
Copy link
Author

harke commented Nov 28, 2012

Thanks for you kind support I will have a look and try to come up with a solution.

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

No branches or pull requests

2 participants