lego_nxt_teleoperation_introduction
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
lego_nxt_teleoperation_introduction [2024/08/04 15:49] – Links hhameed | lego_nxt_teleoperation_introduction [2024/08/15 23:30] (current) – Build Instruction Links hhameed | ||
---|---|---|---|
Line 1: | Line 1: | ||
<fs xx-large> | <fs xx-large> | ||
+ | \\ | ||
**Author: **Hashim H., Email: hameeh1@unlv.nevada.edu | **Author: **Hashim H., Email: hameeh1@unlv.nevada.edu | ||
\\ | \\ | ||
Line 41: | Line 41: | ||
**Step 3** | **Step 3** | ||
- | Download the required NXC library and sample/demo on the controller product page listed above or here. It is highly recommended that you compile and run the included sample to understand how to interface with the library. | + | Download the required NXC library and sample/demo on the controller product page listed above or [[http:// |
Line 48: | Line 48: | ||
In any file using the PS2 library, always import the library file and define/ | In any file using the PS2 library, always import the library file and define/ | ||
- | The following is an example of moving a motor connected to port A based on the input of the PS2 controller’s left stick: | + | {{:nxt_controller_motor.jpg? |
- | <code c basic_movement.nxc> | + | The following is an example of moving a motor connected to port A based (pictured above) on the input of the PS2 controller’s left stick: |
+ | |||
+ | [[http:// | ||
+ | |||
+ | <code c [enable_line_numbers=" | ||
//imports the library | //imports the library | ||
#include " | #include " | ||
Line 85: | Line 89: | ||
Given verification of user input given controller output, robotic teleoperation can be performed by building out the module with two motors in a manner similar to the domabot’s base (full instructions [[https:// | Given verification of user input given controller output, robotic teleoperation can be performed by building out the module with two motors in a manner similar to the domabot’s base (full instructions [[https:// | ||
- | The following are examples of functions to use in your main loop for teleoperation (assuming motors connected to ports B and C): | + | {{:nxt_controller_drive.jpg? |
+ | [[https:// | ||
- | <code c drive_functions.nxc> | + | The following are examples of functions to use in your main loop for teleoperation (assuming motors connected to ports B and C [pictured above]): |
+ | |||
+ | <code c [enable_line_numbers=" | ||
//Pass in the current state of a given joystick axis to the respective field(s) | //Pass in the current state of a given joystick axis to the respective field(s) | ||
void tankDrive(int rightStickY, | void tankDrive(int rightStickY, | ||
Line 105: | Line 112: | ||
The following are example functions that may be used and adjusted based on peripheral construction and purpose: | The following are example functions that may be used and adjusted based on peripheral construction and purpose: | ||
- | <code c peripheral_functions.nxc> | + | <code c [enable_line_numbers=" |
//Rotates a motor forward and backward using the square button | //Rotates a motor forward and backward using the square button | ||
//Can be used in mechanisms such as a gripper/ | //Can be used in mechanisms such as a gripper/ | ||
Line 149: | Line 156: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | **<fs x-large> | ||
+ | |||
+ | The following are links to various mobile robot builds and mechanisms to be customized for your teleoperational purposes: | ||
+ | |||
+ | [[https:// | ||
+ | \\ | ||
+ | [[https:// | ||
+ | \\ | ||
+ | [[https:// | ||
+ | \\ | ||
+ | {{ : | ||
+ | \\ | ||
+ | {{ : | ||
+ | |||
+ | |||
+ | <fs x-large> | ||
+ | |||
+ | The purpose of this tutorial has been to inform of the potential for teleoperation using the Lego NXT module, a user utilizing a remote controller to execute defined functions which while explained for mechanical use, may extent far beyond such. | ||
+ | |||
+ | Speculating future work derived from this tutorial includes that of autonomous NXT module operation with an emphasis on function execution in response to visual data. |
lego_nxt_teleoperation_introduction.1722811786.txt.gz · Last modified: by hhameed