4 Star 6 Fork 3

爱折腾智能机器人 / commands

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
install_ros2_omni_ws.sh 2.69 KB
一键复制 编辑 原始数据 按行查看 历史
爱折腾智能机器人 提交于 2023-08-28 17:31 . replace rosdep init
#!/bin/bash
################################################
# Function : Install ros2 Omni wheel gazebo car shell
# Desc : 源码安装全向轮仿真小车的脚本
# Website : https://www.ncnynl.com/archives/202303/5842.html
# Platform : ubuntu
# Version : 1.0
# Date : 2023-03-10
# Author : ncnynl
# Contact : 1043931@qq.com
# URL: https://ncnynl.com
# Licnese: MIT
# Company :Foshan AiZheTeng Information Technology Co.,Ltd.
# QQ Qun: 创客智造B群:926779095
# QQ Qun: 创客智造C群:937347681
# QQ Qun: 创客智造D群:562093920
################################################
export TEXTDOMAINDIR=/usr/share/locale
export TEXTDOMAIN=commands
echo "$(gettext "Install ros2 Omni wheel gazebo car shell")"
# echo "Not Supported Yet!"
# exit 0
echo ""
echo "Set workspace"
workspace=ros2_omni_ws
echo ""
echo "Set soft name"
soft_name=omni_control
echo ""
echo "Software if installed ?"
if [ -d ~/$workspace/src/$soft_name ];then
echo "$soft_name have installed" && exit 0
fi
echo ""
echo "Install system deps"
sudo apt install ros-humble-gazebo-ros-pkgs -y
sudo apt install ros-humble-ros2-control -y
sudo apt install ros-humble-ros2-controllers -y
sudo apt install ros-humble-navigation2 -y
sudo apt install ros-humble-nav2-bringup -y
sudo apt install ros-humble-cartographer-ros -y
# 下载源码
echo ""
echo "Download source"
cd ~
git clone http://gitee.com/ncnynl/ros2_omni_ws
echo ""
echo "Install rosdeps"
cs -si update_rosdep_tsinghua
cd ~/$workspace/
rosdep install --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} -y
# 编译代码
echo "Compile source"
cd ~/$workspace/
colcon build --symlink-install
echo "Add workspace to bashrc if not exits"
if ! grep -Fq "$workspace/install/local_setup.bash" ~/.bashrc
then
echo ". ~/$workspace/install/local_setup.bash" >> ~/.bashrc
echo "export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/ros2_omni_ws/src/gazebo_simulation/models/" >> ~/.bashrc
echo " $workspace workspace have installed successfully! writed to ~/.bashrc"
else
echo "Has been inited before! Please check ~/.bashrc"
fi
#How to use
# ros2 launch gazebo_simulation cartographer_slam.launch.py
# ros2 run nav2_map_server map_saver_cli -f omni_map
# ros2 launch gazebo_simulation gazebo_sim_launch_rf2o.py
# ros2 run teleop_twist_keyboard teleop_twist_keyboard
# ros2 control list_hardware_interfaces
# ros2 control list_controllers
其他
1
https://gitee.com/ncnynl/commands.git
git@gitee.com:ncnynl/commands.git
ncnynl
commands
commands
master

搜索帮助