Skip to content

Commit

Permalink
add prefix
Browse files Browse the repository at this point in the history
Signed-off-by: Go Sakayori <[email protected]>
  • Loading branch information
go-sakayori committed Jun 7, 2024
1 parent 2b0de17 commit 3e06cc7
Show file tree
Hide file tree
Showing 45 changed files with 55 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ control/pid_longitudinal_controller/** [email protected] takamasa.horibe@tie
control/predicted_path_checker/** [email protected]
control/pure_pursuit/** [email protected]
control/shift_decider/** [email protected]
control/smart_mpc_trajectory_follower/** [email protected]
control/autoware_smart_mpc_trajectory_follower/** [email protected]
control/trajectory_follower_base/** [email protected] [email protected]
control/trajectory_follower_node/** [email protected] [email protected]
control/vehicle_cmd_gate/** [email protected] [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
cmake_minimum_required(VERSION 3.14)
project(smart_mpc_trajectory_follower)
project(autoware_smart_mpc_trajectory_follower)

find_package(autoware_cmake REQUIRED)
autoware_package()

install(PROGRAMS
smart_mpc_trajectory_follower/scripts/pympc_trajectory_follower.py
autoware_smart_mpc_trajectory_follower/scripts/pympc_trajectory_follower.py
DESTINATION lib/${PROJECT_NAME}
)
ament_auto_package(
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
from pathlib import Path
import shutil

import smart_mpc_trajectory_follower
import autoware_smart_mpc_trajectory_follower

if __name__ == "__main__":
package_dir = str(Path(smart_mpc_trajectory_follower.__file__).parent)
package_dir = str(Path(autoware_smart_mpc_trajectory_follower.__file__).parent)

remove_dirs = [
package_dir + "/__pycache__",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import pandas as pd
import scipy.interpolate
import simplejson as json
from smart_mpc_trajectory_follower.scripts import drive_controller
from smart_mpc_trajectory_follower.scripts import drive_functions
from autoware_smart_mpc_trajectory_follower.scripts import drive_controller
from autoware_smart_mpc_trajectory_follower.scripts import drive_functions

print("\n\n### import python_simulator.py ###")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import numpy as np
import python_simulator
from smart_mpc_trajectory_follower.training_and_data_check import train_drive_NN_model
from autoware_smart_mpc_trajectory_follower.training_and_data_check import train_drive_NN_model

initial_error = np.array(
[0.001, 0.03, 0.01, -0.001, 0, 2 * python_simulator.measurement_steer_bias]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import numpy as np
import python_simulator
from smart_mpc_trajectory_follower.training_and_data_check import train_drive_NN_model
from autoware_smart_mpc_trajectory_follower.training_and_data_check import train_drive_NN_model

parser = argparse.ArgumentParser()
parser.add_argument("--param_name", default=None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from numba import njit
import numpy as np
from smart_mpc_trajectory_follower.scripts import drive_functions
from autoware_smart_mpc_trajectory_follower.scripts import drive_functions

sqrt_mpc_time_step = np.sqrt(drive_functions.mpc_time_step)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@


import numpy as np
from smart_mpc_trajectory_follower.scripts import drive_functions
from smart_mpc_trajectory_follower.scripts import proxima_calc
from autoware_smart_mpc_trajectory_follower.scripts import drive_functions
from autoware_smart_mpc_trajectory_follower.scripts import proxima_calc
import torch
from torch import nn

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
import numpy as np
import scipy.interpolate # type: ignore
from sklearn.preprocessing import PolynomialFeatures
from smart_mpc_trajectory_follower.scripts import drive_GP
from smart_mpc_trajectory_follower.scripts import drive_NN
from smart_mpc_trajectory_follower.scripts import drive_functions
from smart_mpc_trajectory_follower.scripts import drive_iLQR
from smart_mpc_trajectory_follower.scripts import drive_mppi
from autoware_smart_mpc_trajectory_follower.scripts import drive_GP
from autoware_smart_mpc_trajectory_follower.scripts import drive_NN
from autoware_smart_mpc_trajectory_follower.scripts import drive_functions
from autoware_smart_mpc_trajectory_follower.scripts import drive_iLQR
from autoware_smart_mpc_trajectory_follower.scripts import drive_mppi
import torch

ctrl_index_for_polynomial_reg = np.concatenate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
with open(package_path_json, "r") as file:
package_path = json.load(file)

mpc_param_path = package_path["path"] + "/smart_mpc_trajectory_follower/param/mpc_param.yaml"
mpc_param_path = package_path["path"] + "/autoware_smart_mpc_trajectory_follower/param/mpc_param.yaml"
with open(mpc_param_path, "r") as yml:
mpc_param = yaml.safe_load(yml)

Expand Down Expand Up @@ -101,7 +101,7 @@
cap_pred_error = np.array(mpc_param["mpc_parameter"]["preprocessing"]["cap_pred_error"])

nominal_param_path = (
package_path["path"] + "/smart_mpc_trajectory_follower/param/nominal_param.yaml"
package_path["path"] + "/autoware_smart_mpc_trajectory_follower/param/nominal_param.yaml"
)
with open(nominal_param_path, "r") as yml:
nominal_param = yaml.safe_load(yml)
Expand Down Expand Up @@ -172,7 +172,7 @@
mpc_param["mpc_parameter"]["preprocessing"]["sg_window_size_for_nominal_inputs"]
)
trained_model_param_path = (
package_path["path"] + "/smart_mpc_trajectory_follower/param/trained_model_param.yaml"
package_path["path"] + "/autoware_smart_mpc_trajectory_follower/param/trained_model_param.yaml"
)
with open(trained_model_param_path, "r") as yml:
trained_model_param = yaml.safe_load(yml)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

from numba import njit
import numpy as np
from smart_mpc_trajectory_follower.scripts import drive_functions
from autoware_smart_mpc_trajectory_follower.scripts import drive_functions

index_cost = np.concatenate(
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from numba import njit
import numpy as np
from smart_mpc_trajectory_follower.scripts import drive_functions
from autoware_smart_mpc_trajectory_follower.scripts import drive_functions

index_cost = np.concatenate(
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
import scipy.interpolate
from scipy.spatial.transform import Rotation as R
from scipy.spatial.transform import Slerp
from smart_mpc_trajectory_follower.scripts import drive_controller
from smart_mpc_trajectory_follower.scripts import drive_functions
from autoware_smart_mpc_trajectory_follower.scripts import drive_controller
from autoware_smart_mpc_trajectory_follower.scripts import drive_functions
from std_msgs.msg import String
from tier4_debug_msgs.msg import BoolStamped
from tier4_debug_msgs.msg import Float32MultiArrayStamped
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import scipy.interpolate
from scipy.ndimage import gaussian_filter
from scipy.spatial.transform import Rotation
from smart_mpc_trajectory_follower.scripts import drive_functions
from autoware_smart_mpc_trajectory_follower.scripts import drive_functions


def data_smoothing(data: np.ndarray, sigma: float) -> np.ndarray:
Expand Down Expand Up @@ -76,7 +76,7 @@ def transform_rosbag_to_csv(self, dir_name: str, delete_csv_first: bool = True)
os.system(
"cp "
+ package_path["path"]
+ "/smart_mpc_trajectory_follower/training_and_data_check/rosbag2.bash "
+ "/autoware_smart_mpc_trajectory_follower/training_and_data_check/rosbag2.bash "
+ dir_name
)
os.chdir(dir_name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import numpy as np
from sklearn import linear_model
from sklearn.preprocessing import PolynomialFeatures
from smart_mpc_trajectory_follower.scripts import drive_NN
from smart_mpc_trajectory_follower.scripts import drive_functions
from smart_mpc_trajectory_follower.training_and_data_check import add_training_data_from_csv
from autoware_smart_mpc_trajectory_follower.scripts import drive_NN
from autoware_smart_mpc_trajectory_follower.scripts import drive_functions
from autoware_smart_mpc_trajectory_follower.training_and_data_check import add_training_data_from_csv
import torch
from torch import nn
from torch.utils.data import DataLoader
Expand Down
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>smart_mpc_trajectory_follower</name>
<name>autoware_smart_mpc_trajectory_follower</name>
<version>1.0.0</version>
<description>Nodes to follow a trajectory by generating control commands using smart mpc</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@
os.system("pip3 install torch")
package_path = {}
package_path["path"] = str(Path(__file__).parent)
with open("smart_mpc_trajectory_follower/package_path.json", "w") as f:
with open("autoware_smart_mpc_trajectory_follower/package_path.json", "w") as f:
json.dump(package_path, f)
build_cpp_command = "g++ -Ofast -Wall -shared -std=c++11 -fPIC $(python3 -m pybind11 --includes) "
build_cpp_command += "smart_mpc_trajectory_follower/scripts/proxima_calc.cpp "
build_cpp_command += "autoware_smart_mpc_trajectory_follower/scripts/proxima_calc.cpp "
build_cpp_command += (
"-o smart_mpc_trajectory_follower/scripts/proxima_calc$(python3-config --extension-suffix) "
"-o autoware_smart_mpc_trajectory_follower/scripts/proxima_calc$(python3-config --extension-suffix) "
)
build_cpp_command += "-lrt -I/usr/include/eigen3"
os.system(build_cpp_command)

so_path = (
"scripts/"
+ glob.glob("smart_mpc_trajectory_follower/scripts/proxima_calc.*.so")[0].split("/")[-1]
+ glob.glob("autoware_smart_mpc_trajectory_follower/scripts/proxima_calc.*.so")[0].split("/")[-1]
)
setup(
name="smart_mpc_trajectory_follower",
version="1.0.0",
packages=find_packages(),
package_data={
"smart_mpc_trajectory_follower": ["package_path.json", so_path],
"autoware_smart_mpc_trajectory_follower": ["package_path.json", so_path],
},
)
2 changes: 1 addition & 1 deletion launch/tier4_control_launch/launch/control.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def launch_setup(context, *args, **kwargs):
)

smart_mpc_trajectory_follower = Node(
package="smart_mpc_trajectory_follower",
package="autoware_smart_mpc_trajectory_follower",
executable="pympc_trajectory_follower.py",
name="pympc_trajectory_follower",
)
Expand Down

0 comments on commit 3e06cc7

Please sign in to comment.