-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into install_with_pip
# Conflicts: # docs/guide/robot_sbc/setup_raspberry_pi.md
- Loading branch information
Showing
9 changed files
with
91 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Cameras | ||
|
||
Donkeycar supports a large number of cameras via the `CAMERA_TYPE` configuration. For most applications a wide field of vision is important, so your camera should use a 120 degree wide angle lens or better. A 160 degree wide angle lense is recommended. | ||
|
||
## Camera Setup | ||
|
||
If you are using the default deep learning template or the computer vision template then you will need a camera. By default __myconfig.py__ assumes a RaspberryPi camera. You can change this by editing the `CAMERA_TYPE` value in the __myconfig.py__ file in your `~/mycar` folder. | ||
|
||
If you are using the gps path follow template then you do not need, and may not want, a camera. In this case you can change the camera type to mock; `CAMERA_TYPE = "MOCK"`. | ||
|
||
### Raspberry Pi: | ||
|
||
If you are on a raspberry pi and using the recommended pi camera ("PICAM"), then no changes are needed to your __myconfg.py__. | ||
|
||
This works with all Raspberry Pi cameras, including the original Raspberry Pi Camera Module based on the 5 megapixel OV5647 chipset and the Raspberry Pi Camera Module v2 based on the Sony IMX219 chip. These cameras are easily obtainable and are offered in generic (clone) versions by many vendors. | ||
|
||
### Jetson Nano: | ||
|
||
The Jetson does not have a driver for the original 5 megapixels OV5647 based Raspberry Pi Camera, but it does have a driver for the v2 camera based on the IMX219 chip. Indeed the recommended camera is based on the IMX219 chip. | ||
|
||
The default setting `CAMERA_TYPE = "PICAM"` does **not** work on the Jetson, even if you are using an 8mp RaspberryPi camera or a camera based on a Sony IMX219 based camera In either of these cases you will want edit your __myconfg.py__ to have: `CAMERA_TYPE = "CSIC"`. | ||
|
||
For flipping the image vertically set `CSIC_CAM_GSTREAMER_FLIP_PARM = 6` - this is helpful if you have to mount the camera in a rotated position. | ||
|
||
### USB Cameras | ||
|
||
`CAMERA_TYPE = CVCAM` is a camera type that has worked for USB cameras when OpenCV is setup. This requires additional setup for [OpenCV for Nano](/guide/robot_sbc/setup_jetson_nano/#step-4-install-opencv) or [OpenCV for Raspberry Pi](https://www.learnopencv.com/install-opencv-4-on-raspberry-pi/). | ||
|
||
If you have installed the optional pygame library then you can connect to the camera by editing the camera type to `CAMERA_TYPE = "WEBCAM"`. See the required additional setup for [pygame](https://www.pygame.org/wiki/GettingStarted). | ||
|
||
If you have more than one camera then you made need to the `CAMERA_INDEX` configuration value. By default it is zero. | ||
|
||
>> NOTE: `CAMERA_TYPE = CVCAM` depends upon a version of OpenCV that has GStreamer support compiled in. This is the default on the Jetson computers and is supported in the recommended version of OpenCV for that Raspberry Pi. | ||
### Intel Realsense D435 | ||
|
||
The Intel Realsense cameras are RGBD cameras; they provide RGB images and Depth. You can use them as an RGB camera to provide images for the Deep Learning template or the Computer Vision template by setting `CAMERA_TYPE = "D435"` in your __myconfig.py__ settings. You will also want to review the settings that are specific to the Intel Realsense cameras; | ||
|
||
``` | ||
# Intel Realsense D435 and D435i depth sensing camera | ||
REALSENSE_D435_RGB = True # True to capture RGB image | ||
REALSENSE_D435_DEPTH = True # True to capture depth as image array | ||
REALSENSE_D435_IMU = False # True to capture IMU data (D435i only) | ||
REALSENSE_D435_ID = None # serial number of camera or None if you only have one camera (it will autodetect) | ||
``` | ||
|
||
If you are not using depth then you will want to set `REALSENSE_D435_DEPTH = False` so it does not save the depth data. | ||
|
||
## Troubleshooting | ||
|
||
If the colors look wrong it may be that the camera is outputting BGR colors rather than RGB. You can set `BGR2RGB = True` to convert from BGR to RGB. | ||
|
||
We are adding other cameras over time, so read the camera section in __myconfig.py__ to see what options are available. | ||
|
||
If you are having troubles with your camera, check out our [Discord hardware channel](https://discord.gg/zcyzK69S) for more help. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters