Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Ti comm dev #17

Draft
wants to merge 60 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
2a64324
modified sizes of objects
ihagedo Oct 26, 2020
cb14716
Modify makefile and SERIAL_TEST to try to find issue with makefile.
zghera Oct 27, 2020
301dc54
bag test
ihagedo Nov 7, 2020
7c0a32e
deleted outdated file
ihagedo Nov 8, 2020
a210a2b
added bagfile test
ihagedo Dec 1, 2020
15a8da1
Merge branch 'isaac_dev' of https://github.com/Autonomous-Motorsports…
ihagedo Dec 1, 2020
d10c1ff
added bagfile test data
ihagedo Dec 1, 2020
d09125d
Merge branch 'isaac_dev' of https://github.com/Autonomous-Motorsports…
ihagedo Dec 1, 2020
60bcc09
serial comm
ihagedo Feb 7, 2021
158bb48
Merge branch 'ti_comm_dev' of https://github.com/Autonomous-Motorspor…
Feb 9, 2021
7bd98b1
Serial Communiction files updated. ECU_TEST works well with debug opt…
Feb 15, 2021
6a3331c
Update .gitattributes
ihagedo Feb 25, 2021
379d173
cleaning lfs
ihagedo Feb 25, 2021
5397dc0
added libserialport submodule
ihagedo Feb 25, 2021
4055ea4
added readme
ihagedo Feb 26, 2021
6fd1038
Update README.md
ihagedo Feb 26, 2021
86a0c0e
Merge pull request #14 from Autonomous-Motorsports-Purdue/master
ihagedo Feb 27, 2021
8450f33
fixed structural issues for packet
ihagedo Feb 27, 2021
03b1c91
Merge branch 'isaac_dev' into ti_comm_dev
ihagedo Feb 27, 2021
d802305
Update amp_serial_jetson_ECU_TEST.cpp
ihagedo Feb 27, 2021
8add71c
Delete amp_serial_jetson_ECU_TEST.o
ihagedo Feb 27, 2021
c93c273
Delete amp_serial_jetson
ihagedo Feb 27, 2021
9ed89b1
Delete amp_serial_jetson_SERIAL_TEST.o
ihagedo Feb 27, 2021
3cde596
Update amp_serial_jetson.h
ihagedo Feb 27, 2021
e7c275e
added number parameters
Oct 4, 2021
525baf5
seperated library files
ihagedo Oct 13, 2021
de488c6
integrated new library into build
ihagedo Oct 30, 2021
454b19c
Merge branch 'ti_comm_dev' of https://github.com/Autonomous-Motorspor…
Oct 30, 2021
a79bb43
ecu test working properly
ihagedo Nov 13, 2021
2b55e73
Gitignore vim swap files
bitmaks Nov 21, 2021
5df3e51
Add read command from file functionality and delay flag to debugger
bitmaks Nov 21, 2021
2fb37c6
Improve help description and add exit after help menu
bitmaks Nov 21, 2021
dc38afc
Simplify speed and angle read function
bitmaks Dec 1, 2021
ceee7af
Refactor to be more readable
bitmaks Dec 1, 2021
0575b21
Merge pull request #25 from aaaakshat/ti_comm_dev
bitmaks Dec 4, 2021
9014549
Merge branch 'ti_comm_dev' of https://github.com/Autonomous-Motorspor…
Jan 23, 2022
86efbcb
restructured ti_comm dir
Jan 23, 2022
c58950b
Merge branch 'master' of https://github.com/Autonomous-Motorsports-Pu…
Jan 23, 2022
27c88aa
Added includes for SERIAL_TEST
Jan 23, 2022
73632e0
segrated old and new lib, resolved new lib build issues
Jan 23, 2022
0ef4c58
restructuring ti_comm/src
ihagedo Jan 26, 2022
39092fd
Add libserialport patch for linux configs
bitmaks Jan 30, 2022
06b75c8
Fix patch whitespacing issue
bitmaks Jan 30, 2022
bf52685
Add build script
bitmaks Jan 30, 2022
bd3067a
Modified build.sh to create libserialport obj files.
zghera Jan 30, 2022
ae501bf
Recognize if patch has been applied in build.sh
bitmaks Jan 31, 2022
0421949
FIx scriptDir error on linux
bitmaks Feb 1, 2022
6f3e346
Fix typo
bitmaks Feb 1, 2022
07232ea
Change shell to bash so source works.
zghera Feb 6, 2022
6d8fbc7
Don't fetch libserialport if patch has been applied
bitmaks Feb 6, 2022
0f613ca
Gitignore MacOS trash and debug files
bitmaks Feb 20, 2022
f87eca5
fixed ECU
ihagedo Feb 20, 2022
a2216e6
Merge branch 'ti_comm_dev' of github.com:Autonomous-Motorsports-Purdu…
ihagedo Feb 20, 2022
adeee69
added micro sleep
ihagedo Feb 20, 2022
9704f02
Fix serial pkt and control pkt memcpy issue
bitmaks Apr 3, 2022
a01c81d
Make control pkt use unsigned not signed char
bitmaks Apr 4, 2022
7bd6bfe
Add debug messages to serial and ecu test
bitmaks Apr 10, 2022
0368eb4
serial test work
bitmaks Apr 24, 2022
ec65cf8
Update amp_serial_jetson (please work)
bitmaks Apr 24, 2022
0bc09d4
Debugging 0 serial packets. ti_comm node is crapping out now.
Apr 24, 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
Prev Previous commit
Debugging 0 serial packets. ti_comm node is crapping out now.
Isaac Hagedorn committed Apr 24, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 0bc09d484f766980777c94fc72c9df2692312a0d
11 changes: 9 additions & 2 deletions src/ti_comm/src/amp_serial_jetson.cpp
Original file line number Diff line number Diff line change
@@ -94,6 +94,7 @@ int main(int argc, char** argv) {
return EXIT_SUCCESS;
}

/*
void key_cmd_callback(const geometry_msgs::Twist::ConstPtr& msg) {
// Declare & Initialize Local Variables
amp_serial_pkt_t s_pkt; // Full Serial Packet
@@ -118,6 +119,7 @@ void key_cmd_callback(const geometry_msgs::Twist::ConstPtr& msg) {
return;
}
*/

void cmd_vel_callback(const geometry_msgs::Twist::ConstPtr& msg) {
// Declare & Initialize Local Variables
@@ -130,13 +132,18 @@ void cmd_vel_callback(const geometry_msgs::Twist::ConstPtr& msg) {
int size;

// Check Current Status of the Car's Control (RC / Autonomous)
/*
if (AMP_CONTROL_REMOTE == amp_control_state) {
return;
}
*/
int bias = 65;
translational_velocity = bias + (255 - bias) * (translational_velocity / 0.5);
drive_angle = 128 + 127 * (drive_angle / 1.0471975512); // pi/3

// Create Control Packet
c_pkt.v_speed = float_to_int(AMP_TEST_MAX_VEL, AMP_MIN_VEL, translational_velocity); //msg->linear.x;
c_pkt.v_angle = float_to_int(AMP_TEST_MAX_ANG, AMP_MIN_ANG, drive_angle); //msg->angular.z;
c_pkt.v_speed = float_to_int(AMP_MAX_VEL, AMP_MIN_VEL, translational_velocity); //msg->linear.x;
c_pkt.v_angle = float_to_int(AMP_MAX_ANG, AMP_MIN_ANG, drive_angle); //msg->angular.z;

// Create Full Serial Packet
s_pkt.id = AMP_SERIAL_CONTROL;
4 changes: 2 additions & 2 deletions src/ti_comm/src/amp_serial_jetson.h
Original file line number Diff line number Diff line change
@@ -29,9 +29,9 @@

#define AMP_SERIAL_RC_CTRL_MAX_VEL 10.0f // Max Remote Control Velocity in (m/s)
#define AMP_SERIAL_RC_CTRL_MAX_ANG 20.0f // Max Remote Control Steering Angle (rads)
#define AMP_MAX_VEL 10.0f
#define AMP_MAX_VEL 255.0f
#define AMP_MIN_VEL 0.0f
#define AMP_MAX_ANG 5.0f
#define AMP_MAX_ANG 255.0f
#define AMP_MIN_ANG 0.0f

#define PS3_BUTTON_SELECT 0