-
Notifications
You must be signed in to change notification settings - Fork 0
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
ping pong marker not being detected #1
Comments
Hi @jorelllinsangan, Thanks! Glad you like my work :) class Spotter:
# .....
CAMERA_SETTINGS_FILE = "config/cam_settings/MyCamSettings.txt"
COLOR_THRESH_SETTINGS_FILE = "config/color_thresh/MyColorSettings.txt" Hope this helps! |
Hey @CarlosRDomin, Thanks for responding! I did modify that.
Edit: So basically my files name is When I run the I'm also not quite sure what |
Ooooh, I think I know what's going on!!!
Side note: from the image you attached, it looks like your camera is not calibrated (or the correct calibration file wasn't loaded), because it's estimating that the chessboard pattern was 13.47m away from the camera, which from the image is clearly wrong. Did you calibrate the camera using |
I figured out the "b", "y", "and "n" thing. When I'm running I did use When I press By the way, thanks a lot for the detailed responses to my questions! :) |
Could you include the log/output of the program when you press "y"? Otherwise it's hard to know why the program exits in that case (it shouldn't). On For
|
After pressing
Yeah, I'm not sure why the ball isn't highlighted in I did flash the firmware. I was getting something like "value posSet not found". After flashing it, the problem went away. I changed the thirst just now and that fixed its shooting up problem. It does look like its seeing the marker in the images in the That's after me pressing Here's an image after I kept pressing |
Here's a gif of what happens after I press 'e'. Thrust is set to 35000. https://imgflip.com/gif/1m7ac2 I just took the images from the |
Hmmm that's weird. It seems like it could be a misalignment of the coordinate axes.
|
Would you be able to post what I should be seeing after I press 'y' in I'll try your other suggestions. |
Try changing line 62 in while cv2.waitKey(1) == 255: to while cv2.waitKey(1) < 0: Hopefully that'll do :) |
The change in I'll be trying your frame of reference suggestion next. The drone still overcompensates as soon as I press |
Bypassing the extrinsic by pressing |
Yaaay, glad it worked!
return np.array([-1, 1, -1]) * world_coords[[2,0,1]] # This means: CF_x=-world_z, CF_y=world_x, CF_z=-world_y
# Note that this also assumes the chessboard's short side (world_x) goes in the left-right direction, and the long side (world_y) goes up-down.
world_coords = np.array([1, -1, -1]) * cf_world_coords[[1,2,0]] # This means: world_x=CF_y, world_y=-CF_z, world_z=-CF_x |
Also, I noticed that in the videos you've posted, the drone seems like to know to just hover at the point where you press "e". In my experience where the drone actually hovered, it took a while to find the right values so it can hover. I hope this makes sense. |
Hi Carlos!
I've been trying to work with your code for a while now to get my Crazyflie to hover. Great work btw! The videos are really cool.
Anyway, I'm just not sure whats wrong with what I'm doing. I think I'm doing it right when I run adjust_cam_settings.py. I tweak my settings until my ping pong ball marker is highlighted by the program. I then save the settings. But when I run calibrate_2d_3d.py the ping pong ball marker is not detected. Would you have a general idea on why this is happening?
Thanks!
The text was updated successfully, but these errors were encountered: