Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ashwinvk/joystick control #13

Open
wants to merge 4 commits into
base: humble-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[submodule "vesc"]
path = vesc
url = https://github.com/f1tenth/vesc.git
url = git@github.com:NVIDIA-ISAAC-ROS/vesc.git
branch = ros2
[submodule "ackermann_mux"]
path = ackermann_mux
url = https://github.com/f1tenth/ackermann_mux.git
url = git@github.com:NVIDIA-ISAAC-ROS/ackermann_mux.git
branch = foxy-devel
[submodule "teleop_tools"]
path = teleop_tools
url = https://github.com/f1tenth/teleop_tools.git
url = git@github.com:NVIDIA-ISAAC-ROS/teleop_tools.git
branch = foxy-devel
2 changes: 1 addition & 1 deletion ackermann_mux
55 changes: 27 additions & 28 deletions f1tenth_stack/config/joy_teleop.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,45 @@
joy:
joy_linux:
ros__parameters:
device_name: /dev/input/joypad-f710
dev: /dev/input/js0
deadzone: 0.01
autorepeat_rate: 20.0
coalesce_interval: 0.01

joy_teleop:
ros__parameters:
default:
type: topic
interface_type: ackermann_msgs/msg/AckermannDriveStamped
topic_name: teleop
axis_mappings:
drive-speed:
axis: 1
scale: 0.0
offset: 0.0
drive-steering_angle:
axis: 2
scale: 0.0
offset: 0.0
# default:
# type: topic
# interface_type: ackermann_msgs/msg/AckermannDriveStamped
# topic_name: teleop
# axis_mappings:
# drive-speed:
# axis: 1
# scale: 0.0
# offset: 0.0
# drive-steering_angle:
# axis: 2
# scale: 0.0
# offset: 0.0

human_control:
type: topic
interface_type: ackermann_msgs/msg/AckermannDriveStamped
topic_name: teleop
deadman_buttons: [4]
topic_name: ackermann_cmd
deadman_buttons: [6]
axis_mappings:
drive-speed:
axis: 1
scale: 5.0
scale: 1.0
offset: 0.0
drive-steering_angle:
axis: 2
axis: 3
scale: 0.34
offset: 0.0

autonomous_control:
type: topic
interface_type: std_msgs/msg/Int8
topic_name: /dev/null
deadman_buttons: [5]
message_value:
data:
value: 0
# autonomous_control:
# type: topic
# interface_type: std_msgs/msg/Int8
# topic_name: /dev/null
# deadman_buttons: [5]
# message_value:
# data:
# value: 0
2 changes: 1 addition & 1 deletion f1tenth_stack/config/vesc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
steering_angle_to_servo_gain: -1.2135
steering_angle_to_servo_offset: 0.5304

port: /dev/sensors/vesc
port: /dev/ttyACM0
duty_cycle_min: 0.0
duty_cycle_max: 0.0
current_min: 0.0
Expand Down
26 changes: 13 additions & 13 deletions f1tenth_stack/launch/bringup_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def generate_launch_description():
ld = LaunchDescription([joy_la, vesc_la, sensors_la, mux_la])

joy_node = Node(
package='joy',
executable='joy_node',
name='joy',
package='joy_linux',
executable='joy_linux_node',
name='joy_linux_node',
parameters=[LaunchConfiguration('joy_config')]
)
joy_teleop_node = Node(
Expand Down Expand Up @@ -107,12 +107,12 @@ def generate_launch_description():
name='throttle_interpolator',
parameters=[LaunchConfiguration('vesc_config')]
)
urg_node = Node(
package='urg_node',
executable='urg_node_driver',
name='urg_node',
parameters=[LaunchConfiguration('sensors_config')]
)
# urg_node = Node(
# package='urg_node',
# executable='urg_node_driver',
# name='urg_node',
# parameters=[LaunchConfiguration('sensors_config')]
# )
ackermann_mux_node = Node(
package='ackermann_mux',
executable='ackermann_mux',
Expand All @@ -131,11 +131,11 @@ def generate_launch_description():
ld.add_action(joy_node)
ld.add_action(joy_teleop_node)
ld.add_action(ackermann_to_vesc_node)
ld.add_action(vesc_to_odom_node)
# ld.add_action(vesc_to_odom_node)
ld.add_action(vesc_driver_node)
# ld.add_action(throttle_interpolator_node)
ld.add_action(urg_node)
ld.add_action(ackermann_mux_node)
ld.add_action(static_tf_node)
# ld.add_action(urg_node)
# ld.add_action(ackermann_mux_node)
# ld.add_action(static_tf_node)

return ld
2 changes: 1 addition & 1 deletion teleop_tools