-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,6 @@ | |
from geometry_msgs.msg import Wrench | ||
from sensor_msgs.msg import Joy | ||
#git remote set-url origin [email protected]:vortexntnu/vortex-asv.git | ||
import yaml | ||
|
||
|
||
class JoystickInterface(Node): | ||
|
||
|
@@ -51,12 +49,12 @@ def __init__(self): | |
self.declare_parameter('sway', 100.0) | ||
self.declare_parameter('yaw', 100.0) | ||
|
||
self.joystick_surge_scaling = self.get_parameter( | ||
'surge' | ||
).value #is it getting the parameters from the YAML file ? No --> TO DO | ||
self.joystick_surge_scaling = self.get_parameter('surge').value | ||
self.joystick_sway_scaling = self.get_parameter('sway').value | ||
self.joystick_yaw_scaling = self.get_parameter('yaw').value | ||
|
||
|
||
|
||
def create_2d_wrench_message(self, x, y, yaw): | ||
wrench_msg = Wrench() | ||
wrench_msg.force.x = x | ||
|
@@ -88,7 +86,6 @@ def joystick_cb(self, msg): | |
|
||
self.publish_wrench_message(wrench_msg) | ||
|
||
#a = msg.buttons #to remove | ||
return wrench_msg | ||
|
||
|
||
|
@@ -107,6 +104,3 @@ def main(): | |
if __name__ == "__main__": | ||
main() | ||
|
||
#we want to move yaml into joystick_interface foulder | ||
#create launch file for joystick interface | ||
#modify pc launch file by taking out |