3. Taraf Kütüphaneleri

Teams that are using non-PWM motor controllers or advanced sensors will most likely need to install external vendor dependencies.

What Are Vendor Dependencies?

A vendor dependency is a way for vendors such as CTRE, REV, and others to add their software library to robot projects. This library can interface with motor controllers and other devices. This way, teams can interact with their devices via CAN and have access to more complex and in-depth features than traditional PWM control.

Managing Vendor Dependencies

Vendor dependencies are installed on a per-project basis (so each robot project can have its own set of vendor dependencies). Vendor dependencies can be installed “online” or “offline”. The “online” functionality is done by downloading the dependencies over the internet, while offline is typically provided by a vendor-specific installer.

Uyarı

If installing a vendor dependency via the “online” mode, make sure to reconnect the computer to the internet and rebuild about every 30 days otherwise the cache will clear, completely deleting the downloaded library install.

Not

Vendors recommend using their offline installers when available, because the offline installer is typically bundled with additional programs that are extremely useful when working with their devices.

How Does It Work?

How Does It Work? - Java/C++

For Java and C++, a JSON file describing the vendor library is installed on your system to ~/wpilib/YYYY/vendordeps (where YYYY is the year and ~ is C:\Users\Public on Windows). This can either be done by an offline installer or the file can be fetched from an online location using the menu item in Visual Studio Code. This file is then used from VS Code to add to the library to each individual project. Vendor library information is managed on a per-project basis to make sure that a project is always pointing to a consistent version of a given vendor library. The libraries themselves are placed in the Maven cache at C:\Users\Public\wpilib\YYYY\maven. Vendors can place a local copy here with an offline installer (recommended) or require users to be connected to the internet for an initial build to fetch the library from a remote Maven location.

This JSON file allows specification of complex libraries with multiple components (Java, C++, JNI, etc.) and also helps handle some complexities related to simulation. Vendors that choose to provide a remote URL in the JSON also enable users to check for updates from within VS Code.

How Does It Work? - LabVIEW

For LabVIEW teams, there might be a few new Third Party items on various palettes (specifically, one in Actuators, one in Actuators -> Motor Control labeled CAN Motor, and one in Sensors). These correspond to folders in C:\Program Files\National Instruments\LabVIEW 2020\vi.lib\Rock Robotics\WPI\Third Party

In order to install third party libraries for LabVIEW, download the VIs from the vendor (typically via some sort of installer). Then drag and drop the third party VIs into the respective folder mentioned above just like any other VI.

Installing Libraries

VS Kodu

Using the Manage Vendor Libraries option of the WPILib Command Palette.

Çevrimdışı bir sağlayıcı tarafından kurulan bir satıcı kütüphanesini eklemek için, şu tuşa basın: kbd:Ctrl +Shift+P ve WPILib yazın veya WPILib Komut Paletini açmak için sağ üstteki WPILib simgesine tıklayın ve yazmaya başlayın: Manage Vendor Libraries, ardından menüden Install new libraries (offline) seçeneğini seçin.

Select the libraries to add.

Her birinin yanındaki kutuyu işaretleyerek projeye eklemek için istenen kitaplıkları seçin ve ardından tıklayın OK. JSON dosyası, kütüphaneyi projeye bağımlılık olarak ekleyerek projedeki vendordeps klasörüne kopyalanacaktır.

In order to install a vendor library in online mode, press Ctrl+Shift+P and type WPILib or click on the WPILib icon in the top right to open the WPILib Command Palette and begin typing Manage Vendor Libraries and select it in the menu, and then click on Install new libraries (online) instead and copy + paste the vendor JSON URL.

Güncellemeleri Kontrol Etme (Çevrimdışı)

Since dependencies are version managed on a per-project basis, even when installed offline, you will need to Manage Vendor Libraries and select Check for updates (offline) for each project you wish to update.

Güncellemeleri Kontrol Etme (Çevrimiçi)

Satıcıların isteğe bağlı olarak doldurabileceği JSON dosyasının bir kısmı, çevrimiçi bir güncelleme konumudur. Bir kitaplıkta uygun bir konum belirtilmişse, çalıştırarak Check for updates (online) , kitaplığın daha yeni bir sürümünün uzak konumdan mevcut olup olmadığını kontrol eder.

Bir Kütüphane Destek Dosyasını Kaldırma

Bir projeden kütüphane bağımlılığını kaldırmak için:guilabel:Manage Current Libraries menüsünden Manage Vendor Libraries seçeneğini seçin, kaldırılacak kitaplıklar için kutuyu işaretleyin ve tıklayın OK. Bu kitaplıklar projeden bağımlılıklar olarak kaldırılacaktır.

Command-Line

Satıcı URL’sinden bir satıcı kitaplığı bağımlılığı eklemek, bir gradle görevi aracılığıyla komut satırı aracılığıyla da yapılabilir. Proje kökünde bir komut satırı örneği açın ve radlew vendordep --url = yazın; burada `` , satıcının JSON URL’sidir. Bu, satıcı kitaplığı bağımlılığı JSON dosyasını projenin `` vendordeps`` klasörüne ekleyecektir. Satıcı kitaplıkları da aynı şekilde güncellenebilir.

The vendordep gradle task can also fetch vendordep JSONs from the user wpilib folder. To do so, pass FRCLOCAL/Filename.json as the file URL. For example, gradlew vendordep --url=FRCLOCAL/WPILibNewCommands.json will fetch the JSON for the command-based framework.

Kütüphaneler

Click these links to visit the vendor site to see whether they offer online installers, offline installers, or both. URLs below are to plug in to the VS Code -> Install New Libraries (online) feature.

2023 CTRE Phoenix Framework - Contains CANcoder, CANifier, CANdle, Pigeon IMU, Pigeon 2.0, Talon FX, Talon SRX, and Victor SPX Libraries and Phoenix Tuner program for configuring CTRE CAN devices

Phoenix (v5): https://maven.ctr-electronics.com/release/com/ctre/phoenix/Phoenix5-frc2023-latest.json

Phoenix (Pro): https://maven.ctr-electronics.com/release/com/ctre/phoenixpro/PhoenixPro-frc2023-latest.json

Phoenix (Pro and v5): https://maven.ctr-electronics.com/release/com/ctre/phoenixpro/PhoenixProAnd5-frc2023-latest.json

Not

To get the 2023 version of the same Phoenix library as previous years, use the first link above (Phoenix v5). Use one of the other json links if you’re using Phoenix Pro.

Uyarı

Only use ONE of the above Phoenix vendordep links within a project. If you need both Phoenix v5 and Phoenix Pro in the same project, use the third option.

Fusion Driver ile oynamak- Venom motor/kontrol cihazı dahil tüm PWF cihazları için kütüphane

https://www.playingwithfusion.com/frc/playingwithfusion2023.json

Kauai Labs - NavX-MXP, NavX-Micro, ve Sensor Fusion kütüphaneleri

https://dev.studica.com/releases/2023/NavX.json

REV Robotics REVLib - Library for all REV devices including SPARK MAX and Color Sensor V3

https://software-metadata.revrobotics.com/REVLib-2023.json

Topluluk Kütüphaneleri

PhotonVision - PhotonVision CV yazılımı için Kütüphane

https://maven.photonvision.org/repository/internal/org/photonvision/PhotonLib-json/1.0/PhotonLib-json-1.0.json

PathPlanner - Library for PathPlanner

https://3015rangerrobotics.github.io/pathplannerlib/PathplannerLib.json

WPILib Komut Kütüphaneleri

The WPILib new command library has been split into a vendor library. It is installed by the WPILib installer for offline installation. It may also be installed with the following online link:

New Command Library

Bir projeden kütüphane destek dosyalarını kaldırmak için, Manage Vendor Libraries -Üretici Kütüphaneleri Yönetin menüsünden Manage Current Libraries -Mevcut Kütüphaneleri Yönetin seçeneğini seçin, kaldırılacak kitaplıkların kutusunu işaretleyin ve Tamam’a tıklayın. Bu kitaplıklar projeden destek dosyaları olarak kaldırılacaktır.

Romi Library

A Romi Library has been created to contain several helper classes that are a part of the RomiReference example.

Romi Vendordep.