From 03a595604d8565cc33c2c333ac80597ea8eab4d1 Mon Sep 17 00:00:00 2001
From: fherrero <fherrero@iri.upc.edu>
Date: Tue, 18 Sep 2018 11:47:32 +0200
Subject: [PATCH] Added ps3joy udev rules example. Fixed ps3.yaml button
 mapping and launch

---
 config/99-ps3joy.rules   | 2 ++
 config/ps3.yaml          | 6 +++---
 launch/teleop_ps3.launch | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)
 create mode 100644 config/99-ps3joy.rules

diff --git a/config/99-ps3joy.rules b/config/99-ps3joy.rules
new file mode 100644
index 0000000..6ae22c7
--- /dev/null
+++ b/config/99-ps3joy.rules
@@ -0,0 +1,2 @@
+SUBSYSTEMS=="input", KERNEL=="js[0-9]*", ATTRS{name}=="PLAYSTATION(R)3 Controller", SYMLINK+="input/ps3joy"
+SUBSYSTEMS=="input", KERNEL=="js[0-9]*", ATTRS{name}=="Sony PLAYSTATION(R)3 Controller", SYMLINK+="input/ps3joy"
diff --git a/config/ps3.yaml b/config/ps3.yaml
index c66e7f5..b7a3f57 100644
--- a/config/ps3.yaml
+++ b/config/ps3.yaml
@@ -2,9 +2,9 @@ axis_linear: 1
 scale_linear: 0.5
 scale_linear_turbo: 2.0
 
-axis_angular: 2
+axis_angular: 3
 scale_angular: 1.0
 
-enable_button: 11  # R1 shoulder button
-enable_turbo_button: 9  # R2 shoulder button
+enable_button: 5  # R1 shoulder button
+enable_turbo_button: 7  # R2 shoulder button
 
diff --git a/launch/teleop_ps3.launch b/launch/teleop_ps3.launch
index 1944194..6ba1bcf 100644
--- a/launch/teleop_ps3.launch
+++ b/launch/teleop_ps3.launch
@@ -3,7 +3,7 @@
 
   <arg name="name" default="teleop_ps3"/>
   <arg name="dev"  default="/dev/input/ps3joy"/>
-  <arg name="config_filepath" default="$(find twist_to_manual_control)/config/ps3.yaml" />
+  <arg name="config_filepath" default="$(find iri_twist_to_manual_control)/config/ps3.yaml" />
   <arg name="speed_topic"    default="/manual_control/speed"/>
   <arg name="steering_topic" default="/steering"/>
 
-- 
GitLab