-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding files to run on car. This probably breaks some of your existin…
…g stuff, and I needed to create a folder that yo uhave in your gitignore.
- Loading branch information
Showing
13 changed files
with
199 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<launch> | ||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~ --> | ||
<!-- Controller Launches. profproject control and CBF --> | ||
<node pkg="skynetmini" type="skynetmini_controller2" name="skynetmini_controller2_node" output="screen"> | ||
<remap from="/cmd_accel" to="/cmd_accel_pre"/> | ||
</node> | ||
<!-- CBF params --> | ||
<arg name="description" default="skynetmini_controller2"/> | ||
|
||
<arg name="margin" default="30.0"/> | ||
<arg name="use_margin" default="false"/> | ||
<arg name="hwil" default="true"/> | ||
<arg name="readonly" default="false"/> | ||
<arg name="vsl_hwil_test" default="false"/> | ||
<!-- CBF node --> | ||
<node pkg="cbf" type="cbf" name="cbf" if="$(eval not readonly and hwil)"> | ||
</node> | ||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~ --> | ||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~ --> | ||
<!-- CAN_to_ROS launches, for vehicle interface, subs, rosbag record and safety_checks(?) --> | ||
<node pkg="can_to_ros" type="vehicle_interface" name="vehicle_interface" output="screen" respawn="true" respawn_delay="2" /> | ||
<node pkg="can_to_ros" type ="subs" name="subs" output="screen" if="$(arg hwil)"> | ||
</node> | ||
<include file="$(find can_to_ros)launch/safety_checks.launch" /> | ||
<!-- recording the ros bag --> | ||
<node pkg="can_to_ros" type ="rosbag_record.sh" name="bashscript2" output="screen" args="$(arg description) $(arg hwil)" /> | ||
|
||
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~ --> | ||
|
||
|
||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apps: | ||
- name: skynetmini | ||
properties: | ||
- owns_panda: true | ||
dependencies: | ||
- apt: python3-pandas | ||
- pip3: cantools | ||
- pip3: shapely | ||
ros_repositories: | ||
- owner: jmscslgroup | ||
repo: can_to_ros | ||
- owner: jmscslgroup | ||
repo: cbf | ||
branch_or_hash: original_CBF_implementation_2021 | ||
- owner: jmscslgroup | ||
repo: velocity_controller | ||
- owner: jmscslgroup | ||
repo: setpointreader | ||
- owner: jmscslgroup | ||
repo: skynetmini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>skynetmini_controller2</name> | ||
<name>skynetmini</name> | ||
<version>1.0.0</version> | ||
<description>TODO</description> | ||
<maintainer email="[email protected]">ROS User</maintainer> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This project explores the potential of Adaptive Cruise Control (ACC) systems to enhance fuel efficiency in vehicles while ensuring effective and safe car-following behavior. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
echo "==========================" | ||
echo "Installing App skynetmini" | ||
|
||
# Here is where we perform installation of scripts, services, etc. | ||
echo " - Installing ROS packages for skynetmini..." | ||
|
||
LIBPANDA_SRC=$(cat /etc/libpanda.d/libpanda_src_dir) | ||
LIBPANDA_USER=$(cat /etc/libpanda.d/libpanda_usr) | ||
LAUNCH_FILE=skynetminihwil.launch | ||
|
||
source /home/$LIBPANDA_USER/.bashrc | ||
|
||
# if [ -d /home/$LIBPANDA_USER/strym ]; then | ||
# pushd /home/$LIBPANDA_USER/strym | ||
# git pull | ||
# else | ||
# pushd /home/$LIBPANDA_USER/ | ||
# git clone https://github.com/jmscslgroup/strym | ||
# fi | ||
# popd | ||
|
||
runuser -l $LIBPANDA_USER -c /etc/libpanda.d/apps/skynetmini/installRosPackages.sh | ||
|
||
echo "Installing {APP_NAME_PRETTY}..." | ||
# runuser -l $LIBPANDA_USER -c /etc/libpanda.d/apps/vsl/installMidVslController.sh | ||
pushd /home/$LIBPANDA_USER/catkin_ws | ||
runuser -l $LIBPANDA_USER -c 'source /opt/ros/noetic/setup.bash && cd catkin_ws && catkin_make' | ||
source devel/setup.sh | ||
rosrun robot_upstart install skynetmini/launch/${LAUNCH_FILE} --user root | ||
|
||
echo "Enabling can_to_ros startup script" | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable skynetmini | ||
popd | ||
echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
# Author: Matt Nice,Matt Bunting | ||
|
||
LAUNCH_FILE=skynetminihwil.launch | ||
|
||
echo "----------------------------" | ||
if [[ $EUID == 0 ]]; | ||
then echo "Do NOT run this script as root" | ||
exit | ||
fi | ||
|
||
source ~/.bashrc | ||
|
||
pushd ~/catkin_ws | ||
source devel/setup.sh | ||
|
||
# rosrun robot_upstart install can_to_ros/launch/${LAUNCH_FILE} --user root | ||
rosrun robot_upstart install ${LAUNCH_FILE} --user root | ||
|
||
echo "Enabling can_to_ros startup script" | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable skynetmini | ||
popd | ||
|
||
echo "----------------------------" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
# Author: Matt Bunting, Matt Nice | ||
|
||
echo "----------------------------" | ||
if [[ $EUID == 0 ]]; | ||
then echo "Do NOT run this script as root" | ||
exit | ||
fi | ||
|
||
echo "Installing/Updating {APP_NAME_PRETTY} packages" | ||
|
||
source ~/.bashrc | ||
|
||
LIBPANDA_SRC=$(cat /etc/libpanda.d/libpanda_src_dir) | ||
|
||
|
||
cd ~ | ||
if [ ! -d catkin_ws/src ]; then | ||
mkdir -p catkin_ws/src | ||
fi | ||
|
||
cd ~/catkin_ws | ||
source /opt/ros/noetic/setup.bash | ||
|
||
echo "Regenerating CanToRos" | ||
cd ~/catkin_ws/src/can_to_ros/scripts | ||
echo y | ./regenerateCanToRos.sh | ||
|
||
|
||
# Build: | ||
source ~/catkin_ws/devel/setup.sh | ||
cd ~/catkin_ws | ||
catkin_make | ||
|
||
|
||
echo "Enabling can_to_ros startup script" | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable skynetmini | ||
|
||
|
||
|
||
echo "----------------------------" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
skynetmini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
echo "==========================" | ||
echo "Starting App skynetmini for {APP_NAME_PRETTY}" | ||
|
||
|
||
systemctl start skynetmini | ||
systemctl start rosnodeChecker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
echo "==========================" | ||
echo "Stopping App skynetmini" | ||
|
||
systemctl stop rosnodeChecker | ||
systemctl stop skynetmini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
echo "==========================" | ||
echo "Removing App skynetmini" | ||
|
||
|
||
LIBPANDA_USER=$(cat /etc/libpanda.d/libpanda_usr) | ||
|
||
# Disable the installed services: | ||
echo " - Disabling startup scripts..." | ||
systemctl disable skynetmini | ||
|
||
|
||
# Here is where we remove scripts, services, etc. | ||
echo " - Removing scripts..." | ||
cd | ||
if [ "x"`systemctl list-units | grep -c skynetmini.service` = "x1" ]; then | ||
echo "Uninstalling skynetmini.service" | ||
|
||
source /home/$LIBPANDA_USER/catkin_ws/devel/setup.bash | ||
rosrun robot_upstart uninstall skynetmini | ||
fi | ||
|
||
systemctl daemon-reload # if needed |