-
Notifications
You must be signed in to change notification settings - Fork 46
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
ros2 topic echo /camera_info fails #6
Comments
Hello What software version are you running on your tello? Have not tested the project with latest versions of the firmware. |
yes. i use the latest soft. |
I got the same error. |
I am having the same problem. I am using Aruco Ros2 package and it keeps saying there's no camera info recieved. Also when i echo camera_info topic it shows no data. |
Ok so I found the issue. You actually need to specify the camera parameters (that you can get by calibrating the camera for example by doing this) using a yaml file. For example, I got the following parameters. image_height: 720
image_width: 960
distortion_model: "plumb_bob"
distortion_coefficients:
[
-0.0699817593277033,
-0.030309812668930222,
-0.007853051329708314,
-0.0016747628740195724,
]
camera_matrix:
[
742.1992742855476,
0.0,
454.12133045383564,
0.0,
742.7592370453168,
312.0483639069177,
0.0,
0.0,
1.0,
]
projection_matrix:
[
742.1992742855476,
0.0,
454.12133045383564,
0.0,
0.0,
742.7592370453168,
312.0483639069177,
0.0,
0.0,
0.0,
1.0,
0.0,
] Now you need to specify this as the parameters=[
{"connect_timeout": 10.0},
{"tello_ip": "192.168.10.1"},
{"tf_base": "map"},
{"tf_drone": "drone"},
{"camera_info_file": "./cam_info.yml"}, # This line here change it to wherever you put that config file above
], Finally, there is a bug here that needs to be fixed it should be changed to if self.pub_camera_info.get_subscription_count() > 0:
msg = CameraInfo()
msg.height = self.camera_info.get("image_height") # change to .get() since these are dict values
msg.width = self.camera_info.get("image_width")
msg.distortion_model = self.camera_info.get("distortion_model")
msg.d = self.camera_info.get("distortion_coefficients") # Note these have changed to lower case letters
msg.k = self.camera_info.get("camera_matrix")
# msg.r = self.camera_info.get("rectification_matrix")
# above line is irrelevant since the drone has a monocular camera
msg.p = self.camera_info.get("projection_matrix")
self.pub_camera_info.publish(msg) I might see if I can make a pull request later but I don't know if this repo is still maintained. Really only this last section is a bug. |
hi! thanks a lot of tello-ros2!
i
m trying to get camera_info in second terminal with:
ros2 topic echo /camera_info` but receive nothing.in main terminal i see:
i made may own calibration and put it there:
may be API has changed ?
and do you know how to decrease camera shape as 960x720 hangs on my raspberry pi ?
The text was updated successfully, but these errors were encountered: