bashrc.sh 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. #! /bin/bash
  2. #export WORKSPACE=navigation_ros_ws
  3. #source ${HOME}/${WORKSPACE}/install_dev/bashrc.sh
  4. #printenv | grep -i ROS
  5. # export remoteUsername=abc
  6. # export remotePasswd=123456
  7. sshToRemote=false
  8. export remoteIP=192.168.191.176
  9. export localIP=192.168.191.24
  10. export ROS_MASTER_URI=http://${localIP}:11311
  11. export ROS_IP=${localIP}
  12. export UBUNTU_VERSION=$(lsb_release -r --short)
  13. #echo "ubuntu_version: "${UBUNTU_VERSION}
  14. export ROS1_VERSION=noetic
  15. export ROS2_VERSION=foxy
  16. export TURTLEBOT3_MODEL=waffle
  17. source /opt/ros/${ROS1_VERSION}/setup.bash
  18. source ${HOME}/${WORKSPACE}/devel/setup.bash
  19. #alias navigation="roslaunch robot_launch navigationCartographerLocation.launch"
  20. alias cartographerLocation="roslaunch robot_launch cartographerLocation.launch"
  21. alias robot_decription="roslaunch robot_launch robot_description.launch"
  22. alias movebase="roslaunch robot_launch move_base.launch.xml"
  23. alias key="roslaunch robot_launch keyboard_teleop.launch"
  24. alias navigation="roslaunch robot_launch move_base_amcl.launch"
  25. alias slam="roslaunch lio_sam run.launch"
  26. alias location="roslaunch lio_sam_location run_relocalize.launch"
  27. alias base="source ${HOME}/sensor_enable/devel/setup.bash&&roslaunch rtk_ros test.launch"
  28. alias lidar="roslaunch robot_launch rplidar_a3.launch"
  29. alias imunode="roslaunch fdilink_ahrs ahrs_data.launch"
  30. alias lidarnode="source ${HOME}/sensor_ros_2/devel/setup.bash&&roslaunch lslidar_driver lslidar_c16.launch"
  31. #alias lidar="roslaunch robot_launch rplidar_s2.launch"
  32. #alias imunode="roslaunch robot_launch imu.launch"
  33. alias baselidar="roslaunch robot_launch base_lidar.launch"
  34. alias joy="roslaunch robot_launch xbox360_teleop.launch"
  35. alias unity="roslaunch robot_launch unity_start.launch"
  36. alias savemap="rosrun map_server map_saver -f ${HOME}/${WORKSPACE}/src/robot_launch/maps/map"
  37. alias pubNormalGoals="python ${HOME}/${WORKSPACE}/install_dev/actionClient/pubNormalGoals.py"
  38. alias pubStopGoal="python ${HOME}/${WORKSPACE}/install_dev/actionClient/pubStop.py"
  39. #alias pubGoal="python3 ${HOME}/${WORKSPACE}/install_dev/actionClient/pubGoal.py"
  40. alias pubGoalF="python3 ${HOME}/${WORKSPACE}/install_dev/actionClient/pubGoalF.py"
  41. alias pubGoalB="python3 ${HOME}/${WORKSPACE}/install_dev/actionClient/pubGoalB.py"
  42. alias pubInitPose="python3 ${HOME}/${WORKSPACE}/install_dev/actionClient/pubInitPose.py"
  43. alias pubGoalSmallMotion="python ${HOME}/${WORKSPACE}/install_dev/actionClient/pubGoalSmallMotion.py"
  44. alias triggerAutoCharge="rostopic pub /triggerAutoCharge std_msgs/Empty "{}""
  45. alias log="tail -f ${HOME}/srirobotLog/sriLog.log"
  46. alias tflidar="roslaunch fdilink_ahrs tf_lidar.launch"
  47. alias recordlidarimu="cd ${HOME}/${WORKSPACE}/bag&&rosbag record /lslidar_point_cloud /imu_raw"
  48. alias tfimu="roslaunch fdilink_ahrs tf.launch"
  49. alias mk="cd ${HOME}/${WORKSPACE}&&catkin_make -DCATKIN_WHITELIST_PACKAGES='move_base'"
  50. alias mkall="cd ${HOME}/${WORKSPACE}&&catkin_make -DCATKIN_WHITELIST_PACKAGES=''"
  51. alias cdws="cd ${HOME}/${WORKSPACE}/src"
  52. alias rmws="rm -rf ${HOME}/${WORKSPACE}/devel&&rm -rf ${HOME}/${WORKSPACE}/build"
  53. alias cmk="cd ${HOME}/${WORKSPACE}/src/cppTest/&&${HOME}/${WORKSPACE}/src/cppTest/make.sh&&cd ./bin"
  54. alias rmcmk="cd ${HOME}/${WORKSPACE}/src/cppTest/build/&&rm -rf ./*&&rm -rf ../bin/**&&cd ~"
  55. alias hinge="rosrun hinge_car_navigation hinge_car_navigation_node "
  56. alias mkhinge="cd ${HOME}/${WORKSPACE}&&catkin_make -DCATKIN_WHITELIST_PACKAGES='hinge_car_navigation'"
  57. alias scan="rostopic echo /scan"
  58. alias odom="rostopic echo /odom"
  59. alias imu="rostopic echo /imu"
  60. alias map="rostopic echo /map"
  61. alias cmd="rostopic echo /yocs_cmd_vel_mux/input/navigation"
  62. alias krviz="roslaunch robot_launch rviz.launch"
  63. alias testunity="rosrun unity_nav unity_test.py"
  64. alias ipscan="echo ==start ipscan==&&sudo nmap -sP 192.168.1.0/24"
  65. alias plotjuggler="rosrun plotjuggler plotjuggler"
  66. #查看usb,串口
  67. alias usbls="ls -al /dev |grep ttyUSB"
  68. alias serialls="ls -al /dev |grep ttyS"
  69. #查看当前目录下的文件和文件夹磁盘占用情况
  70. alias lsdir="sudo du -h --max-depth=1 | sort -hr | head"
  71. alias lsdirall="sudo du -h --max-depth=1 | sort -hr"
  72. alias lsdirhead="sudo du -sh * | sort -hr | head"
  73. alias tmk="cd ${HOME}/${WORKSPACE}&&catkin_make run_tests_test_roscpp"
  74. alias rosenv="echo $ROS_PACKAGE_PATH"
  75. alias depthcamera="roslaunch costmap_depth_camera costmap_depth_camera.launch"
  76. #gdb launch file add "launch-prefix="gdb -ex run --args"
  77. alias dmk="cd ${HOME}/${WORKSPACE}&&catkin_make -DCMAKE_BUILD_TYPE=Debug"
  78. alias camera="${HOME}/${WORKSPACE}/install_dev/camera/camera.sh"
  79. alias sshremote="sshpass -p ${remotePasswd} ssh ${remoteUsername}@${remoteIP}"
  80. alias sshrpdzkj="sshpass -p rpdzkj ssh rpdzkj@${remoteIP}"
  81. alias sshabc="sshpass -p 123456 ssh abc@192.168.10.119"
  82. alias sshsri="sshpass -p 123456 ssh sri@192.168.10.112"
  83. alias sam="bash ${HOME}/sensor_enable/src/plc_modbus/launch/start.sh"
  84. alias sourceros="source /opt/ros/${ROS1_VERSION}/setup.bash"
  85. alias lioslamros1="source /opt/ros/${ROS1_VERSION}/setup.bash&&source ${HOME}/ros1_lioslam_ws/devel/setup.bash&&roslaunch lio_sam run.launch"
  86. alias lioslamros2="source /opt/ros/${ROS2_VERSION}/setup.bash&&source ${HOME}/ros2_lioslam_ws/install/setup.bash&&ros2 launch lio_sam run.launch.py"
  87. alias playbagros2="source /opt/ros/${ROS2_VERSION}/setup.bash&&cd ${HOME}/bag&&ros2 bag play ${bagname}"
  88. alias playbagros1="source /opt/ros/${ROS1_VERSION}/setup.bash&&cd ${HOME}/bag&&ros2 bag play ${bagname}"
  89. alias log="tail -f ${HOME}/srirobotLog/sriLog.log"
  90. alias fastgithub="sudo ${HOME}/${WORKSPACE}/install_dev/installPackage/fastgithub_linux-x64/fastgithub"
  91. #tool
  92. alias opencvVersion="pkg-config --modversion opencv"
  93. alias psros="ps -ef |grep rosmaster"
  94. alias killros="ps -ef| grep ros |grep -v grep |awk '{print $2}' |xargs kill -9"
  95. #ros auto start
  96. # alias autoStart="${HOME}/${WORKSPACE}/install_dev/autoStartROS/autoStartROS.sh"
  97. # alias unautoStart="rosrun robot_upstart uninstall robot"
  98. # alias start="sudo service robot start"
  99. # alias stop="sudo service robot stop"
  100. # alias restart="sudo service robot restart"