日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

操作ROS松灵机器人步骤及遇到的问题

發布時間:2024/4/24 编程问答 46 豆豆
生活随笔 收集整理的這篇文章主要介紹了 操作ROS松灵机器人步骤及遇到的问题 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

小車型號:scout-v2.0

https://github.com/agilexrobotics/scout_ros(所用包的下載地址)

或者

https://hub.fastgit.org/agilexrobotics/scout_ros

注意:使用https://github.com下載的很慢,可以采用國內鏡像替換https://www.jianshu.com/p/29824058380f

https://hub.fastgit.org/agilexrobotics/scout_ros

Communication interface setup

不用管前面得序號,直接一步一步敲命令

Setup UART

Generally your RS232-to-USB cable should be automatically recognized as "/dev/ttyUSB0" or something similar and ready for use. If you get the error "... permission denied ..." when trying to open the port, you need to grant access of the port to your user account:

$ sudo usermod -a -G dialout $USER

You need to re-login to get the change to take effect.

Setup CAN-To-USB adapter

  • Enable gs_usb kernel module

    $ sudo modprobe gs_usb
  • Bringup can device

    $ sudo ip link set can0 up type can bitrate 500000
  • If no error occured during the previous steps, you should be able to see the can device now by using command

    $ ifconfig -a
  • Install and use can-utils to test the hardware

    $ sudo apt install can-utils
  • Testing command

    # receiving data from can0 $ candump can0 # send data to can0 $ cansend can0 001#1122334455667788
  • Install dependent libraries

  • $ sudo apt install -y libasio-dev $ sudo apt install -y ros-$ROS_DISTRO-teleop-twist-keyboard
  • Clone the packages into your catkin workspace and compile

    (the following instructions assume your catkin workspace is at: ~/catkin_ws/src)

    $ cd ~/catkin_ws/src $ git clone --recursive https://github.com/agilexrobotics/ugv_sdk.git $ git clone https://github.com/agilexrobotics/scout_ros.git $ cd .. $ catkin_make

    if your car is 1.0 version,Please run this command to switch ugv_sdk to 1.0 version

    $ cd ugv_sdk && git checkout master

    then recompile

  • Launch ROS nodes

    • Start the base node for scout

      $ roslaunch scout_bringup scout_minimal.launch

      The?scout_bringup/scout_minimal.launch?has 5 parameters:

      • port_name: specifies the port used to communicate with the robot, default = "can0"
      • simulated_robot: indicates if launching with a simulation, default = "false"
      • model_xacro: specifies the target ".xacro" file for the publishing of tf frames, default =?scout_v2.xacro
      • odom_topic_name: sets the name of the topic which calculated odometry is published to, defaults = "odom"
      • is_scout_mini:Suitable for chassis of type scout_mini,defaults = "false"
    • Start the base node for scout-mini

      $ roslaunch scout_bringup scout_mini_minimal.launch
    • Start the keyboard tele-op node

      $ roslaunch scout_bringup scout_teleop_keyboard.launch

    一.catkin_make編譯時,總失敗,報錯如下:

    param_demo.cpp:(.text+0x50):對‘ros::init(int&, char**, std::string const&, unsigned int)’未定義的引用

    param_demo.cpp:(.text+0x80):對‘ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)’未定義的引用

    param_demo.cpp:(.text+0xb8):對‘ros::param::get(std::string const&, int&)’未定義的引用

    param_demo.cpp:(.text+0x100):對‘ros::NodeHandle::getParam(std::string const&, int&) const’未定義的引用

    param_demo.cpp:(.text+0x1e8):對‘ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)’未定義的引用

    解決辦法:g++ 和gcc 版本不同造成編譯錯誤,參考https://blog.csdn.net/xrinosvip/article/details/81177873

    修改成統一版本即可編譯成功!!!

    命令如下:(查看版本)

    gcc -v?

    g++ -v

    (修改g++ 和gcc的版本,選擇數字后回車即可,gcc 和g++ 必須統一才行!)

    sudo update-alternatives --config g++

    ?sudo update-alternatives --config gcc

    二.運行roslaunch scout_bringup scout_minimal.launch 報錯如下:

    RLException: [scout_minimal.launch] is neither a launch file in package [scout_bringup] nor is [scout_bringup] a launch file name
    The traceback for the exception was written to the log file

    解決方案:在catkin_ws目錄下:source ./devel/setup.bash 即可解決

    三. nanjingtech@nanjingtech-desktop:~/catkin_ws2$ source ./devel/setup.bash
       nanjingtech@nanjingtech-desktop:~/catkin_ws2$ roslaunch scout_bringup scout_teleop_keyboard.launch 

    報錯如下:

    ModuleNotFoundError: No module named 'rospkg'
    [teleop_keybord-1] process has died [pid 7638, exit code 1, cmd /opt/ros/melodic/lib/teleop_twist_keyboard/teleop_twist_keyboard.py __name:=teleop_keybord __log:=/home/nanjingtech/.ros/log/c9cfb1de-edf0-11eb-818c-845cf327b690/teleop_keybord-1.log].
    log file: /home/nanjingtech/.ros/log/c9cfb1de-edf0-11eb-818c-845cf327b690/teleop_keybord-1*.log

    all processes on machine have died, roslaunch will exit
    shutting down processing monitor...
    ... shutting down processing monitor complete
    done
    解決方案參考https://blog.csdn.net/weixin_45688316/article/details/103697198

    python版本的問題!! 

    解決方案
    因為ubuntu18.04使用的ros版本是melodic,而melodic默認使用的是python2,但是我們跑代碼實際用的是python3。
    所以現在bashrc文件里加

    alias python=python3

    保存后

    source ~/.bashrc

    下載rospkg

    pip3 install rospkg

    問題解決
    ?

    總結

    以上是生活随笔為你收集整理的操作ROS松灵机器人步骤及遇到的问题的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

    主站蜘蛛池模板: 在线草 | 成人福利视频导航 | 清清草在线视频 | 三女警花合力承欢猎艳都市h | a级黄色小说 | 久久思 | 性户外野战hd| 丁香婷婷在线观看 | 亚洲天堂avav | 亚洲国产精品自拍 | 久久国产乱子伦免费精品 | 久久久久亚洲精品中文字幕 | 亚洲一本在线观看 | www.五月婷 | 激情视频亚洲 | 亚洲综合色成人 | 国产黄色激情视频 | 国产免费一区二区三区最新不卡 | 色欲AV无码精品一区二区久久 | 成人午夜视频免费 | 三浦理惠子av在线播放 | 国产在线视频资源 | 男女黄色片| 国产欧美精品一区二区在线播放 | wwwxxx国产| 大学生av| 香蕉视频久久久 | 在线视频亚洲 | 在线看成人 | 免费在线一级片 | 亚洲国产剧情 | 女人下面喷水视频 | 97精品在线视频 | 好看的中文字幕av | 欧洲精品免费一区二区三区 | 97插插插 | 四虎国产 | 香蕉视频在线观看视频 | 日韩电影网址 | 国产亚洲视频在线 | 天天狠天天操 | 俺来也av | 欧美熟妇精品黑人巨大一二三区 | 亚洲丝袜在线视频 | 麻豆网站视频 | 黄色免费一级 | 国产精品电影一区二区三区 | 蜜臀久久精品久久久久 | 丰满大乳奶做爰ⅹxx视频 | 国产精品久久婷婷 | 国产精品探花在线观看 | 在线观看你懂的视频 | 久久国产精品视频 | 极品91尤物被啪到呻吟喷水 | 欧美乱仑 | 最近的中文字幕在线看视频 | 熟睡人妻被讨厌的公侵犯 | 大尺度网站在线观看 | 国产又粗又猛视频 | 91官网在线 | 国产麻豆91视频 | 天天色影网 | 美女激情网站 | 亚洲爱视频 | 一本色道久久综合亚洲精品小说 | 99精品免费视频 | 久久性生活视频 | 精品少妇人妻一区二区黑料社区 | 私密spa按摩按到高潮 | 梦梦电影免费高清在线观看 | 国产色图片 | 91视频99 | 欧美黄色一级生活片 | 91av视频在线播放 | 一区二区激情 | 少妇激情一区二区三区视频 | a级无毛片 | 五月丁香久久婷婷 | 欧美一区二区三区不卡视频 | 国产中文字幕亚洲 | 国毛片| 2022精品国偷自产免费观看 | 自拍偷拍视频在线观看 | 亚洲国产黄色av | 自拍偷拍色综合 | 亚洲 精品 综合 精品 自拍 | 羞羞网站在线观看 | 国产精品熟女视频 | 日韩一区二区三区在线视频 | 久久在线电影 | 成人a视频在线观看 | 夜夜春影院| 99爱精品视频 | 久久天天躁狠狠躁夜夜躁 | 日韩一级片在线观看 | 91美女诱惑| 91插插影库| 亚洲一区二区激情 | 欧美性极品少妇xxxx |