Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6dbc6e7
added comparison to see if the gps and apriltags are within a range f…
LegoMaster7001 Dec 7, 2025
793b4e4
added publisher to comparison
LegoMaster7001 Dec 7, 2025
154c2c2
Merge branch 'main' into GPS-AprilTag-Comparison
LegoMaster7001 Jan 14, 2026
e4d8da9
converts gps to field location
LegoMaster7001 Jan 15, 2026
3761b1d
connect to gps_node
LegoMaster7001 Jan 15, 2026
9e21b04
added distance to timer_callback
LegoMaster7001 Jan 15, 2026
1c7610a
estimated coordinates based on google maps
LegoMaster7001 Jan 15, 2026
94029df
removed extra lines
LegoMaster7001 Jan 15, 2026
539423b
added offset for gps to center of robot
LegoMaster7001 Jan 16, 2026
8d14ff8
updated naming convention
LegoMaster7001 Jan 16, 2026
60a5062
coords for practice field
LegoMaster7001 Jan 16, 2026
115a875
gps code
LegoMaster7001 Dec 17, 2025
f632163
rebase, updated to work after implimentation of ben's gps
LegoMaster7001 Jan 17, 2026
638a289
added gps only mode
LegoMaster7001 Jan 17, 2026
1271e17
add requirements.txt (#52)
brandongasser Jan 14, 2026
c761b7e
Merged auto (#53)
Garret-Burnight Jan 16, 2026
52cae91
Co-authored-by: Kaitlyn Nickel <kaitlyn-nickel@users.noreply.github.com>
Karsten-Larson Jan 17, 2026
de1b031
Changes to 2024 auto
Karsten-Larson Jan 17, 2026
5541837
Commit random code
Karsten-Larson Jan 17, 2026
e95b6a7
numbers (by Ben)
LegoMaster7001 Jan 17, 2026
44b555b
auto now uses comparison
LegoMaster7001 Jan 17, 2026
1d2e046
updated logger
LegoMaster7001 Jan 17, 2026
8747e14
output coords returns angular.y
LegoMaster7001 Jan 17, 2026
ef97d68
added launch
LegoMaster7001 Feb 10, 2026
99f674d
added location calculate as an entry point and moved location calcula…
LegoMaster7001 Feb 24, 2026
c48d6b4
working gps
LegoMaster7001 Mar 30, 2026
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
28 changes: 27 additions & 1 deletion launch/auto.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def generate_launch_description():
#Auto control node
start_auto_node = Node(
package='control_pkg',
executable='auto',
executable='old_auto',
name='auto'
)

Expand All @@ -28,13 +28,39 @@ def generate_launch_description():
name='imu'
)

#AprilTag detection node
start_apriltag_node = Node(
package='jetson_pkg',
executable='apriltag',
name='apriltag',
parameters=[
{'cap':'rtsp://admin:hyflex@192.168.1.131:80/cam/realmonitor?channel=1&subtype=0'},
{'fx':1071.1362274102335},
{'fy':1102.1406887400624},
{'cx':953.030188084331},
{'cy':468.0382502048589}
]
)

#location calculate node
start_location_node = Node(
package='control_pkg',
executable='location_calculate',
name='location_node'
)




#Declare launch description and populate
ld = LaunchDescription()

#declare launch actions
ld.add_action(start_location_node)

#declare launch actions
ld.add_action(start_axle_manager_node)
ld.add_action(start_auto_node)
ld.add_action(start_apriltag_node)

return ld
2 changes: 1 addition & 1 deletion launch/fqr.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def generate_launch_description():
name='imu'
)



#Declare launch description and populate
ld = LaunchDescription()
Expand Down
14 changes: 10 additions & 4 deletions launch/lidar.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,33 @@
def generate_launch_description():
sick_scan_pkg_prefix = get_package_share_directory('sick_scan_xd')
lms_launch_file_path = os.path.join(sick_scan_pkg_prefix, 'launch/sick_lms_1xx.launch')
laser_scan_node = Node(
laserscan_node = Node(
package='sick_scan_xd',
executable='sick_generic_caller',
output='screen',
arguments=[
lms_launch_file_path,
'hostname:=192.168.1.134',
'tf_base_frame_id:=lidar_laser',
'scan_freq:=25',
'ang_res:=0.5',
]
'tf_base_frame_id:=lidar_laser'
]
)

location_calc_node = Node(
package="axle_manager",
executable="location_calculate"
)

obs_node = Node(
package='sensors_pkg',
executable='obs',
name='obs',
)

return LaunchDescription([
laser_scan_node,
laserscan_node,
location_calc_node,
obs_node
])

18 changes: 18 additions & 0 deletions launch/waypoint_auto.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
start_waypoint = Node(
package='waypoint',
executable='waypoint',
name='waypoint'
)

#Auto control node
start_auto_node = Node(
package='control_pkg',
executable='auto',
name='auto'
)

return LaunchDescription([start_waypoint, start_auto_node])
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apriltag
cv2
numpy
8 changes: 4 additions & 4 deletions rosinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ sudo apt update
sudo apt install ros-dev-tools
sudo apt update
sudo apt upgrade
sudo apt install ros-iron-ros-base
source /opt/ros/iron/setup.bash
echo "source /opt/ros/iron/setup.bash" >> ~/.bashrc
sudo apt install ros-jazzy-ros-base
source /opt/ros/jazzy/setup.bash
echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc
echo "export ROS_DOMAIN_ID=42" >> ~/.bashrc
sudo apt install python3-colcon-common-extensions python3-pip ros-iron-joy-linux
sudo apt install python3-colcon-common-extensions python3-pip ros-jazzy-joy-linux
pip install setuptools==58.2.0 serial
10 changes: 5 additions & 5 deletions src/axle_manager/axle_manager/hdc2460_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def __init__(self):
('leftChannel',1),
('rightChannel',2),
('maxSpeed',500),
('accelRate',31860),
('brakeRate',10620),
('accelRate',31860 // 6),
('brakeRate',10620 // 6),
('pivotDevice',"FAC"),
('pivotExtendChannel',1),
('pivotRetractChannel',2),
Expand Down Expand Up @@ -50,11 +50,11 @@ def __init__(self):
rightChannel_param = self.get_parameter('rightChannel').value
rightChannel = int(rightChannel_param) if rightChannel_param is not None else 2
maxSpeed_param = self.get_parameter('maxSpeed').value
maxSpeed = int(maxSpeed_param) if maxSpeed_param is not None else 500
maxSpeed = int(maxSpeed_param) if maxSpeed_param is not None else 250 #500 (changed 12/8/2025)
accelRate_param = self.get_parameter('accelRate').value
accelRate = int(accelRate_param) if accelRate_param is not None else 31860
accelRate = int(accelRate_param) if accelRate_param is not None else 15930 #31860 (changed 12/8/2025)
brakeRate_param = self.get_parameter('brakeRate').value
brakeRate = int(brakeRate_param) if brakeRate_param is not None else 10620
brakeRate = int(brakeRate_param) if brakeRate_param is not None else 5310 #10620 (changed 12/8/2025)
self.pivotDevice = str(self.get_parameter('pivotDevice').value)
pivotLeft_param = self.get_parameter('pivotExtendChannel').value
self.pivotLeft = int(pivotLeft_param) if pivotLeft_param is not None else 1
Expand Down
62 changes: 62 additions & 0 deletions src/axle_manager/axle_manager/wheel_odometry_interpret.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import math

#angle with reference to start direction maybe radians maybe degrees
# orientation = 90

#location relative to start in m
#
#+y = foreward, -y = backwards at orientation 90
#+x = right, -x = left at orientation 90
# location_x = 0
# location_y = 0

#minutes between signals
# time_frame = 1/600

#wheel circumference in meters
wc = 0.43 * math.pi

#wheel track in meters
wt = .915

def update_odometry(left:float, right:float, time_frame=1/600):
#use subscription to sensor_picker to grap accurate position and orientation

#put in to update right and left here


#math to determine variables
distance_right = right * time_frame * wc
distance_left = left * time_frame * wc

change_orientation = (distance_right - distance_left) / wt

distance_avg = (distance_left + distance_right) / 2.0


if distance_left != distance_right:
turning_radius = distance_left / change_orientation + wt / 2.0
direct = 2 * turning_radius * turning_radius * (1 - math.cos(change_orientation * math.pi / 180)) / (change_orientation / 360 * turning_radius)
else:
direct = 0.0

return change_orientation, distance_avg, direct


# If going straight
# if distance_left == 0:
# #update just location
# location_y = location_y + distance_avg * math.sin(orientation * math.pi / 180)
# location_x = location_x + distance_avg * math.cos(orientation * math.pi / 180)
# else:
# #direct is the ratio of direct distance to the distance along a circle
# direct = 2 * turning_radius * turning_radius * (1 - math.cos(change_orientation * math.pi / 180)) / (change_orientation/360 * turning_radius)

# #updates location x,y
# location_y = location_y + math.sin((orientation + .5 * change_orientation) * math.pi / 180) * distance_avg * direct
# location_x = location_x + math.cos((orientation + .5 * change_orientation) * math.pi / 180) * distance_avg * direct
# #updates orientation
# orientation = (orientation + change_orientation) % 360

#publish location and orientation

5 changes: 3 additions & 2 deletions src/axle_manager/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
tests_require=['pytest'],
entry_points={
'console_scripts': [
'axle_manager = axle_manager.hdc2460_node:main'
'axle_manager = axle_manager.hdc2460_node:main',
'location_calculate = axle_manager.location_calculate_node:main'
],
},
)
)
Loading