机械臂仿真与真机执行代码

此项目是机械臂仿真与真机执行代码。 #Probot_anno.srdf文件描述了规划组 #描述机械臂manipulator本身 #定义了两种关节角状态home和start #机械臂的碰撞矩阵 .....................了解更多请下载附件

应用介绍

此项目是机械臂仿真与真机执行代码。

下面展示小部分代码:

Green_font_prefix="\033[32m"

Red_font_prefix="\033[31m"

Green_background_prefix="\033[42;37m"

Red_background_prefix="\033[41;37m"

Font_color_suffix="\033[0m"

Info="${Green_font_prefix}[Info]${Font_color_suffix}"

Error="${Red_font_prefix}[Error]${Font_color_suffix}"

Tip="${Green_font_prefix}[Warn]${Font_color_suffix}"

OSVersion=$(lsb_release -r --short)

OSDescription=$(lsb_release -d --short)

check_system_version()

{

    if [[ "${OSVersion}"   == "14.04" ]]; then

        ROS_Ver="indigo"

    elif [[ "${OSVersion}" == "16.04" ]]; then

        ROS_Ver="kinetic"

    elif [[ "${OSVersion}" == "18.04" ]]; then

        ROS_Ver="melodic"

    else

       echo -e "${Error} PROBOT don't support ${OSDescription} !" && exit 1

    fi

}

check_ros_version()

{

 echo -e "${Tip} The system version: ${OSDescription}"

 if [ -f "/usr/bin/rosversion" ]; then

  ROSVER=`/usr/bin/rosversion -d`

  if [ $ROSVER ]; then

   echo -e "${Tip} The ROS version: ${ROSVER}"

   return

  fi

 fi

 echo -e "${Error} ROS has not installed in this computer, please install ROS with 1."

}

install_ros()

{

 if [ -f "/usr/bin/rosversion" ]; then

  ROSVER=`/usr/bin/rosversion -d`

  if [ $ROSVER ]; then

   echo -e "${Tip} The ROS ${ROSVER} has been installed!"

   echo && stty erase ^? && read -p "Do you want to continue? y/n:" choose

   if [[ "${choose}" == "y" ]]; then

    echo -e "${Info}Start to install ROS!"

   else

    exit

   fi

  fi

 fi

    echo -e "${Green_font_prefix}Install ROS ...${Font_color_suffix}"

 sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6'

 sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

 sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116  

 sudo apt-get -y update

 sudo apt-get -y install ros-${ROS_Ver}-desktop-full

 sudo rosdep init

 rosdep update

 echo "source /opt/ros/${ROS_Ver}/setup.bash" >> ~/.bashrc

 source /opt/ros/${ROS_Ver}/setup.bash

 sudo apt-get -y install python-rosinstall python-rosinstall-generator python-wstool build-essential

    echo -e "${Green_font_prefix}ROS has installed finished.${Font_color_suffix}"

}

install_probot_dependents()

{

    echo -e "${Green_font_prefix}Install probot dependent packages ...${Font_color_suffix}"

    sudo apt-get -y install ros-${ROS_Ver}-moveit-*

    sudo apt-get -y install ros-${ROS_Ver}-industrial-*

    sudo apt-get -y install ros-${ROS_Ver}-gazebo-ros-control

    sudo apt-get -y install ros-${ROS_Ver}-ros-control ros-${ROS_Ver}-ros-controllers

    sudo apt-get -y install ros-${ROS_Ver}-trac-ik-kinematics-plugin

    sudo apt-get -y install ros-${ROS_Ver}-usb-cam

    echo -e "${Green_font_prefix}Dependent packages have installed finished.${Font_color_suffix}"

}

install_probot()

{

    echo -e "${Green_font_prefix}Install probot packages ...${Font_color_suffix}"

    if [ ! -d ~/probot_anno_ws ]; then

        mkdir ~/probot_anno_ws

        mkdir ~/probot_anno_ws/src

        mkdir ~/probot_anno_ws/src/probot_anno

        cp -R * ~/probot_anno_ws/src/probot_anno

       

        chmod +x ~/probot_anno_ws/src/probot_anno/probot_demo/scripts/*

        chmod +x ~/probot_anno_ws/src/probot_anno/probot_driver/bin/*

        chmod +x ~/probot_anno_ws/src/probot_anno/probot_driver/scripts/*

        cd ~/probot_anno_ws

        catkin_make

     echo "source ~/probot_anno_ws/devel/setup.bash --extend" >> ~/.bashrc

     source ~/.bashrc

        echo -e "${Green_font_prefix}PROBOT has installed to $(pwd)

    Please have a happy journey!${Font_color_suffix}"

    else

        echo -e "${Red_font_prefix}The probot_anno_ws folder has existed, please delete and reinstall!${Font_color_suffix}"

    fi

}

install_all_environment()

{

    install_ros

    install_probot_dependents

    install_probot

}

.........................想了解更多请下载附件

文件列表(部分)

名称 大小 修改日期
install.sh1.50 KB2020-09-24
CMakeLists.txt0.44 KB2020-03-29
ikfast.h3.79 KB2020-03-29
package.xml0.99 KB2020-03-29
probot_anno_manipulator_moveit_ikfast_plugin_description.xml0.23 KB2020-03-29
probot_anno_manipulator_ikfast_moveit_plugin.cpp10.87 KB2020-03-29
probot_anno_manipulator_ikfast_solver.cpp34.93 KB2020-03-29
update_ikfast_plugin.sh0.14 KB2020-03-29
misc.xml0.18 KB2020-03-29
modules.xml0.19 KB2020-03-29
probot_anno_moveit_config.iml0.09 KB2020-03-29
vcs.xml0.16 KB2020-03-29
workspace.xml1.36 KB2020-03-29
.setup_assistant0.21 KB2020-03-29
CMakeCache.txt4.80 KB2020-03-29
CMakeCCompiler.cmake0.77 KB2020-03-29
CMakeCXXCompiler.cmake1.32 KB2020-03-29
CMakeDetermineCompilerABI_C.bin2.43 KB2020-03-29
CMakeDetermineCompilerABI_CXX.bin2.43 KB2020-03-29
CMakeSystem.cmake0.16 KB2020-03-29
a.out2.36 KB2020-03-29
CMakeCCompilerId.c3.78 KB2020-03-29
a.out2.37 KB2020-03-29
CMakeCXXCompilerId.cpp3.69 KB2020-03-29
clion-environment.txt0.04 KB2020-03-29
clion-log.txt0.65 KB2020-03-29
cmake.check_cache0.08 KB2020-03-29
CMakeOutput.log3.52 KB2020-03-29
CMakeLists.txt0.21 KB2020-03-29
chomp_planning.yaml0.27 KB2020-03-29

立即下载

相关下载

[机械臂仿真与真机执行代码] 此项目是机械臂仿真与真机执行代码。 #Probot_anno.srdf文件描述了规划组 #描述机械臂manipulator本身 #定义了两种关节角状态home和start #机械臂的碰撞矩阵 .....................了解更多请下载附件

评论列表 共有 0 条评论

暂无评论

微信捐赠

微信扫一扫体验

立即
上传
发表
评论
返回
顶部