diff --git a/Robot/Doc/html/_a_x12_a_8h_source.html b/Robot/Doc/html/_a_x12_a_8h_source.html index dc9aa232..ace1069d 100644 --- a/Robot/Doc/html/_a_x12_a_8h_source.html +++ b/Robot/Doc/html/_a_x12_a_8h_source.html @@ -90,7 +90,7 @@
Typedefs | |
typedef enum motorTypes_e | motorTypes_t |
+typedef enum motorTypes_e | motorTypes_t |
Enumerates the types of Dynamixel actuators the library supports. | |
@@ -143,28 +146,13 @@
enum | motorTypes_e { AX12ATYPE,
MX28TYPE
} | | Enumerates the types of Dynamixel actuators the library supports. More... |
This file defines the data structure used by all Dynamixel actuators, as well as user-defined types it uses.
-typedef enum motorTypes_e motorTypes_t | -
Enumerates the types of Dynamixel actuators the library supports
- -Enumerates the types of Dynamixel actuators the library supports
+ +Enumerates the types of Dynamixel actuators the library supports.
Enumerator | |
---|---|
AX12ATYPE | AX12A actuator |
Functions | |
void | MPU6050_init (MPU6050_HandleTypeDef *sMPU6050) |
This function is used as the first step of initialization of an MPU6050_HandleTypeDef struct. More... | |
This function is used as the first step of initialization of an MPU6050_HandleTypeDef struct. More... | |
void | MPU6050_manually_set_offsets (MPU6050_HandleTypeDef *sMPU6050) |
This function is used to manually set the offsets of the accelerometer and gyroscope based on empirical measurements taken for this specific sensor. In the future, this could be updated to allow for various MPU6050 devices, each with their own specific offsets. More... | |
Data Structures | |
struct | MPU6050_HandleTypeDef |
Data structure to organize MPU6050 configuration details and sensor readings. More... | |
@@ -584,7 +585,7 @@
| This function reads from an MPU6050 register and returns it directly. More... | | | This function is used as the first step of initialization of an MPU6050_HandleTypeDef struct. More... | | void MX28_SetIGain(Dynamixel_HandleTypeDef *hdynamixel, uint8_t IGain) Sets the value of the integral gain used in the motor's PID controller. Definition: MX28.c:126 void MX28_EnterMultiTurnMode(Dynamixel_HandleTypeDef *hdynamixel) Activates multi-turn mode, which allows the actuator to have a range of controllable position values ... Definition: MX28.c:211 void MX28_SetPGain(Dynamixel_HandleTypeDef *hdynamixel, uint8_t PGain) Sets the value of the proportional gain used in the motor's PID controller. Definition: MX28.c:142 Definition: Dynamixel_HandleTypeDef.h:39 Organizes all the information relevant to a motor. Definition: Dynamixel_HandleTypeDef.h:39 void MX28_SetResolutionDivider(Dynamixel_HandleTypeDef *hdynamixel, uint8_t divider) Unimplemented. This function should change the resolution divider, allowing for more precise or less ... Definition: MX28.c:97 void MX28_SetMultiTurnOffset(Dynamixel_HandleTypeDef *hdynamixel, int16_t offset) For an actuator in multi-turn mode, this applies a tunable offset to all positions. That is it allows you to change where the actuator considers position 0 to be. For an actuator not in multi-turn mode, this setting has no effect. Definition: MX28.c:73 void MX28_SetDGain(Dynamixel_HandleTypeDef *hdynamixel, uint8_t DGain) Sets the value of the derivative gain used in the motor's PID controller. Definition: MX28.c:110 |
Variables | |
osMessageQId | UART_rxHandle |
osMessageQId | TXQueueHandle |
This file implements a generic event processor for UART events, which occur when commands for the motors need to be distributed.
diff --git a/Robot/Doc/html/_u_a_r_t___handler_8c.js b/Robot/Doc/html/_u_a_r_t___handler_8c.js index 03482b94..67786bdc 100644 --- a/Robot/Doc/html/_u_a_r_t___handler_8c.js +++ b/Robot/Doc/html/_u_a_r_t___handler_8c.js @@ -1,5 +1,5 @@ var _u_a_r_t___handler_8c = [ [ "UART_ProcessEvent", "group___u_a_r_t___handler.html#ga9714c8eb77aab0d3a5719e5233d397ca", null ], - [ "UART_rxHandle", "group___u_a_r_t___handler.html#gade81e4b71063ca3c76b947f6adf50d88", null ] + [ "TXQueueHandle", "group___u_a_r_t___handler.html#ga4f2e3ebb92cb44b567285706fa6e6c3c", null ] ]; \ No newline at end of file diff --git a/Robot/Doc/html/_u_a_r_t___handler_8h.html b/Robot/Doc/html/_u_a_r_t___handler_8h.html index dfe4ff59..a56a6442 100644 --- a/Robot/Doc/html/_u_a_r_t___handler_8h.html +++ b/Robot/Doc/html/_u_a_r_t___handler_8h.html @@ -129,8 +129,10 @@@@ -139,10 +141,12 @@ cmdWritePosition, cmdWriteTorque } | |
Enumerates the types of motor commands that can be sent to the UART handlers. More... | |
enum | eTXData_t { eMotorData, eIMUData } |
Enumerates the types of data that can be sent to the sensor queue. This is used so that the reader of the queue will know how to typecast the void pointer so that the data can be interpreted correctly. See TXData_t for more details. More... | |
diff --git a/Robot/Doc/html/_u_a_r_t___handler_8h_source.html b/Robot/Doc/html/_u_a_r_t___handler_8h_source.html
index 04ab1ae1..5af7a2f0 100644
--- a/Robot/Doc/html/_u_a_r_t___handler_8h_source.html
+++ b/Robot/Doc/html/_u_a_r_t___handler_8h_source.html
@@ -90,23 +90,23 @@
-
Definition: UART_Handler.h:70 Definition: Dynamixel_HandleTypeDef.h:39 Definition: UART_Handler.h:85
+ Definition: UART_Handler.h:71 Organizes all the information relevant to a motor. Definition: Dynamixel_HandleTypeDef.h:39 This is the data structure copied into the sensor queue, and read by the thread that sends data to th... Definition: UART_Handler.h:87 void UART_ProcessEvent(UARTcmd_t *cmdPtr, TXData_t *DataToSend) The UART event processor calls the low-level libraries to execute reads and writes for motors... Definition: UART_Handler.c:43 Definition: UART_Handler.h:40 Definition: UART_Handler.h:41 Definition: UART_Handler.h:42 Definition: UART_Handler.h:72 Definition: UART_Handler.h:51 eTXData_t Enumerates the types of data that can be sent to the sensor queue. This is used so that the reader of... Definition: UART_Handler.h:70 Definition: UART_Handler.h:41 Definition: UART_Handler.h:42 Definition: UART_Handler.h:43 Definition: UART_Handler.h:73 eUARTcmd_t Enumerates the types of motor commands that can be sent to the UART handlers. Definition: UART_Handler.h:40 The container type for motor commands. The control thread sends these to the various UART handlers th... Definition: UART_Handler.h:52 |
-void | MX_FREERTOS_Init (void) | | void | StartCommandTask (void const *argument) | | This function is executed in the context of the commandTask thread. It initializes all data structures and peripheral devices associated with the application, and then assumes responsibility for distributing commands to the actuators. More... | | void | UART1_Handler (void const *argument) | | This function is executed in the context of the UART1_ thread. It processes all commands for the motors physically connected to UART1, and initiates the I/O calls to them. Whenever it processes read commands for a motor, it sends the data received to the multi-writer sensor queue, which is read only by the TX task. More... | | void | UART2_Handler (void const *argument) | | This function is executed in the context of the UART2_ thread. It processes all commands for the motors physically connected to UART2, and initiates the I/O calls to them. Whenever it processes read commands for a motor, it sends the data received to the multi-writer sensor queue, which is read only by the TX task. More... | | void | UART3_Handler (void const *argument) | | This function is executed in the context of the UART3_ thread. It processes all commands for the motors physically connected to UART3, and initiates the I/O calls to them. Whenever it processes read commands for a motor, it sends the data received to the multi-writer sensor queue, which is read only by the TX task. More... | | void | UART4_Handler (void const *argument) | | This function is executed in the context of the UART4_ thread. It processes all commands for the motors physically connected to UART4, and initiates the I/O calls to them. Whenever it processes read commands for a motor, it sends the data received to the multi-writer sensor queue, which is read only by the TX task. More... | | void | UART6_Handler (void const *argument) | | This function is executed in the context of the UART6_ thread. It processes all commands for the motors physically connected to UART6, and initiates the I/O calls to them. Whenever it processes read commands for a motor, it sends the data received to the multi-writer sensor queue, which is read only by the TX task. More... | | void | StartUART1Task (void const *argument) | | This function is executed in the context of the UART1_ thread. It processes all commands for the motors physically connected to UART1, and initiates the I/O calls to them. Whenever it processes read commands for a motor, it sends the data received to the multi-writer sensor queue, which is read only by the TX task. More... | | void | StartUART2Task (void const *argument) | | This function is executed in the context of the UART2_ thread. It processes all commands for the motors physically connected to UART2, and initiates the I/O calls to them. Whenever it processes read commands for a motor, it sends the data received to the multi-writer sensor queue, which is read only by the TX task. More... | | void | StartUART3Task (void const *argument) | | This function is executed in the context of the UART3_ thread. It processes all commands for the motors physically connected to UART3, and initiates the I/O calls to them. Whenever it processes read commands for a motor, it sends the data received to the multi-writer sensor queue, which is read only by the TX task. More... | | void | StartUART4Task (void const *argument) | | This function is executed in the context of the UART4_ thread. It processes all commands for the motors physically connected to UART4, and initiates the I/O calls to them. Whenever it processes read commands for a motor, it sends the data received to the multi-writer sensor queue, which is read only by the TX task. More... | | void | StartUART6Task (void const *argument) | | This function is executed in the context of the UART6_ thread. It processes all commands for the motors physically connected to UART6, and initiates the I/O calls to them. Whenever it processes read commands for a motor, it sends the data received to the multi-writer sensor queue, which is read only by the TX task. More... | | void | StartCommandTask (void const *argument) | | This function is executed in the context of the commandTask thread. It initializes all data structures and peripheral devices associated with the application, and then assumes responsibility for distributing commands to the actuators. More... | |
+void | MX_FREERTOS_Init (void) | | |
-osThreadId | commandTaskHandle | |
-uint32_t | commandTaskBuffer [512] | |
-osStaticThreadDef_t | commandTaskControlBlock | |
-osThreadId | UART1_Handle | |
-uint32_t | UART1_Buffer [128] | |
-osStaticThreadDef_t | UART1_ControlBlock | |
-osThreadId | UART2_Handle | |
-uint32_t | UART2_Buffer [128] | |
-osStaticThreadDef_t | UART2_ControlBlock | |
-osThreadId | UART3_Handle | |
-uint32_t | UART3_Buffer [128] | |
-osStaticThreadDef_t | UART3_ControlBlock | |
-osThreadId | UART4_Handle | |
-uint32_t | UART4_Buffer [128] | |
-osStaticThreadDef_t | UART4_ControlBlock | |
-osThreadId | UART6_Handle | |
-uint32_t | UART6_Buffer [128] | |
-osStaticThreadDef_t | UART6_ControlBlock | |
+osThreadId | UART1TaskHandle | |
+uint32_t | UART1TaskBuffer [128] | |
+osStaticThreadDef_t | UART1TaskControlBlock | |
+osThreadId | UART2TaskHandle | |
+uint32_t | UART2TaskBuffer [128] | |
+osStaticThreadDef_t | UART2TaskControlBlock | |
+osThreadId | UART3TaskHandle | |
+uint32_t | UART3TaskBuffer [128] | |
+osStaticThreadDef_t | UART3TaskControlBlock | |
+osThreadId | UART4TaskHandle | |
+uint32_t | UART4TaskBuffer [128] | |
+osStaticThreadDef_t | UART4TaskControlBlock | |
+osThreadId | UART6TaskHandle | |
+uint32_t | UART6TaskBuffer [128] | |
+osStaticThreadDef_t | UART6TaskControlBlock | | |
-osThreadId | rxTaskHandle | |
-uint32_t | rxTaskBuffer [512] | |
-osStaticThreadDef_t | rxTaskControlBlock | |
-osThreadId | txTaskHandle | |
-uint32_t | txTaskBuffer [512] | |
-osStaticThreadDef_t | txTaskControlBlock | |
+osThreadId | CommandTaskHandle | |
+uint32_t | CommandTaskBuffer [512] | |
+osStaticThreadDef_t | CommandTaskControlBlock | |
+osThreadId | RxTaskHandle | |
+uint32_t | RxTaskBuffer [512] | |
+osStaticThreadDef_t | RxTaskControlBlock | |
+osThreadId | TxTaskHandle | |
+uint32_t | TxTaskBuffer [512] | |
+osStaticThreadDef_t | TxTaskControlBlock | | | osMessageQId | UART_rxHandle | |
-uint8_t | UART_rxBuffer [32 *sizeof(UARTcmd_t)] | |
-osStaticMessageQDef_t | UART_rxControlBlock | | osMessageQId | TXQueueHandle | |
+uint8_t | TXQueueBuffer [32 *sizeof(TXData_t)] | |
+osStaticMessageQDef_t | TXQueueControlBlock | | |
CDynamixel_HandleTypeDef | |
CMPU6050_HandleTypeDef | |
CDynamixel_HandleTypeDef | Organizes all the information relevant to a motor |
CMPU6050_HandleTypeDef | Data structure to organize MPU6050 configuration details and sensor readings |
CMPUFilterVel_t | Container for angular velocity filter |
Crobot_goal | |
Crobot_state | |
CTXData_t | |
CUARTcmd_t | |
Crobot_goal | Data structure sent from the PC to the MCU. Contains "goal" motor positions |
Crobot_state | Data structure sent from the MCU to the PC. Contains sensor data |
CTXData_t | This is the data structure copied into the sensor queue, and read by the thread that sends data to the PC. It includes 2 fields: one that indicates the type of data it encapsulates, and the other pointing to the data |
CUARTcmd_t | The container type for motor commands. The control thread sends these to the various UART handlers through the UART queues. The container provides all the information needed to generate the appropriate motor action (reading from or writing to motor command registers) |
Code for freertos application.
+File Name : freertos.c Description : Code for freertos applications
+This notice applies to any and all portions of this file that are not between comment pairs USER CODE BEGIN and USER CODE END. Other portions of this file, whether inserted by the user or by software development tools are owned by their respective copyright owners.
+Copyright (c) 2018 STMicroelectronics International N.V. All rights reserved.
+Redistribution and use in source and binary forms, with or without modification, are permitted, provided that the following conditions are met:
+THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
complianceMargin | the acceptable error between the current and goal position. Arguments in range [0, 255] |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
complianceSlope | arguments in range [1, 7], with 1 being the least flexible |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
CCWcomplianceMargin | the acceptable error between the current and goal position. Arguments in range [0, 255] |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
CCWcomplianceSlope | arguments in range [1, 7], with 1 being the least flexible |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
CWcomplianceMargin | the acceptable error between the current and goal position. Arguments in range [0, 255] |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
CWcomplianceSlope | arguments in range [1, 7], with 1 being the least flexible |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
CCWcomplianceMargin | the acceptable error between the current and goal position. Arguments in range [0, 255] |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
CCWcomplianceSlope | arguments in range [1, 7], with 1 being the least flexible |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
complianceMargin | the acceptable error between the current and goal position. Arguments in range [0, 255] |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
complianceSlope | arguments in range [1, 7], with 1 being the least flexible |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
CWcomplianceMargin | the acceptable error between the current and goal position. Arguments in range [0, 255] |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
CWcomplianceSlope | arguments in range [1, 7], with 1 being the least flexible |
*sMPU6050 | Pointer to a struct of type MPU6050_HandleTypeDef |
*sMPU6050 | Pointer to a struct of type MPU6050_HandleTypeDef |
*sMPU6050 | Pointer to a struct of type MPU6050_HandleTypeDef |
*sMPU6050 | Pointer to a struct of type MPU6050_HandleTypeDef |
Reads addresses 0x28 and 0x29 in the motor RAM to see what the current load is. Load is a percentage of the maximum torque. A value of 0-1023 gets translated into a counterclockwise load (positive), and a value of 1024-2047 gets translated into a clockwise load (negative). The results are written to hdynamixel -> _lastLoad
, and hdynamixel -> _lastReadIsValid
is set if the checksum is verified, and is cleared otherwise
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
goalVelocity | the desired velocity in RPM to use when entering wheel mode |
Where N = readLength. Also, this function computes the checksum of data using the same algorithm as the motors, and it sets ‘hdynamixel -> _lastReadIsValid’ if the computations match, and clears this field otherwise. This is a basic data integrity check that reduces the probability of passing invalid data to the application
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
readAddr | the address inside the motor memory table where reading is to begin |
readLength | the number of bytes to be read. Must be either 1 or 2 |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
args | an array of arguments of the form {ADDR, PARAM_1, ... , PARAM_N} |
numArgs | this must be equal to sizeof(args) , and must be either 2 or 3 |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |
hdynamixel | pointer to a Dynamixel_HandleTypeDef structure that contains the configuration information for the motor |