-
Notifications
You must be signed in to change notification settings - Fork 25
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
Running into issues with running flight
#11
Comments
I did not finish it yet, but you could take a look at the Configuration wiki. Take a look to /flight/config.lua as an example. Some variables are mandatory, but most of their values should be ok if left empty : frame = Multicopter {
maxspeed = 1.0,
motors = {},
matrix = {}
}
imu = IMU {
gyroscopes = {},
accelerometers = {},
magnetometers = {},
altimeters = {},
gpses = {},
}
-- same scales as betaflight
PID.pscale = 0.032029
PID.iscale = 0.244381
PID.dscale = 0.000529
stabilizer = Stabilizer {
loop_time = 500, -- 500 µs => 2000Hz stabilizer update
rate_speed = 1000, -- deg/sec
pid_roll = PID( 45, 70, 40 ),
pid_pitch = PID( 46, 70, 40 ),
pid_yaw = PID( 45, 90, 2 ),
horizon_angles = Vector( 20.0, 20.0 ),
pid_horizon = PID( 150, 0, 0 )
}
controller = Controller {
expo = Vector(4, 4, 3.5, 2.25),
link = Socket {
type = Socket.UDP,
port = 2020,
read_timeout = 500
}
} For the camera, something like this should be what you are asking for : camera_link = Socket {
type = Socket.UDPLite,
port = 2021,
broadcast = false
}
camera = LinuxCamera {
vflip = false,
hflip = false,
hdr = true, -- this forces framerate down to 30 (HW limitation)
width = 1920,
height = 1080,
framerate = 50,
sharpness = 0.5,
preview_output = LiveOutput(), -- this live outputs to HDMI / DPI / CRT / etc, can be removed
video_output = V4L2Encoder {
video_device = "/dev/video11",
bitrate = 8 * 1024 * 1024,
width = 1920,
height = 1080,
framerate = 30,
link = camera_link
}
} In the controller_pc app, go to File → Settings, Connection tab, then :
You don't have to start video recording, the live stream should show up by itself without any action |
Right now, my primary goals are:
flight
so I can adjust which modules are used, and how to disable ones I'm not currently trying to test (because right now I am still running everything on an Raspberry CM4 IO board, with no components communicating except the camera)flight
to send the video feed to apc_controller
on another computer at192.168.1.111
I've had a number of errors I'm trying to better understand. First, when running directly after compilation (just to see what errors I would get), I saw a "bad mount" error related to this line, so I was wondering what is the intention of mounting
/var
? I ended up commenting out the mount line and addressing a different "file not exist:/var/flight/config.lua
" error by runningmkdir /var/flight
andcp config.lua /var/flight
.Next, I am having issues related to
![image](https://user-images.githubusercontent.com/53878603/236726214-dc3eaab6-fb37-4ce2-89cb-4da4c2d1fbe3.png)
No DPI CRTC/Connector found
. Do you know how I could just disable certain modules so I can just focus on the video feed for now?Finally, would you mind letting me know how I can configure the socket IP address to test the video transmission to a running
controller_pc
process on another local PC (such as192.168.1.111
)? I see at this line where the variable is declared, but am not sure where the value ofSOCKADDR
gets set. I looked through all the "config"-related files but ran into a dead end, sadly.Thanks in advance!
The text was updated successfully, but these errors were encountered: