-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
205 additions
and
61 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 |
---|---|---|
@@ -1,4 +1,44 @@ | ||
#!/bin/bash | ||
|
||
add_path_to_bashrc() { | ||
local TARGET_PATH="$1" | ||
local ENV_PATH_NAME="$2" | ||
|
||
if [ -z "$TARGET_PATH" ]; then | ||
echo "Please provide the target_path." | ||
return 1 | ||
fi | ||
|
||
if echo "$$ENV_PATH_NAME" | grep -q "$TARGET_PATH"; then | ||
echo "$TARGET_PATH exists in $$ENV_PATH_NAME." | ||
else | ||
if grep -q "export $ENV_PATH_NAME=.*$TARGET_PATH" ~/.bashrc; then | ||
echo "$TARGET_PATH has been set." | ||
else | ||
echo "export $ENV_PATH_NAME=\$$ENV_PATH_NAME:$TARGET_PATH" >> ~/.bashrc | ||
echo "$TARGET_PATH is set." | ||
fi | ||
fi | ||
} | ||
|
||
process_3rd_library() { | ||
local list=("$@") | ||
for item in "${list[@]}"; do | ||
sub_dirs=$(find "$HOME/.conan/data/$item/" -mindepth 1 -maxdepth 1 -type d) | ||
for sub_item in $sub_dirs; do | ||
sub_packages=$(find "$sub_item/_/_/package" -mindepth 1 -maxdepth 1 -type d) | ||
for sub_pack in $sub_packages; do | ||
export LIBRARY_PATH=$LIBRARY_PATH:"$sub_pack/lib" | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$sub_pack/lib" | ||
add_path_to_bashrc "$sub_pack/lib" "LD_LIBRARY_PATH" | ||
add_path_to_bashrc "$sub_pack/lib" "LIBRARY_PATH" | ||
done | ||
done | ||
done | ||
} | ||
|
||
cd ../3rd | ||
./conan_install.sh # option for osqp | ||
conan install . --output-folder=build --build=missing -s compiler.libcxx=libstdc++11 | ||
process_3rd_library "gflags" "glog" "ceres-solver" | ||
cd ../ | ||
catkin_make | ||
catkin_make |
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 |
---|---|---|
@@ -1,15 +1,14 @@ | ||
cmake_minimum_required(VERSION 3.0.2) | ||
project(dynamic_rviz_config) | ||
# find_package(catkin REQUIRED COMPONENTS | ||
# roscpp | ||
# rospy | ||
# ) | ||
find_package(catkin REQUIRED COMPONENTS | ||
rospy | ||
) | ||
|
||
# catkin_package( | ||
# CATKIN_DEPENDS urdf xacro | ||
# ) | ||
catkin_package( | ||
CATKIN_DEPENDS urdf xacro | ||
) | ||
|
||
# catkin_install_python(PROGRAMS | ||
# scripts/rviz_generate.py | ||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
# ) | ||
catkin_install_python(PROGRAMS | ||
scripts/rviz_generate.py | ||
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
) |
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
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
Oops, something went wrong.