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

Development merge from pool test #1

Open
wants to merge 141 commits into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
70451d3
rewritten slider to use hooks
ivanscode Apr 10, 2021
a64f223
added default props to slider hook
ivanscode Apr 12, 2021
d7937d1
ThrustTweaker converted to use hooks
ivanscode Apr 12, 2021
e5ad85c
removed unused node
ivanscode Apr 12, 2021
10c4834
sliders should be integrated, need testing
ivanscode Apr 12, 2021
5e2aeb9
post pool test
ivanscode Apr 12, 2021
c3d0602
camera rewritten to use hooks
ivanscode Apr 13, 2021
6a914b9
log rewritten to use hooks
ivanscode Apr 13, 2021
329c8f3
servo moved to hooks
ivanscode Apr 14, 2021
53eda00
ThrusterCircle moved to hooks
ivanscode Apr 14, 2021
12bb1ce
ThrusterInfo moved to hooks
ivanscode Apr 14, 2021
61ab9cf
MainWindow moved to hooks
ivanscode Apr 14, 2021
98ad3f6
tweaker layout fixed
ivanscode Apr 14, 2021
9d14cd1
pool test cleanup
jheidegger Apr 14, 2021
fdad7a2
Merge branch 'development' of https://github.com/purduerov/X13-Core i…
jheidegger Apr 14, 2021
a61b0a8
fixed inner git repo
jheidegger Apr 14, 2021
a4949c9
cleaned control and launch files
jheidegger Apr 14, 2021
0b2081a
initial cleanup
ivanscode Apr 14, 2021
b4144b0
removed swp files
ivanscode Apr 14, 2021
4c26073
Merge remote-tracking branch 'origin/cleanup' into ros-cleanup
ivanscode Apr 14, 2021
ad23c94
added hardware constants again
jheidegger Apr 15, 2021
b4994d7
thrust_mapping is back
jheidegger Apr 15, 2021
4c844cc
compensator init
ivanscode Apr 15, 2021
aaadb61
ThrusterCircle fix
ivanscode Apr 15, 2021
82b9d20
colors added
ivanscode Apr 15, 2021
e828786
added maxwidth to cameraframe | compensator now responds to grid layout
ivanscode Apr 16, 2021
7b16fcf
to test for servo
jasonbleasdell Apr 16, 2021
071bc7c
servo completly works now and bounds are set
jheidegger Apr 16, 2021
13bebb2
Changed slider behavior
ivanscode Apr 17, 2021
306d5f3
Merge branch 'compensator' into surface
ivanscode Apr 17, 2021
e1fb01e
Added CoM sliders
ivanscode Apr 17, 2021
21b1f01
Merge pull request #15 from purduerov/servoTesting
jheidegger Apr 19, 2021
e7b2e06
post sunday pool test
jheidegger Apr 21, 2021
2fc29df
moving stuff around
ivanscode Apr 21, 2021
28fda95
resolved
ivanscode Apr 21, 2021
cdb56a5
Merge branch 'cleanup' into development
ivanscode Apr 21, 2021
c1dbb21
fixed gamepad listener bug
ivanscode Apr 21, 2021
97d9558
small workouround for procs not dying
ivanscode Apr 21, 2021
4b57eac
wip
ivanscode Apr 22, 2021
145c66b
servo fixed
ivanscode Apr 22, 2021
eb6b639
Working trim and CoM
ivanscode Apr 22, 2021
b3e6b2a
Changed intial starting angle of the servo
jasonbleasdell Apr 23, 2021
67b1056
Merge pull request #17 from purduerov/jasonbleasdell-patch-1
ivanscode Apr 23, 2021
5d10c23
post pool test 4/23
ivanscode Apr 24, 2021
c64f185
post pool test april 23
jheidegger Apr 24, 2021
17b819e
Merge branch 'development' of https://github.com/purduerov/X13-Core i…
jheidegger Apr 24, 2021
8fde5b5
Slider broken
ivanscode Apr 24, 2021
f1d3cec
changed CoM range
ivanscode Apr 24, 2021
ffcecb3
sliders fixed
ivanscode Apr 24, 2021
b35c123
Merge branch 'profiles' into surface
ivanscode Apr 24, 2021
48e0634
added timestamp to servo
ivanscode Apr 24, 2021
e0734b9
removed dist files
ivanscode Apr 24, 2021
589c86d
com update and removed ramping
jheidegger Apr 24, 2021
6b8c98d
Merge pull request #18 from purduerov/ros-jonathan
ivanscode Apr 24, 2021
fffaefe
Merge pull request #19 from purduerov/surface
jheidegger Apr 24, 2021
48150a2
post pool test
ivanscode Apr 26, 2021
c76b3fb
?
ivanscode Apr 28, 2021
62f3144
Fixed layout | added colors to Log
ivanscode Apr 28, 2021
97f5e9f
tested for 4/30
ivanscode Apr 29, 2021
b8c5229
Added tools image
ivanscode May 1, 2021
abb90ea
added the dumb dumb
jasonbleasdell May 1, 2021
717d7ad
Added switch
ivanscode May 1, 2021
4d2a17b
removed duplicate image
ivanscode May 1, 2021
a71f8e0
changed the thruste mapper a bit
jheidegger May 1, 2021
91bd185
direct to tools
May 3, 2021
9476bf6
added all solenoid test
May 3, 2021
b6692ba
thrusters running with this
May 3, 2021
e0dcab0
Merge pull request #20 from purduerov/jasonMadeDumbServo
jheidegger May 3, 2021
4bfc267
Merge pull request #21 from purduerov/thrustdevel
ivanscode May 3, 2021
4594c26
Merge pull request #22 from purduerov/tools-rewrite
jheidegger May 3, 2021
ce2180f
should be working
ivanscode May 7, 2021
3690310
Added reverse button
ivanscode May 7, 2021
454fefe
Hexadecimal CAD IDs and more formats for solenoid state
grantg012 May 9, 2021
9b2f480
Added a cleaner toggle | WIP on Profiles
ivanscode May 12, 2021
67b0ae7
Add extra testing scripts
grantg012 May 14, 2021
79a5755
Tested on the pi
grantg012 May 16, 2021
f77cefc
Merge pull request #23 from purduerov/grant-test-code
ivanscode May 19, 2021
3309e04
latest and greatest
ivanscode May 29, 2021
9d6a4d5
Add script to receive CAN messages
grantg012 Jul 24, 2021
5228fc2
Work the existing code just worked
Jul 24, 2021
c67ae18
button setup
Aug 4, 2021
7e1bcb6
cv init
ivanscode Aug 4, 2021
b9bddc0
Merge branch 'add-to-thrusters' into surface-dev
ivanscode Aug 5, 2021
9922f51
Merge pull request #24 from purduerov/surface-dev
ivanscode Aug 5, 2021
e36952a
Swapped Y translation sign
ivanscode Aug 5, 2021
3e7d357
Added frame capture logic
ivanscode Aug 5, 2021
89a7223
Fixed fine mode button
ivanscode Aug 5, 2021
787939a
Added Save Frame button
ivanscode Aug 5, 2021
1b7d491
Added fine mode scale slider
ivanscode Aug 5, 2021
85fb7e7
Moved all controls under Profiles
ivanscode Aug 5, 2021
13a666f
working yeet mode and fine mode scaling
Aug 5, 2021
5cb9343
yeet mode and fine mode scaling added
ivanscode Aug 5, 2021
a272dae
Added profiles for ThrustTweaker
ivanscode Aug 5, 2021
99e6ca6
Profiles fully implemented
ivanscode Aug 5, 2021
03359aa
Camera frame fills vertical space and not blocked by other streams
ivanscode Aug 5, 2021
e8680cf
Added camera rotation persistence
ivanscode Aug 5, 2021
47fdb75
Added several configurations to Profiles
ivanscode Aug 5, 2021
59f450a
rail setup
ivanscode Aug 5, 2021
8f941c2
frames saved on button click
ivanscode Aug 5, 2021
d649cb0
test run
ivanscode Aug 5, 2021
f1046c1
add cv to gitignore
ivanscode Aug 5, 2021
234e464
post test
ivanscode Aug 5, 2021
40a3abd
possible COM fix
ivanscode Aug 5, 2021
96a5ab9
Print the interpretation of telemetry data
grantg012 Aug 8, 2021
5c0193c
Make the code CLEAN
grantg012 Aug 21, 2021
af5a534
Merge pull request #25 from purduerov/grant-can-rx
ivanscode Aug 21, 2021
073b884
pi thrust control
Sep 22, 2021
c0d7f63
merge conflict
Sep 22, 2021
e736de3
Updated ReadMe
babelman20 Sep 29, 2021
f153142
Fixed README update
babelman20 Sep 29, 2021
41f7f9e
Merge pull request #2 from purduerov/X14-10-feature-BranchLearning
jheidegger Sep 29, 2021
e184707
added pi_temp_node
Sep 29, 2021
f2ae64d
removed outdated tf library. ready to test it on the pi and figure ou…
Oct 13, 2021
c20cc61
commented out some more stuff
Oct 13, 2021
4b0b404
Update pi_temp_node.py
Torin1914 Oct 14, 2021
567c6ce
Merge pull request #3 from purduerov/X14-11-feature-pi_temp_node
jheidegger Oct 14, 2021
7c5f44a
Merge pull request #4 from purduerov/X14-14-feature-imu-fix
jheidegger Oct 14, 2021
f4f7e0b
Create README.md
Hunter314 Oct 16, 2021
441f762
Added ROS node for ESC data
babelman20 Oct 16, 2021
c77214a
Changed run order and added redundancy for rospy shutdown checks
babelman20 Oct 16, 2021
466de55
Stop running when stopped please
babelman20 Oct 16, 2021
c20091d
please stop when killed
babelman20 Oct 16, 2021
d31c787
Ready for integration
babelman20 Oct 16, 2021
e17b17c
Merge pull request #5 from purduerov/surface
jheidegger Oct 18, 2021
3287997
Merge pull request #6 from purduerov/X14-5-feature-ESCdata
jheidegger Oct 18, 2021
a8fe297
Update rov_velocity_command.msg
jheidegger Oct 18, 2021
0fd8064
Added ispoolcentric
Hunter314 Oct 18, 2021
c1eebfa
ROV velocity fix
Hunter314 Oct 18, 2021
741788f
Should be working version of slider component
TenGui Dec 23, 2021
2c87498
Working version w/ enter key added
TenGui Dec 23, 2021
6ad6509
Added WIP clean-up
TenGui Dec 23, 2021
ffb9edb
Cleaned Up Slider Component w/ sub Functional Components
TenGui Dec 23, 2021
90c57c9
Cleaned up Slider Component with functional components
TenGui Dec 23, 2021
04b9f85
Merge pull request #7 from purduerov/X14-48-ServoComponentInput
Hunter314 Jan 15, 2022
9f6a94f
Update thrust_mapping.py
Hunter314 Mar 10, 2022
9119c84
Update thrust_mapping.py
Hunter314 Mar 10, 2022
198e6b0
soleniod code
jheidegger Apr 9, 2022
d2be954
added variable ip changing to compros
jheidegger Apr 11, 2022
7f39821
Merge branch 'development' of https://github.com/purduerov/X14-Core i…
jheidegger Apr 11, 2022
7ac324a
Pool test April 17
jheidegger Apr 20, 2022
e3d84c9
Merge branch 'development' of https://github.com/purduerov/X14-Core i…
jheidegger Apr 20, 2022
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
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
ros/build
ros/devel
<<<<<<< HEAD
.vscode
=======
*.swp
>>>>>>> origin/surface-hunter
.idea/*
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,6 @@ After what seems like an eternity (about 30 minutes for me), you should have a w
If this was ported from X12, some files still contain python shebangs. Try changing them to python3 ones.
Another issue might be is that you need to build nodes in `/ros` before `/surface/ros`

In all cases, especially if you have had previous ROS installs on your machine, make sure `rosdep init`'s file is up-to-date with Python 3 dependencies. Meaning run `rosdep init` to find the file and delete it. Run that command again and run `rosdep update`. You may need to use `sudo` with the init stage.
In all cases, especially if you have had previous ROS installs on your machine, make sure `rosdep init`'s file is up-to-date with Python 3 dependencies. Meaning run `rosdep init` to find the file and delete it. Run that command again and run `rosdep update`. You may need to use `sudo` with the init stage.

Updated: 9/29/21
3 changes: 2 additions & 1 deletion ros/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.catkin_workspace
*.swp
**/*.swp
**/__pycache__
**/*.pyc
16 changes: 0 additions & 16 deletions ros/compros.sh

This file was deleted.

24 changes: 0 additions & 24 deletions ros/launch/run_all.launch

This file was deleted.

6 changes: 0 additions & 6 deletions ros/launch/run_msurface.launch

This file was deleted.

6 changes: 0 additions & 6 deletions ros/launch/run_roslib.launch

This file was deleted.

7 changes: 3 additions & 4 deletions ros/launch/run_rov.launch
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
<node name="ROV_main" pkg="control" type="ROV_main.py"/>
<node name="depth" pkg="i2c" type="depth_proc.py"/>
<node name="imu" pkg="i2c" type="imu_proc.py" output="screen"/>
<node name="servo" pkg="i2c" type="servo_listener.py"/>

<node name="thrust_control" pkg="control" type="thrust_control.py" output="screen"/>
<node name="servo" pkg="i2c" type="nuked_dumb_servo_listener.py"/>
<node name="pi_temp" pkg="pi_temp" type="pi_temp_node.py"/>
<node name="thrust_control" pkg="control" type="thrust_control.py" output="screen"/>
</group>
<node name="gp_listen" pkg="roslib_comm" type="gamepad_listener.py"/>

<node pkg="tf2_ros" type="static_transform_publisher" name="link1_broadcaster" args="0 0 0 0 0.7068252 0 0.7073883 imu base_link" />
</launch>
13 changes: 0 additions & 13 deletions ros/launch/run_rov_simple.launch

This file was deleted.

5 changes: 0 additions & 5 deletions ros/launch/run_surface.launch

This file was deleted.

4 changes: 2 additions & 2 deletions ros/piros.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/bash

source ~/X13-Core/ros/devel/setup.bash
source ~/X14-Core/ros/devel/setup.bash
export ROS_IP=192.168.1.3
export ROS_PYTHON_VERSION=3
roslaunch ~/X13-Core/ros/launch/run_rov.launch
roslaunch ~/X14-Core/ros/launch/run_rov.launch
2 changes: 1 addition & 1 deletion ros/src/can_com/scripts/can_bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def topic_message_received(msg):
data_list.append((msg.data >> shift) % 256)
data = bytearray(data_list)
rospy.loginfo('Topic Message Received: ' + str(msg.id) + ':' + str(list(data)))
can_tx = can.Message(arbitration_id=msg.id, data=data, extended_id=False)
can_tx = can.Message(arbitration_id=msg.id, data=data, is_extended_id=False)
try:
can_bus.send(can_tx, timeout=1)
except can.CanError as cerr:
Expand Down
14 changes: 7 additions & 7 deletions ros/src/can_com/scripts/can_nuke.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
boards = [0x201, 0x202, 0x203]

while True:
packet = bytearray([140,140,140,140,140,140,140,140])
packet = bytearray([140, 140, 140, 140, 140, 140, 140, 140])
for cid in boards:
can_tx = can.Message(arbitration_id=cid, data=packet, extended_id=False)
can_tx = can.Message(arbitration_id=cid, data=packet, extended_id=False)

can_bus.send(can_tx, timeout=0.001)
can_bus.send(can_tx, timeout=0.001)

print(cid, list(packet))
print(cid, list(packet))
time.sleep(0.3)

packet = bytearray([140,140,140,140,127,127,127,127])
packet = bytearray([140, 140, 140, 140, 127, 127, 127, 127])
for cid in boards:
can_tx = can.Message(arbitration_id=cid, data=packet, extended_id=False)
can_tx = can.Message(arbitration_id=cid, data=packet, extended_id=False)
can_bus.send(can_tx, timeout=0.001)

print(cid, list(packet))
print(cid, list(packet))
time.sleep(0.3)
9 changes: 5 additions & 4 deletions ros/src/can_com/scripts/chaotic_good.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import time

IDS = [513, 514, 515]
N_CAN_BYTES = 8
POS_RANGE = 4
DEFAULT_POWER = 146
ZERO_POWER = 127
Expand All @@ -19,15 +20,15 @@
channel = sys.argv[1]
can_bus = can.interface.Bus(channel=channel, bustype='socketcan')

for i in range(8):
data_list = list()
for i in range(N_CAN_BYTES):
data_list = []
[data_list.append(0) for _ in range(i)]
data_list.append(DEFAULT_POWER)
[data_list.append(0) for _ in range(i + 1, 8)]
[data_list.append(0) for _ in range(i + 1, N_CAN_BYTES)]

# [data_list.append(DEFAULT_POWER) for _ in range(8)]
data = bytearray(data_list)
print str(I) + ' : ' + str(list(data))
print(f"{I} : {list(data)}")

can_tx = can.Message(arbitration_id=I, data=data, extended_id=False)
can_bus.send(can_tx)
Expand Down
37 changes: 0 additions & 37 deletions ros/src/can_com/scripts/solenoid_test.py

This file was deleted.

12 changes: 6 additions & 6 deletions ros/src/can_com/scripts/thrust_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
data_list.append(ZERO_POWER - POWER_DELTA) # adds DEFAULT POWER at target pos
[data_list.append(ZERO_POWER) for _ in range(POS_RANGE - p - 1)] # adds ZERO POWER buffers after target pos
data = bytearray(data_list)
print str(i) + ' : ' + str(list(data))
print(str(i) + ' : ' + str(list(data)))

can_tx = can.Message(arbitration_id=i, data=data, extended_id=False)
can_tx = can.Message(arbitration_id=i, data=data, is_extended_id=False)
can_bus.send(can_tx)

time.sleep(DELAY)
Expand All @@ -49,8 +49,8 @@
[data_list.append(0) for _ in range(4)]
[data_list.append(ZERO_POWER) for _ in range(4, 8)]
data = bytearray(data_list)
print str(i) + ' : ' + str(list(data)) + ' STOP'
can_tx = can.Message(arbitration_id=i, data=data, extended_id=False)
print(str(i) + ' : ' + str(list(data)) + ' STOP')
can_tx = can.Message(arbitration_id=i, data=data, is_extended_id=False)
can_bus.send(can_tx)

time.sleep(DELAY)
Expand All @@ -73,9 +73,9 @@
[data_list.append(0) for _ in range(4)]
[data_list.append(ZERO_POWER) for _ in range(4, 8)]
data = bytearray(data_list)
print str(i) + ' : ' + str(list(data)) + ' STOP'
print( str(i) + ' : ' + str(list(data)) + ' STOP')

can_tx = can.Message(arbitration_id=i, data=data, extended_id=False)
can_tx = can.Message(arbitration_id=i, data=data, is_extended_id=False)
can_bus.send(can_tx)

time.sleep(DELAY)
Binary file removed ros/src/can_proc/scripts/.thrust_proc.py.swp
Binary file not shown.
Binary file removed ros/src/can_proc/scripts/.tool_proc.py.swp
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions ros/src/can_proc/scripts/thrust_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
can_pos = [5, 6, 7, 5, 6, 4, 5, 7] # positions in data packet

can_better_map = {
0x201: [ 3, 7, 2, 6 ],
0x202: [ 8, 4, 5, 1 ],
0x201: [ 3, 7, 1, 5 ],
0x202: [ 8, 4, 6, 2 ],
0x203: [ 0, 0, 0, 0 ]
}

Expand Down
39 changes: 28 additions & 11 deletions ros/src/can_proc/scripts/tool_proc.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
#! /usr/bin/python3
import rospy
from shared_msgs.msg import can_msg, tools_command_msg
from gpiozero import OutputDevice

pm = OutputDevice(12)

TOOLS_BOARD_ID = 0x204

#PM_BIT = 0b00001000
#GHOST_BIT = 0b11110111

BLUE = 1 << 1
BROWN = 1 << 2
YELLOW = 1 << 3
GREEN = 1 << 4
WHITE = 1 << 5

#=============================
#Grant told me to put it here, don't delete yet
#yeet - green
#am - brown
#pm - blue
#bs - yello
#blue - 0b00000010
#brown - 0b00000100
#yellow - 0b00001000
#green - 0b00010000
#white - 0b00100000
#=============================

#Easier swapping if we plug solenoids in differently
sol0 = 1 << 1
sol1 = 1 << 3
sol2 = 1 << 5
sol2 = 1 << 4

SECONDARY_BIT = sol0
PM_BIT = sol1
Expand All @@ -24,24 +46,19 @@


def message_received(msg):
cmd = (msg.pm * PM_BIT)
cmd |= (msg.ghost * GHOST_BIT)
cmd |= (msg.secondary * SECONDARY_BIT)

cmsg = can_msg()
cmsg.id = TOOLS_BOARD_ID
cmsg.data = cmd
pub.publish(cmsg)
if(msg.tools[0]):
pm.on()
else:
pm.off()


if __name__ == "__main__":
rospy.init_node('tool_proc', anonymous=True)

# Publish to the CAN hardware transmitter
pub = rospy.Publisher('can_tx', can_msg,
queue_size=10)

sub = rospy.Subscriber('/tools_proc', tools_command_msg,
sub = rospy.Subscriber('/tools', tools_command_msg,
message_received)

# rate = rospy.Rate(5) # 5hz
Expand Down
Binary file removed ros/src/control/scripts/Complex_1.pyc
Binary file not shown.
Loading