Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
Modified to allow multiple RobotHWSim instaces, each with their own controller manager
*/

#include <optional>
// ROS
#include <ros/ros.h>
#include <pluginlib/class_loader.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,19 @@ hardware_interface:
- {name: bl_drive, type: talonfxpro, can_bus: CANivore, can_id: 23, local: true}
- {name: bl_angle, type: talonfxpro, can_bus: CANivore, can_id: 13, local: true}

- {name: elevator_leader, type: talonfxpro, can_bus: CANivore, can_id: 31, local: true}
- {name: elevator_follower, type: talonfxpro, can_bus: CANivore, can_id: 32, local: true}
- {name: four_bar, type: talonfxpro, can_bus: CANivore, can_id: 41, local: true}
#- {name: elevator_leader, type: talonfxpro, can_bus: CANivore, can_id: 31, local: true}
#- {name: elevator_follower, type: talonfxpro, can_bus: CANivore, can_id: 32, local: true}
# DO NOT MERGE THIS IN COMMENTED
#- {name: four_bar, type: talonfxpro, can_bus: CANivore, can_id: 41, local: true}

- {name: intake, type: talonfxpro, can_bus: CANivore, can_id: 51, local: true}
#- {name: intake, type: talonfxpro, can_bus: CANivore, can_id: 51, local: true}

#- {name: pcm, type: pcm, pcm_id: 0}
- {name: pigeon2, type: pigeon2, frame_id: pigeon2_frame, can_bus: CANivore, can_id: 0, local: true}
#- {name: pigeon2, type: pigeon2, frame_id: pigeon2_frame, can_bus: CANivore, can_id: 0, local: true}

- {name: candle1, can_id: 0, can_bus: CANivore, type: candle, local: true}
#- {name: candle1, can_id: 0, can_bus: CANivore, type: candle, local: true}

- {name: babys_first_orchestra, type: orchestra, id: 1}
#- {name: babys_first_orchestra, type: orchestra, id: 1}

- {name: robot_code_ready_jetson, local: true, type: ready}
- {name: robot_code_ready_rio, local: false, type: ready} # Probably not really needed?
Expand All @@ -78,7 +79,7 @@ intake_talonfxpro_controller:
joint: intake
invert: counterclockwise_positive
dynamic_reconfigure: True
neutral_mode: Coast
neutral_mode: Coast # TODO - probably want brake mode here?

# This one creates the /talon_states topic necessary in ROS
# It doesn't actually control anything, just takes the internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ swerve_drive_controller:
f_a: 0.005
f_v: 0.0379

# Inverts work for sim and will likely break reality

# TODO : move this into sensor_to_mechanism_ratio for Falcons
ratio_encoder_to_rotations: 0.148148148 # Test me, will show up in odom results

Expand All @@ -44,6 +46,7 @@ swerve_drive_controller:
use_cos_scaling: True # scale motor speed by how close angle motors are to setpoints
speed_joint_fl:
joint: fl_drive
invert: clockwise_positive
close_loop_values:
- {kP: 1.00, kI: 0.0, kD: 0.0, kV: 0.125, kS: 0.0}
#current_limit_continuous_amps: 15
Expand All @@ -58,6 +61,7 @@ swerve_drive_controller:
#neutral_deadband: 0.01
speed_joint_fr:
joint: fr_drive
invert: counterclockwise_positive
close_loop_values:
- {kP: 1.00, kI: 0.0, kD: 0.0, kV: 0.125, kS: 0.0}
#current_limit_continuous_amps: 15
Expand All @@ -72,6 +76,7 @@ swerve_drive_controller:
#neutral_deadband: 0.01
speed_joint_bl:
joint: bl_drive
invert: clockwise_positive
close_loop_values:
- {kP: 1.00, kI: 0.0, kD: 0.0, kV: 0.125, kS: 0.0}
#feedback_type: IntegratedSensor
Expand All @@ -87,6 +92,7 @@ swerve_drive_controller:
#neutral_deadband: 0.01
speed_joint_br:
joint: br_drive
invert: counterclockwise_positive
close_loop_values:
- {kP: 1.00, kI: 0.0, kD: 0.0, kV: 0.125, kS: 0.0}
#feedback_type: IntegratedSensor
Expand Down Expand Up @@ -166,7 +172,7 @@ swerve_angle_phoenix6_controller:
remote_feedback_device_id0: 13
#neutral_deadband: 0.01
close_loop_values:
- {kP: 80, kI: 0.000, kD: 0.0, kV: 2.85, kS: 0}
- {kP: 8000, kI: 0.000, kD: 0.0, kV: 2.85, kS: 0}
invert: clockwise_positive
neutral_deadband: 0.01
motion_magic_cruise_velocity: 5.0
Expand Down