robotpy-native-romi 2025.3.2__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ # This file is automatically generated, DO NOT EDIT
2
+ # fmt: off
3
+
4
+ import native.wpilib._init_robotpy_native_wpilib
5
+
6
+ def __load_library():
7
+ from os.path import abspath, join, dirname, exists
8
+ from ctypes import cdll
9
+
10
+ root = abspath(dirname(__file__))
11
+
12
+ lib_path = join(root, 'lib', 'romiVendordep.dll')
13
+
14
+ try:
15
+ return cdll.LoadLibrary(lib_path)
16
+ except FileNotFoundError:
17
+ if not exists(lib_path):
18
+ raise FileNotFoundError("romiVendordep.dll was not found on your system. Is this package correctly installed?")
19
+ raise Exception("romiVendordep.dll could not be loaded. Do you have Visual Studio C++ Redistributible installed?")
20
+
21
+ __lib = __load_library()
22
+
@@ -0,0 +1,84 @@
1
+ // Copyright (c) FIRST and other WPILib contributors.
2
+ // Open Source Software; you can modify and/or share it under the terms of
3
+ // the WPILib BSD license file in the root directory of this project.
4
+
5
+ #pragma once
6
+
7
+ #include <memory>
8
+
9
+ #include <frc/DigitalInput.h>
10
+ #include <frc/DigitalOutput.h>
11
+ #include <units/time.h>
12
+
13
+ namespace frc {
14
+
15
+ /**
16
+ * @ingroup romi_api
17
+ * @{
18
+ */
19
+
20
+ /**
21
+ * This class represents the onboard IO of the Romi
22
+ * reference robot. This includes the pushbuttons and
23
+ * LEDs.
24
+ *
25
+ * <p>DIO 0 - Button A (input only)
26
+ * DIO 1 - Button B (input) or Green LED (output)
27
+ * DIO 2 - Button C (input) or Red LED (output)
28
+ * DIO 3 - Yellow LED (output only)
29
+ */
30
+ class OnBoardIO {
31
+ public:
32
+ /** Mode for Romi onboard IO */
33
+ enum ChannelMode { /** Input */ INPUT, /** Output */ OUTPUT };
34
+ OnBoardIO(OnBoardIO::ChannelMode dio1, OnBoardIO::ChannelMode dio2);
35
+
36
+ static constexpr auto kMessageInterval = 1_s;
37
+ units::second_t m_nextMessageTime = 0_s;
38
+
39
+ /**
40
+ * Gets if the A button is pressed.
41
+ */
42
+ bool GetButtonAPressed();
43
+
44
+ /**
45
+ * Gets if the B button is pressed.
46
+ */
47
+ bool GetButtonBPressed();
48
+
49
+ /**
50
+ * Gets if the C button is pressed.
51
+ */
52
+ bool GetButtonCPressed();
53
+
54
+ /**
55
+ * Sets the green LED.
56
+ */
57
+ void SetGreenLed(bool value);
58
+
59
+ /**
60
+ * Sets the red LED.
61
+ */
62
+ void SetRedLed(bool value);
63
+
64
+ /**
65
+ * Sets the yellow LED.
66
+ */
67
+ void SetYellowLed(bool value);
68
+
69
+ private:
70
+ frc::DigitalInput m_buttonA{0};
71
+ frc::DigitalOutput m_yellowLed{3};
72
+
73
+ // DIO 1
74
+ std::unique_ptr<frc::DigitalInput> m_buttonB;
75
+ std::unique_ptr<frc::DigitalOutput> m_greenLed;
76
+
77
+ // DIO 2
78
+ std::unique_ptr<frc::DigitalInput> m_buttonC;
79
+ std::unique_ptr<frc::DigitalOutput> m_redLed;
80
+ };
81
+
82
+ /** @} */
83
+
84
+ } // namespace frc
@@ -0,0 +1,112 @@
1
+ // Copyright (c) FIRST and other WPILib contributors.
2
+ // Open Source Software; you can modify and/or share it under the terms of
3
+ // the WPILib BSD license file in the root directory of this project.
4
+
5
+ #pragma once
6
+
7
+ #include <hal/SimDevice.h>
8
+ #include <units/angle.h>
9
+ #include <units/angular_velocity.h>
10
+
11
+ namespace frc {
12
+
13
+ /**
14
+ * @ingroup romi_api
15
+ * @{
16
+ */
17
+
18
+ /**
19
+ * Use a rate gyro to return the robots heading relative to a starting position.
20
+ *
21
+ * This class is for the Romi onboard gyro, and will only work in
22
+ * simulation/Romi mode. Only one instance of a RomiGyro is supported.
23
+ */
24
+ class RomiGyro {
25
+ public:
26
+ RomiGyro();
27
+
28
+ /**
29
+ * Return the actual angle in radians that the robot is currently facing.
30
+ *
31
+ * The angle is based on integration of the returned rate form the gyro.
32
+ * The angle is continuous, that is, it will continue from 2π->3π radians.
33
+ * This allows algorithms that wouldn't want to see a discontinuity in the
34
+ * gyro output as it sweeps from 2π to 0 on the second time around.
35
+ *
36
+ * @return The current heading of the robot.
37
+ */
38
+ units::radian_t GetAngle() const;
39
+
40
+ /**
41
+ * Return the rate of rotation of the gyro
42
+ *
43
+ * The rate is based on the most recent reading of the gyro.
44
+ *
45
+ * @return The current rate.
46
+ */
47
+ units::radians_per_second_t GetRate() const;
48
+
49
+ /**
50
+ * Get the rate of turn in around the X-axis.
51
+ *
52
+ * @return Rate of turn.
53
+ */
54
+ units::radians_per_second_t GetRateX() const;
55
+
56
+ /**
57
+ * Get the rate of turn in around the Y-axis.
58
+ *
59
+ * @return Rate of turn.
60
+ */
61
+ units::radians_per_second_t GetRateY() const;
62
+
63
+ /**
64
+ * Get the rate of turn around the Z-axis.
65
+ *
66
+ * @return Rate of turn.
67
+ */
68
+ units::radians_per_second_t GetRateZ() const;
69
+
70
+ /**
71
+ * Get the currently reported angle around the X-axis.
72
+ *
73
+ * @return Current angle around X-axis.
74
+ */
75
+ units::radian_t GetAngleX() const;
76
+
77
+ /**
78
+ * Get the currently reported angle around the Y-axis.
79
+ *
80
+ * @return Current angle around Y-axis.
81
+ */
82
+ units::radian_t GetAngleY() const;
83
+
84
+ /**
85
+ * Get the currently reported angle around the Z-axis.
86
+ *
87
+ * @return Current angle around Z-axis.
88
+ */
89
+ units::radian_t GetAngleZ() const;
90
+
91
+ /**
92
+ * Resets the gyro
93
+ */
94
+ void Reset();
95
+
96
+ private:
97
+ hal::SimDevice m_simDevice;
98
+ hal::SimDouble m_simRateX;
99
+ hal::SimDouble m_simRateY;
100
+ hal::SimDouble m_simRateZ;
101
+ hal::SimDouble m_simAngleX;
102
+ hal::SimDouble m_simAngleY;
103
+ hal::SimDouble m_simAngleZ;
104
+
105
+ double m_angleXOffset = 0;
106
+ double m_angleYOffset = 0;
107
+ double m_angleZOffset = 0;
108
+ };
109
+
110
+ /** @} */
111
+
112
+ } // namespace frc
@@ -0,0 +1,37 @@
1
+ // Copyright (c) FIRST and other WPILib contributors.
2
+ // Open Source Software; you can modify and/or share it under the terms of
3
+ // the WPILib BSD license file in the root directory of this project.
4
+
5
+ #pragma once
6
+
7
+ #include <frc/motorcontrol/PWMMotorController.h>
8
+
9
+ namespace frc {
10
+
11
+ /**
12
+ * @defgroup romi_api Romi Hardware API
13
+ * @{
14
+ */
15
+
16
+ /**
17
+ * RomiMotor
18
+ *
19
+ * A general use PWM motor controller representing the motors on a Romi robot
20
+ */
21
+ class RomiMotor : public PWMMotorController {
22
+ public:
23
+ /**
24
+ * Constructor for a RomiMotor.
25
+ *
26
+ * @param channel The PWM channel that the RomiMotor is attached to.
27
+ * 0 is left, 1 is right
28
+ */
29
+ explicit RomiMotor(int channel);
30
+
31
+ RomiMotor(RomiMotor&&) = default;
32
+ RomiMotor& operator=(RomiMotor&&) = default;
33
+ };
34
+
35
+ /** @} */
36
+
37
+ } // namespace frc
Binary file
Binary file
@@ -0,0 +1,11 @@
1
+ prefix=${pcfiledir}
2
+ includedir=${prefix}/include
3
+ libdir=${prefix}/lib
4
+ pkgconf_pypi_initpy=native.romi._init_robotpy_native_romi
5
+
6
+ Name: romi
7
+ Description: WPILib Romi support library
8
+ Version: 2025.3.2
9
+ Requires: robotpy-native-wpilib
10
+ Libs: -L${libdir} -lromiVendordep
11
+ Cflags: -I${includedir}
@@ -0,0 +1,6 @@
1
+ Metadata-Version: 2.4
2
+ Name: robotpy-native-romi
3
+ Version: 2025.3.2
4
+ Summary: WPILib Romi support library
5
+ License-Expression: BSD-3-Clause
6
+ Requires-Dist: robotpy-native-wpilib==2025.3.2
@@ -0,0 +1,11 @@
1
+ native/romi/_init_robotpy_native_romi.py,sha256=jmfNqv6wDJRR0vqwkS1mb_cXoJAchaoZybZ8NWOj8n4,724
2
+ native/romi/robotpy-native-romi.pc,sha256=Dmt7kwcfQCL2q6JzAoDPp89DhNF15M4YrZ3ShL8HTBw,300
3
+ native/romi/include/frc/romi/OnBoardIO.h,sha256=8E7y1Jzz_3MmMVse6kdRFortwAtwFCievUSKaqzP9BQ,1737
4
+ native/romi/include/frc/romi/RomiGyro.h,sha256=OQkil-zW6IB0RX6iplXDV7h_9zOpSS9fKZEyxbqAi1M,2591
5
+ native/romi/include/frc/romi/RomiMotor.h,sha256=Lw7fVyDakRvAd7c_5k4kbg_QvUTXFPJHfKMlx5Zj3GM,811
6
+ native/romi/lib/romiVendordep.dll,sha256=MLe7l8TDUPmZKJzvKdcDEnbdnP1lZLr3MhQB-NoLvm4,26112
7
+ native/romi/lib/romiVendordep.lib,sha256=AaFSgW4T6mv4BAgRLDtrjv2VuLGuCPRg6v34ImSID18,21836
8
+ robotpy_native_romi-2025.3.2.dist-info/METADATA,sha256=Av-icmSfUs4T4zSa4hMzMlqQRhrRoqK3ooP-d2Jer5o,183
9
+ robotpy_native_romi-2025.3.2.dist-info/WHEEL,sha256=Vhj7RpPOKCXcsr4rUs7q4pISuo5nT6VsOuaQwH9GILY,94
10
+ robotpy_native_romi-2025.3.2.dist-info/entry_points.txt,sha256=Xc0U2GpkqIPz_QT8WlVnn_B3LVysxH3WfKu9oe2gZSY,32
11
+ robotpy_native_romi-2025.3.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
@@ -0,0 +1,2 @@
1
+ [pkg_config]
2
+ romi = native.romi