User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cs:controllers:start [2017/01/07 22:28]
Brandon Kallaher [Gamepad]
cs:controllers:start [2022/04/15 02:29] (current)
Chris Nathman [Running]
Line 5: Line 5:
 This is composed of two programs, joystick_driver and joystick_control. The joystick_driver reads the joystick and publishes the joystick'​s state to a topic, while joystick_control subscribes to this topic and publishes control messages. This is composed of two programs, joystick_driver and joystick_control. The joystick_driver reads the joystick and publishes the joystick'​s state to a topic, while joystick_control subscribes to this topic and publishes control messages.
  
 +==== Running ====
 +The joystick can be run using the following command:
 +  roslaunch robosub joystick.launch
 +
 +==== Controls ====
 Forward/​back and left/right cause the sub to move forward/​back,​ left/right as expected. Twisting the joystick controls the sub's yaw. The hat affects pitch and roll, while pulling the trigger resets the sub to a neutral orientation. The throttle is used for controlling the depth of the sub, with the min and max depths are controlled by settings in the parameter server. Forward/​back and left/right cause the sub to move forward/​back,​ left/right as expected. Twisting the joystick controls the sub's yaw. The hat affects pitch and roll, while pulling the trigger resets the sub to a neutral orientation. The throttle is used for controlling the depth of the sub, with the min and max depths are controlled by settings in the parameter server.
  
Line 10: Line 15:
 This is composed of two programs, gamepad_driver and gamepad_control. The gamepad_driver reads the gamepad and publishes the gamepad'​s state to a topic, while gamepad_control subscribes to this topic and publishes control messages. This is composed of two programs, gamepad_driver and gamepad_control. The gamepad_driver reads the gamepad and publishes the gamepad'​s state to a topic, while gamepad_control subscribes to this topic and publishes control messages.
  
 +==== Running ====
 +The gamepad can be run using the following command:
 +  roslaunch robosub gamepad.launch
 +
 +==== Controls ====
 Forward/​back and left/right on the left stick cause the sub to move forward/​back,​ left/right. Left/right on the left stick controls the sub's yaw. The d-pad affects pitch and roll, while pressing the '​A'​ or '​X'​ button resets the sub to a neutral orientation. The triggers are used for controlling the depth of the sub. Unlike the Joystick, there are no min/max depth settings. The right trigger dives while the left trigger rises. The relative depth change is computed with the difference between the two triggers so there is no harm in pulling both triggers at the same time. Forward/​back and left/right on the left stick cause the sub to move forward/​back,​ left/right. Left/right on the left stick controls the sub's yaw. The d-pad affects pitch and roll, while pressing the '​A'​ or '​X'​ button resets the sub to a neutral orientation. The triggers are used for controlling the depth of the sub. Unlike the Joystick, there are no min/max depth settings. The right trigger dives while the left trigger rises. The relative depth change is computed with the difference between the two triggers so there is no harm in pulling both triggers at the same time.
  
 ====== Keyboard ====== ====== Keyboard ======
  
-Forward/​back and left/right on the left stick cause the sub to move forward/​back,​ left/rightLeft/right on the left stick controls ​the sub's yawThe d-pad affects pitch and roll, while pressing ​the '​A'​ or '​X'​ button resets ​the sub to a neutral orientation. The triggers are used for controlling ​the depth of the sub. Unlike ​the Joystick, there are no min/max depth settingsThe right trigger dives while the left trigger rises. The relative depth change is computed ​with the difference between ​the two triggers so there is no harm in pulling both triggers at the same time.+The keyboard controller has two methods for controlling ​the sub. The first is through qweasdzxc control. q/e control ​the yaw of the sub. wasd control linear movements in the x-y plane. z/c control ​the dive. 
 + 
 +==== Running ==== 
 +The keyboard can be run using the following command: 
 +<code bash> 
 +  ros2 run robosub keyboard_control 
 +</​code>​ 
 +==== Controls ==== 
 +The second control method is the arrow keys and some other keys. The Arrow keys control ​the linear movement ​of the sub in the x-y planeUsing the arrow keys with the Ctrl key pressed control ​the pitch and yaw rotations. Pg-Up/Pg-Dn control ​the dive of the sub.