Skip to content

Commit

Permalink
Removed joy_teleop namespace, remap topics to that namespace instead
Browse files Browse the repository at this point in the history
  • Loading branch information
roni-kreinin committed Aug 10, 2023
1 parent c869050 commit be381dd
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
15 changes: 8 additions & 7 deletions clearpath_control/config/a200/teleop_logitech.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@
# D-pad Horiz. 6
# D-pad Vert. 7

joy_teleop/teleop_twist_joy_node:
joy_node:
ros__parameters:
use_sim_time: False
deadzone: 0.1
autorepeat_rate: 20.0
dev: /dev/input/f710
teleop_twist_joy_node:
ros__parameters:
use_sim_time: False
axis_linear.x: 1
Expand All @@ -52,9 +58,4 @@ joy_teleop/teleop_twist_joy_node:
scale_angular_turbo.yaw: 1.2
enable_button: 4
enable_turbo_button: 5
joy_teleop/joy_node:
ros__parameters:
use_sim_time: False
deadzone: 0.1
autorepeat_rate: 20.0
dev: /dev/input/f710

4 changes: 2 additions & 2 deletions clearpath_control/config/a200/teleop_ps4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
# Accel y 6
# Accel z 8

joy_teleop/teleop_twist_joy_node:
teleop_twist_joy_node:
ros__parameters:
use_sim_time: False
axis_linear.x: 1
Expand All @@ -65,7 +65,7 @@ joy_teleop/teleop_twist_joy_node:
scale_angular_turbo.yaw: 1.2
enable_button: 4
enable_turbo_button: 5
joy_teleop/joy_node:
joy_node:
ros__parameters:
use_sim_time: False
deadzone: 0.1
Expand Down
4 changes: 2 additions & 2 deletions clearpath_control/config/j100/teleop_logitech.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# D-pad Horiz. 6
# D-pad Vert. 7

joy_teleop/teleop_twist_joy_node:
teleop_twist_joy_node:
ros__parameters:
use_sim_time: False
axis_linear.x: 1
Expand All @@ -52,7 +52,7 @@ joy_teleop/teleop_twist_joy_node:
scale_angular_turbo.yaw: 1.4
enable_button: 4
enable_turbo_button: 5
joy_teleop/joy_node:
joy_node:
ros__parameters:
use_sim_time: False
deadzone: 0.1
Expand Down
4 changes: 2 additions & 2 deletions clearpath_control/config/j100/teleop_ps4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
# Accel y 6
# Accel z 8

joy_teleop/teleop_twist_joy_node:
teleop_twist_joy_node:
ros__parameters:
use_sim_time: False
axis_linear.x: 1
Expand All @@ -65,7 +65,7 @@ joy_teleop/teleop_twist_joy_node:
scale_angular_turbo.yaw: 1.4
enable_button: 4
enable_turbo_button: 5
joy_teleop/joy_node:
joy_node:
ros__parameters:
use_sim_time: False
deadzone: 0.1
Expand Down
10 changes: 7 additions & 3 deletions clearpath_control/launch/teleop_joy.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def generate_launch_description():
]

node_joy = Node(
namespace='joy_teleop',
package='joy_linux',
executable='joy_linux_node',
output='screen',
Expand All @@ -79,18 +78,23 @@ def generate_launch_description():
('/diagnostics', 'diagnostics'),
('/tf', 'tf'),
('/tf_static', 'tf_static'),
('joy', 'joy_teleop/joy'),
('joy/set_feedback', 'joy_teleop/joy/set_feedback'),
]
)

node_teleop_twist_joy = Node(
namespace='joy_teleop',
package='teleop_twist_joy',
executable='teleop_node',
output='screen',
name='teleop_twist_joy_node',
parameters=[
config_teleop_joy,
{'use_sim_time': use_sim_time}]
{'use_sim_time': use_sim_time}],
remappings=[
('joy', 'joy_teleop/joy'),
('cmd_vel', 'joy_teleop/cmd_vel'),
]
)

ld = LaunchDescription()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ def write_obj(self, key: str, obj: object, indent_level=1):
def write_file(self):
ros_parameters = self.param_file.to_ros_parameters()
for k in ros_parameters:
self.write_obj(k, ros_parameters[k])
self.write_obj(k, ros_parameters[k], indent_level=0)
self.file.close()

0 comments on commit be381dd

Please sign in to comment.