@3506306756 抱歉,没看到.....
6192dbeb-cc92-4c4d-be24-c38b8928e914-image.png
-
Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [py]: init() missing 1 required keyword-only argument: 'node_executable'
-
记录一下win11 WSL2一键安装Docker+ROS 安装并尝试启动 按照【小鱼一键安装系列】在wsl2 上安装了docker+ros,输入docker images可以看到成功安装;
f4bb450f-42af-4868-8c6e-d5b413e5c49a-image.png 尝试启动镜像,出现报错: error gathering device information while adding custom device "/dev/snd":not a device node 尝试以命令行交互的形式启动: docker run -it -e DISPLAY=host.docker.internal:0.0 fishros2/ros:noetic-desktop-full成功启动镜像:
qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
8ee3ae36-55d9-4cf3-bdd2-2059bc1216c0-image.png
启动小海龟rosrun turtlesim turtlesim_node,出现报错:查询后得知wsl2没有GUI需要安装xserver
安装Xserver WSL2 ubuntu下安装xfce4: sudo apt-get install xfce4弹出的配置界面选择lightdm,
编辑.bashrc, gedit ~/.bashrc在.bashrc末尾添加如下内容:
# xfce4 export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0 export LIBGL_ALWAYS_INDIRECT=1之后,执行source .bashrc使环境变量生效。
export DISPLAY=xxx.xxx.xxx.xxx:0.0
3. windows 安装vcxsrv,一路点击next即可,安装完成后,设置防火墙,windows防火墙允许vcxsrv.exe和XLaunch.exe。
73223383-2ec1-4f24-b6e0-3a9134278d9b-image.png
ecc534a8-c441-4dc3-b5ca-3bc1d0abac8f-image.png
4. windows运行XLaunch,配置如下:
724a3a25-a87d-41f2-9627-3d9b176bac78-image.png
f259f9ec-1f94-428f-a1b1-3a6cbf8c5b43-image.png
09110039-c372-4baa-8102-adcd79161b80-image.png
5. 打开windows命令行cmd,输入ipconfig查看ipv4地址;
6. ubuntu 下添加DISPLAY变量:xxx.xxx.xxx.xxx为你的windows的ipv4地址。
sudo startxfce4
7. WSL2 ubuntu 启用xfce4:顺利的话,xfce4启动后,XLaunch窗口中可以看到ubuntu的图形界面,如果没看到ubuntu的图形界面,在第4步里选择Multiple windows, Display number设为-1,然后再试试。
启动ROS以命令行交互的形式启动docker镜像:
docker run -it -e DISPLAY=host.docker.internal:0.0 fishros2/ros:noetic-desktop-full启动roscore
roscore另开一个终端启动小海龟:先打开一个wsl2 ubuntu 终端,查看正在运行的docker镜像名称:
docker psb3e01b50-5f6c-4e75-9643-22453ea1c049-image.png
docker exec -it xxx /bin/bash
然后执行:其中,xxx为镜像名,在镜像的终端里启动小海龟:
rosrun turtlesim turtlesim_node21646a44-6e31-4af7-9c5d-2aede90fc9a6-image.png
可能遇到的错误
ba405d0e-3070-4f57-bbfc-f85fe5cfc7c0-image.png启动xfce4报错FAILED TO CONNECT TO SESSION MANAGER的解决方法:
rm -rf .config/xfce4 rm -rf .config/xfce4-session su -c 'systemctl enable lightdm'之后重启电脑。
-
本人在为一个二连杆编写gazebo仿真环境下的PID控制器时,遇到以下报错,不过依旧可以顺利通过rostopic pub命令进行关节位置控制,不知道大家有没有遇到过呢?
SUMMARY ======== PARAMETERS * /rosdistro: kinetic * /rosversion: 1.12.17 * /usm_g/Joint_1_joint_position_controller/joint: Joint_1 * /usm_g/Joint_1_joint_position_controller/pid/d: 10.0 * /usm_g/Joint_1_joint_position_controller/pid/i: 0.01 * /usm_g/Joint_1_joint_position_controller/pid/p: 100.0 * /usm_g/Joint_1_joint_position_controller/type: effort_controller... * /usm_g/Joint_2_joint_position_controller/joint: Joint_2 * /usm_g/Joint_2_joint_position_controller/pid/d: 10.0 * /usm_g/Joint_2_joint_position_controller/pid/i: 0.01 * /usm_g/Joint_2_joint_position_controller/pid/p: 100.0 * /usm_g/Joint_2_joint_position_controller/type: effort_controller... * /usm_g/Joint_3_joint_position_controller/joint: Joint_3 * /usm_g/Joint_3_joint_position_controller/pid/d: 10.0 * /usm_g/Joint_3_joint_position_controller/pid/i: 0.01 * /usm_g/Joint_3_joint_position_controller/pid/p: 100.0 * /usm_g/Joint_3_joint_position_controller/type: effort_controller... * /usm_g/joint_state_controller/publish_rate: 50 * /usm_g/joint_state_controller/type: joint_state_contr... NODES /usm_g/ control_spawner (controller_manager/spawner) / robot_state_publisher (robot_state_publisher/robot_state_publisher) ROS_MASTER_URI=http://localhost:11311 process[usm_g/control_spawner-1]: started with pid [29615] process[robot_state_publisher-2]: started with pid [29616] [ERROR] [1679986197.436298272]: Could not find parameter robot_description on parameter server [robot_state_publisher-2] process has died [pid 29616, exit code 255, cmd /opt/ros/kinetic/lib/robot_state_publisher/robot_state_publisher /joint_states:=/usm_g/joint_states __name:=robot_state_publisher __log:=/home/hao/.ros/log/c019e4e6-cd34-11ed-a161-000c29f17fea/robot_state_publisher-2.log]. log file: /home/hao/.ros/log/c019e4e6-cd34-11ed-a161-000c29f17fea/robot_state_publisher-2*.log [INFO] [1679986197.657590, 0.000000]: Controller Spawner: Waiting for service controller_manager/load_controller [INFO] [1679986199.170301, 0.433000]: Controller Spawner: Waiting for service controller_manager/switch_controller [INFO] [1679986199.172532, 0.436000]: Controller Spawner: Waiting for service controller_manager/unload_controller [INFO] [1679986199.175844, 0.439000]: Loading controller: joint_state_controller [INFO] [1679986199.186013, 0.448000]: Loading controller: Joint_1_joint_position_controller [INFO] [1679986199.245668, 0.509000]: Loading controller: Joint_2_joint_position_controller [INFO] [1679986199.307242, 0.570000]: Loading controller: Joint_3_joint_position_controller [INFO] [1679986199.359738, 0.621000]: Controller Spawner: Loaded controllers: joint_state_controller, Joint_1_joint_position_controller, Joint_2_joint_position_controller, Joint_3_joint_position_controller [INFO] [1679986199.365764, 0.626000]: Started controllers: joint_state_controller, Joint_1_joint_position_controller, Joint_2_joint_position_controller, Joint_3_joint_position_controller诚挚希望能够得到诸位大佬解惑!
-
pi@raspberrypi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: busterpi@raspberrypi:~ $ ./fishros
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
python3-distro python3-yaml
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 126 kB of archives.
After this operation, 542 kB of additional disk space will be used.
Get:1 http://mirrors.zju.edu.cn/raspbian/raspbian buster/main armhf python3-distro all 1.3.0-1 [14.3 kB]
Get:2 http://mirrors.zju.edu.cn/raspbian/raspbian buster/main armhf python3-yaml armhf 3.13-2 [111 kB]
Fetched 126 kB in 2s (58.5 kB/s)
Selecting previously unselected package python3-distro.
(Reading database ... 98848 files and directories currently installed.)
Preparing to unpack .../python3-distro_1.3.0-1_all.deb ...
Unpacking python3-distro (1.3.0-1) ...
Selecting previously unselected package python3-yaml.
Preparing to unpack .../python3-yaml_3.13-2_armhf.deb ...
Unpacking python3-yaml (3.13-2) ...
Setting up python3-distro (1.3.0-1) ...
Setting up python3-yaml (3.13-2) ...
--2023-03-28 13:50:53-- http://fishros.com/install/install1s/tools/base.py
Resolving fishros.com (fishros.com)... 139.9.131.171
Connecting to fishros.com (fishros.com)|139.9.131.171|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 42195 (41K) [application/octet-stream]
Saving to: ‘/tmp/fishinstall/tools/base.py’/tmp/fishinstall/to 100%[===================>] 41.21K --.-KB/s in 0.08s
2023-03-28 13:50:53 (545 KB/s) - ‘/tmp/fishinstall/tools/base.py’ saved [42195/42195]
Run CMD Task:[dpkg --print-architecture]
基础检查通过... ======欢迎使用一键安装工具,人生苦短,三省吾身,省时省力省心!=======
[-]Result:success
======一键安装已开源,请放心使用:https://github.com/fishros/install======= .-~~~~~~~~~-._ _.-~~~~~~~~~-. __.' ~. .~ `.__ .'// 开卷有益 \./ 书山有路 \ `. .'// 可以多看看小鱼的文章 | 关注公众号鱼香ROS \ `. .'// .-~"~~~~-._ | _,-~~~~"~-. \`. .'//.-" `-. | .-' "-.\`. .'//______.============-.. \ | / ..-============.______\`. .'______________________________\|/______________________________` ----------------------------------------------------------------------RUN Choose Task:[请输入括号内的数字]
---众多工具,等君来用---
[1]:一键安装:ROS(支持ROS和ROS2,树莓派Jetson)
[11]:一键安装:ROS+Docker(支持所有版本ROS/ROS2)
[2]:一键安装:github桌面版(小鱼常用的github客户端)
[3]:一键配置:rosdep(小鱼的rosdepc,又快又好用)
[4]:一键配置:ROS环境(快速更新ROS环境设置,自动生成环境选择)
[5]:一键配置:系统源(更换系统源,支持全版本Ubuntu系统)
[6]:一键安装:nodejs
[7]:一键安装:VsCode开发工具
[8]:一键安装:Docker
[9]:一键安装:Cartographer(内测版v0.1)
[10]:一键安装:微信(可以在Linux上使用的微信)
[12]:一键安装:PlateformIO MicroROS开发环境(支持Fishbot)
[77]:测试模式:运行自定义工具测试
[0]:quit
请输入[]内的数字以选择:1
--2023-03-28 13:51:03-- http://fishros.com/install/install1s/tools/tool_install_ros.py
Resolving fishros.com (fishros.com)... 139.9.131.171
Connecting to fishros.com (fishros.com)|139.9.131.171|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19050 (19K) [application/octet-stream]
Saving to: ‘/tmp/fishinstall/tools/tool_install_ros.py’/tmp/fishinstall/to 100%[===================>] 18.60K --.-KB/s in 0.04s
2023-03-28 13:51:03 (513 KB/s) - ‘/tmp/fishinstall/tools/tool_install_ros.py’ saved [19050/19050]
--2023-03-28 13:51:03-- http://fishros.com/install/install1s/tools/tool_config_rosenv.py
Resolving fishros.com (fishros.com)... 139.9.131.171
Connecting to fishros.com (fishros.com)|139.9.131.171|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2457 (2.4K) [application/octet-stream]
Saving to: ‘/tmp/fishinstall/tools/tool_config_rosenv.py’/tmp/fishinstall/to 100%[===================>] 2.40K --.-KB/s in 0s
2023-03-28 13:51:03 (19.2 MB/s) - ‘/tmp/fishinstall/tools/tool_config_rosenv.py’ saved [2457/2457]
--2023-03-28 13:51:03-- http://fishros.com/install/install1s/tools/tool_config_system_source.py
Resolving fishros.com (fishros.com)... 139.9.131.171
Connecting to fishros.com (fishros.com)|139.9.131.171|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7511 (7.3K) [application/octet-stream]
Saving to: ‘/tmp/fishinstall/tools/tool_config_system_source.py’/tmp/fishinstall/to 100%[===================>] 7.33K --.-KB/s in 0.003s
2023-03-28 13:51:03 (2.09 MB/s) - ‘/tmp/fishinstall/tools/tool_config_system_source.py’ saved [7511/7511]
欢迎使用一键安装ROS和ROS2,支持树莓派Jetson,本工具由作者小鱼提供
欢迎使用ROS开箱子工具,本工具由[鱼香ROS]小鱼贡献..
小鱼:检测当前系统debian10.13:buster 支持一键安装ROS
=========接下来这一步很重要,如果不知道怎么选请选择1========
RUN Choose Task:[请输入括号内的数字]
首次安装一定要换源并清理三方源,换源!!!系统默认国外源容易失败!!
[1]:更换系统源再继续安装
[2]:不更换继续安装
[0]:quit
请输入[]内的数字以选择:1
欢迎使用一键换源工具,本工具由[鱼香ROS]小鱼贡献..
RUN Choose Task:[请输入括号内的数字]
请选择换源方式,如果不知道选什么请选2
[1]:仅更换系统源
[2]:更换系统源并清理第三方源
[0]:quit
请输入[]内的数字以选择:2
Run CMD Task:[sudo rm -rf /etc/apt/sources.list]
[-]Result:success删除一个资源文件
Run CMD Task:[sudo rm -rf /etc/apt/sources.list.d]
[-]Result:successRun CMD Task:[sudo mkdir -p /etc/apt/sources.list.d]
[-]Result:successRun CMD Task:[dpkg --print-architecture]
[-]Result:success检测到当前系统架构为[arm64:buster],正在为你更换对应源..
替换完成,尝试第一次更新....
Run CMD Task:[sudo apt update]
[|]Get:2 https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease [5[-]Get:3 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports InRelease [/]Get:4 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates InR[|] The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9 NO_PUBKEY DCC9[/] The following signatures couldn't be verified because the public key is not[|] The following signatures couldn't be verified because the public key is not[-]Err:4 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates InR[/] The following signatures couldn't be verified because the public key is not[-]Result:code:100 KEY 54404762BBB6E853更新失败,开始更换导入方式并三次尝试...
Run CMD Task:[sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9]
[]Executing: /tmp/apt-key-gpghome.VHtO2DCTbc/gpg.1.sh --keyserver keyserver.ubu[-]Result:successRun CMD Task:[sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DCC9EFBF77E11517]
[]Executing: /tmp/apt-key-gpghome.VDwjHrbJlO/gpg.1.sh --keyserver keyserver.ubu[-]Result:successRun CMD Task:[sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 54404762BBB6E853]
[]Executing: /tmp/apt-key-gpghome.uv4bM819Zt/gpg.1.sh --keyserver keyserver.ubu[-]Result:successRun CMD Task:[apt-get install debian-keyring debian-archive-keyring]
[/]Package debian-keyring is not available, but is referred to by another packag[-]Result:code:100 has been obsoleted, orRun CMD Task:[apt-key update]
[]gpg: key 9165938D90FDDD2E: "Mike Thompson (Raspberry Pi Debian armhf ARMv6+VF[-]Result:successRun CMD Task:[sudo apt update]
[|]Get:2 https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease [5[-]Get:3 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports InRelease [/]Get:4 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates InR[]Get:5 https://mirrors.tuna.tsinghua.edu.cn/debian buster/main armhf Packages [|]Get:6 https://mirrors.tuna.tsinghua.edu.cn/debian buster/main Translation-en [-]Get:7 https://mirrors.tuna.tsinghua.edu.cn/debian buster/contrib armhf Packag[/]Get:8 https://mirrors.tuna.tsinghua.edu.cn/debian buster/contrib Translation-[]Get:9 https://mirrors.tuna.tsinghua.edu.cn/debian buster/non-free armhf Packa[|]Get:10 https://mirrors.tuna.tsinghua.edu.cn/debian buster/non-free Translatio[-]Get:11 https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates/main armhf [/]Get:12 https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates/main Transl[]Get:13 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports/main armh[|]Get:14 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports/main Tran[-]Get:15 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports/contrib a[/]Get:16 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports/contrib T[]Get:17 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports/non-free [|]Get:18 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports/non-free [-]Get:19 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates/ma[/]Get:20 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates/ma[]Get:21 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates/no[-]Result:success st --upgradable' to see them.搞定了,不信你看,累死宝宝了,还不快去给小鱼点个赞~
['Get:1 https://mirrors.tuna.tsinghua.edu.cn/debian buster InRelease [122 kB]', 'Get:2 https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease [56.6 kB]', 'Get:3 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports InRelease [51.4 kB]', 'Get:4 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates InRelease [34.8 kB]', 'Get:5 https://mirrors.tuna.tsinghua.edu.cn/debian buster/main armhf Packages [7,706 kB]', 'Get:6 https://mirrors.tuna.tsinghua.edu.cn/debian buster/main Translation-en [5,969 kB]', 'Get:7 https://mirrors.tuna.tsinghua.edu.cn/debian buster/contrib armhf Packages [40.1 kB]', 'Get:8 https://mirrors.tuna.tsinghua.edu.cn/debian buster/contrib Translation-en [44.2 kB]', 'Get:9 https://mirrors.tuna.tsinghua.edu.cn/debian buster/non-free armhf Packages [62.1 kB]', 'Get:10 https://mirrors.tuna.tsinghua.edu.cn/debian buster/non-free Translation-en [88.9 kB]', 'Get:11 https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates/main armhf Packages [8,784 B]', 'Get:12 https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates/main Translation-en [6,915 B]', 'Get:13 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports/main armhf Packages [477 kB]', 'Get:14 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports/main Translation-en [411 kB]', 'Get:15 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports/contrib armhf Packages [7,732 B]', 'Get:16 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports/contrib Translation-en [8,080 B]', 'Get:17 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports/non-free armhf Packages [13.0 kB]', 'Get:18 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports/non-free Translation-en [39.5 kB]', 'Get:19 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates/main armhf Packages [464 kB]', 'Get:20 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates/main Translation-en [256 kB]', 'Get:21 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates/non-free Translation-en [344 B]', 'Fetched 15.6 MB in 12s (1,298 kB/s)', 'Reading package lists...', 'Building dependency tree...', 'Reading state information...', "721 packages can be upgraded. Run 'apt list --upgradable' to see them."]
镜像修复完成.....
Run CMD Task:[sudo apt update]
[|]Get:2 https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease [5[-]Get:3 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports InRelease [/]Get:4 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates InR[-]Result:success st --upgradable' to see them.Run CMD Task:[sudo apt-cache search curl ]
[-]cl-curry-compose-reader-macros - Reader macros for function partial applicati[-]libcupt4-2-downloadmethod-curl - flexible package manager -- libcurl download[]libcurl3-gnutls - easy-to-use client-side URL transfer library (GnuTLS flavou[]libcurl4-gnutls-dev - development files and documentation for libcurl (GnuTLS[|]libcurl4-nss-dev - development files and documentation for libcurl (NSS flavo[-]libcurl4-openssl-dev - development files and documentation for libcurl (OpenS[/]flickcurl-doc - utilities to call the Flickr API from command line - document[/]libflickcurl0-dbg - C library for accessing the Flickr API - debugging symbol[]forensics-extra - Forensics Environment - extra console components (metapacka[|]gnupg1 - GNU privacy guard - a PGP implementation (deprecated "classic" versi[-]golang-github-moul-http2curl-dev - Go package for convert Golang's http.Reque[|]libghc-curl-doc - Documentation for the libcurl Haskell bindings; documentati[-]libghc-curl-prof - Profiling libraries for the libcurl Haskell bindings; prof[]libghc-hxt-doc - collection of tools for processing XML with Haskell; documen[|]libghc-hxt-prof - collection of tools for processing XML with Haskell; profil[-]libghc-hxt-http-doc - Interface to native Haskell HTTP package HTTP; document[/]libghc-hxt-http-prof - Interface to native Haskell HTTP package HTTP; profili[]libresource-retriever-dev - Robot OS resource_retriever library - development[]librust-curl+http2-dev - Rust bindings to libcurl for making HTTP requests - [|]librust-curl-dev - Rust bindings to libcurl for making HTTP requests - Rust s[-]librust-curl-sys+http2-dev - Native bindings to the libcurl library - feature[/]librust-curl-sys+libnghttp2-sys-dev - Native bindings to the libcurl library []librust-curl-sys-dev - Native bindings to the libcurl library - Rust source c[|]librust-git2+curl-dev - Bindings to libgit2 for interoperating with git repos[-]librust-git2-curl-dev - Backend for an HTTP transport in libgit2 powered by l[/]librust-libgit2-sys+curl-dev - Native bindings to the libgit2 library - featu[]librust-libgit2-sys+curl-sys-dev - Native bindings to the libgit2 library - f[/]libstrongswan-extra-plugins - strongSwan utility and crypto library (extra pl[/]golang-github-ssgelm-cookiejarparser-dev - Go library that parses a curl cook[-]Result:success ect inputstream addon for KodiRun CMD Task:[sudo apt install curl -y]
[-]Get:1 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates/mai[/]Get:2 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates/mai[-]Result:success +rpt2+rpi1+deb10u1) ...u4) ...Run CMD Task:[sudo apt-cache search gnupg2 ]
[|]gnupg2 - GNU privacy guard - a free PGP replacement (dummy transitional packa[-]Result:successRun CMD Task:[sudo apt install gnupg2 -y]
[]Get:1 https://mirrors.tuna.tsinghua.edu.cn/debian buster/main armhf gnupg2 al[-]Result:success ...0u2_all.deb ...stalled.)Run CMD Task:[curl -s https://gitee.com/ohhuo/rosdistro/raw/master/ros.asc | sudo apt-key add -]
[-]Result:successRun CMD Task:[dpkg --print-architecture]
[-]Result:success根据您的系统,为您推荐安装源为['http://packages.ros.org/ros/ubuntu/', 'http://packages.ros.org/ros2/ubuntu/']
Run CMD Task:[sudo apt update]
[|]Get:2 https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease [5[-]Get:3 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports InRelease [/]Get:4 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates InR[/]Get:8 http://packages.ros.org/ros2/ubuntu buster/main arm64 Packages [59.5 kB[-]Result:success st --upgradable' to see them.Run CMD Task:[sudo apt-cache search ros-base ]
[-]Result:success r Robot OS roscpp-coreageKerberos换源后更新失败,第二次开始切换源,尝试更换ROS2源为华为源!
根据您的系统,为您推荐安装源为['http://packages.ros.org/ros/ubuntu/', 'http://packages.ros.org/ros2/ubuntu/']
Run CMD Task:[sudo rm -rf /etc/apt/sources.list.d/ros-fish.list]
[-]Result:successRun CMD Task:[sudo apt update]
[|]Get:2 https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease [5[-]Get:3 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports InRelease [/]Get:4 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates InR[-]Result:success st --upgradable' to see them.Run CMD Task:[sudo apt-cache search ros-base ]
[-]Result:success r Robot OS roscpp-coreageKerberos换源后更新失败,第三次开始切换源,尝试更换ROS2源为ROS2官方源!
根据您的系统,为您推荐安装源为['http://packages.ros.org/ros/ubuntu/', 'http://packages.ros.org/ros2/ubuntu/']
Run CMD Task:[sudo rm -rf /etc/apt/sources.list.d/ros-fish.list]
[-]Result:successRun CMD Task:[sudo apt update]
[-]Get:3 https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease [5[/]Get:4 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports InRelease [|]Get:6 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates InR[-]Result:success st --upgradable' to see them.Run CMD Task:[sudo apt-cache search ros-base ]
[-]Result:success r Robot OS roscpp-coreageKerberos换源后更新失败,第四次开始切换源,尝试使用https-ROS2官方源~!
根据您的系统,为您推荐安装源为['http://packages.ros.org/ros/ubuntu/', 'http://packages.ros.org/ros2/ubuntu/']
Run CMD Task:[sudo rm -rf /etc/apt/sources.list.d/ros-fish.list]
[-]Result:successRun CMD Task:[sudo apt update]
[-]Get:3 https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease [5[/]Get:4 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports InRelease []Get:5 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates InR[-]Result:success st --upgradable' to see them.Run CMD Task:[sudo apt-cache search ros-base ]
[-]Result:success r Robot OS roscpp-coreageKerberosRun CMD Task:[sudo apt update]
[-]Get:3 https://mirrors.tuna.tsinghua.edu.cn/debian buster-updates InRelease [5[]Get:5 https://mirrors.tuna.tsinghua.edu.cn/debian buster-backports InRelease [|]Get:6 https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates InR[-]Result:success st --upgradable' to see them.Run CMD Task:[sudo apt-cache search ros-base ]
[-]Result:success r Robot OS roscpp-coreageKerberosRun CMD Task:[ls /opt/ros/False/setup.bash]
[-]Result:code:2安装失败了,请打开鱼香社区:https://fishros.org.cn/forum 在一键安装专区反馈问题...
Run CMD Task:[ls /opt/ros/False/setup.bash]
[-]Result:code:2欢迎加入机器人学习交流QQ群:686914208(入群口令:一键安装)
如在使用过程中遇到问题,请打开:https://fishros.org.cn/forum 进行反馈 -
-
-
在做一个学生项目,硬件平台是树莓派4b,安装了ubuntu系统,想借助ROS和uwb定位实现路径规划,有没有大牛提供一下技术路线指导?
-
目的:将相机获取的点云转变到机械臂基座标下
1.手眼标定:利用easy_handeye功能包进行手眼标定
配置的launch文件
2.png
3.png
标定结果
4.png编写cpp
Quaterniond q1(-0.01212536541456388,-0.06630808814296718,0.9699827597086316,0.2336442997986779),q2(0.655395,-0.654873,-0.265976,0.266188);//q1为标定结果文件中四元数,q2为机械臂末端姿态四元数(通过机械臂控制demo文件直接打印获得) q1.normalize(); q2.normalize(); Vector3d t1(-0.07166787993510233,0.14375536022424967,0.09587844058930889),t2(-0.2,0.2,0.825),t3(-0.2,-0.25,0.825);//t1从标定结果中获得,t2、t3在机械臂控制文件中获得 Isometry3d T(q1),T1w(q2),T2w(q2);//T为手眼标定变换矩阵,T1为姿态1,T2为姿态二 T.pretranslate(t1); T1w.pretranslate(t2); T2w.pretranslate(t3); Matrix4d T0 = T.matrix(); Matrix4d T1 = T1w.matrix(); Matrix4d T2 = T2w.matrix(); Matrix4d T1t = T1.inverse() * T0; Matrix4d T2t = T2.inverse() * T0; pcl::PointCloud<pcl::PointXYZRGB>::Ptr align_cloud1(new pcl::PointCloud<pcl::PointXYZRGB>); pcl::PointCloud<pcl::PointXYZRGB>::Ptr align_cloud2(new pcl::PointCloud<pcl::PointXYZRGB>); pcl::transformPointCloud(*cloud1, *align_cloud1, T1t); pcl::transformPointCloud(*cloud2, *align_cloud2, T2t); visualize_pcd(align_cloud1,align_cloud2);机械臂控制文件
位姿1
5.png
位姿2
6.png -
版本为 ubuntu20 galactic 旭日X3派
使用 cartographer建图时,雷达抖动严重。
2023-03-27 10-00-28 的屏幕截图.png
就是刚开始还不抖动,但是旋转一下,就开始抖动,小车停下来也在抖动。 -
各种考虑后确认使用ubuntu20 ROS使用humble,但ubuntu20的apt中没有humble相关的包,ROS2的默认包我可以直接编译,但其它第三方安装时也使用ros-$DISTRBUIT-xxxx这种类型的包,请问有什么简便方法安装其它的第三方包吗?比如 ROS-PCL
-
--2023-03-26 13:37:31-- http://fishros.com/install
正在解析主机 fishros.com (fishros.com)... 139.9.131.171
正在连接 fishros.com (fishros.com)|139.9.131.171|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 301 Moved Permanently
位置:http://fishros.com/install/ [跟随至新的 URL]
--2023-03-26 13:37:31-- http://fishros.com/install/
再次使用存在的到 fishros.com:80 的连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度: 582 [application/octet-stream]
正在保存至: “fishros”fishros 100%[===================>] 582 --.-KB/s 用时 0s
2023-03-26 13:37:31 (35.3 MB/s) - 已保存 “fishros” [582/582])
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
python3-yaml 已经是最新版 (3.12-1build2)。
python3-distro 已经是最新版 (1.0.1-2)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 8 个软件包未被升级。 -
如何使用pythonAPI进行导航
-
看了小鱼的《动手学ROS2》10.5 配置Fishbot进行建图文档,根据里面的步骤新建了文档,编译都能正常完成,也source了,但是运行launch文件的话会出现file 'cartographer.launch.py' was not found in the share directory of package 'fishbot_cartographer' which is at '/home/wu/cmdvel/install/fishbot_cartographer/share/fishbot_cartographer' 是找不到这个文件吗,
1 如何解决
2 如果是要读取真实激光fram_id =laser的数据要如何设置,不是gazebo -
[linefeature_tracker-4] process has died [pid 36717, exit code -11
我在VINS_MONO中想要新增加一个线特征提取节点,在写好的代码后,代码能编译通过,并且启动launch时可以看见
process [linefeature_tracker-4]: started with pid [36717]
但是后续启动完成就会出现
[linefeature_tracker-4] process has died
我想了解一下这部分可能会在哪里出现问题,目前有点不知道该怎么去定位到问题, 感谢大家。下面是报错信息。(ubuntu18.04 + ROS)
[linefeature_tracker-4] process has died [pid 36717, exit code -11, cmd /home/xiaolu/vins_mono/devel/lib/feature_tracker/LineFeature_tracker __name:=linefeature_tracker __log:=/home/xiaolu/.ros/log/4db5045a-cb0c-11ed-a589-000c29a9ab40/linefeature_tracker-4.log].
log file: /home/xiaolu/.ros/log/4db5045a-cb0c-11ed-a589-000c29a9ab40/linefeature_tracker-4*.log -
QQ图片20230325143835.png
[~]$ wget http://fishros.com/install -O fishros && . fishros
--2023-03-24 23:48:53-- http://fishros.com/install
Resolving fishros.com (fishros.com)... 139.9.131.171
Connecting to fishros.com (fishros.com)|139.9.131.171|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://fishros.com/install/ [following]
--2023-03-24 23:48:53-- http://fishros.com/install/
Reusing existing connection to fishros.com:80.
HTTP request sent, awaiting response... 200 OK
Length: 582 [application/octet-stream]
Saving to: ‘fishros’fishros 100%[===================>] 582 --.-KB/s in 0s
2023-03-24 23:48:53 (101 MB/s) - ‘fishros’ saved [582/582]
.: no such file or directory: fishros
-
求帮帮孩子!报错如下:
78284683-9aaf-454e-8fec-81bc11d702ba-15e744dced7c16d00f1a60e79a1d099.png -
输出的日志信息如下:
[INFO] [launch]: All log files can be found below /home/fins/.ros/log/2023-03-23-19-25-48-762078-fins-UTG-11522 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [robot_state_publisher-1]: process started with pid [11523] [INFO] [gzserver-2]: process started with pid [11525] [INFO] [gzclient-3]: process started with pid [11527] [INFO] [spawn_entity.py-4]: process started with pid [11529] [robot_state_publisher-1] [INFO] [1679570749.093074638] [robot_state_publisher]: got segment base_link [robot_state_publisher-1] [INFO] [1679570749.093129855] [robot_state_publisher]: got segment dummy [robot_state_publisher-1] [INFO] [1679570749.093135121] [robot_state_publisher]: got segment front_link [spawn_entity.py-4] [INFO] [1679570749.351752070] [spawn_entity]: Spawn Entity started [spawn_entity.py-4] [INFO] [1679570749.351941495] [spawn_entity]: Loading entity published on topic robot_description [spawn_entity.py-4] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/qos.py:307: UserWarning: DurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL is deprecated. Use DurabilityPolicy.TRANSIENT_LOCAL instead. [spawn_entity.py-4] warnings.warn( [spawn_entity.py-4] [INFO] [1679570749.352830954] [spawn_entity]: Waiting for entity xml on robot_description [spawn_entity.py-4] [INFO] [1679570749.478006085] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30 [spawn_entity.py-4] [INFO] [1679570749.478191540] [spawn_entity]: Waiting for service /spawn_entity [spawn_entity.py-4] [INFO] [1679570750.231305805] [spawn_entity]: Calling service /spawn_entity [spawn_entity.py-4] [INFO] [1679570750.400439868] [spawn_entity]: Spawn status: SpawnEntity: Successfully spawned entity [rectangle] [INFO] [spawn_entity.py-4]: process has finished cleanly [pid 11529] [gzclient-3] ../src/intel/isl/isl.c:2216: FINISHME: ../src/intel/isl/isl.c:isl_surf_supports_ccs: CCS for 3D textures is disabled, but a workaround is available. code_text下面是具体的launch文件与urdf模型
1、这是长方体的urdf文件:
<?xml version="1.0" encoding="utf-8"?> <!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com) Commit Version: 1.6.0-4-g7f85cfe Build Version: 1.6.7995.38578 For more information, please see http://wiki.ros.org/sw_urdf_exporter --> <robot name="demo1-3"> <link name="dummy"> </link> <link name="base_link"> <inertial> <origin xyz="0.059269 -0.004969 0.17749" rpy="0 0 0" /> <mass value="1.746" /> <inertia ixx="0.0029237" ixy="3.8969E-05" ixz="-6.1279E-19" iyy="0.0063175" iyz="9.5233E-20" izz="0.0062493" /> </inertial> <visual> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry> <mesh filename="package://gazebo_simulation/meshes/base_link.STL" /> </geometry> <material name=""> <color rgba="1 1 1 1" /> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry> <mesh filename="package://gazebo_simulation/meshes/base_link.STL" /> </geometry> </collision> </link> <joint name="dummy_joint" type="fixed"> <parent link="dummy"/> <child link="base_link"/> </joint> <link name="front_link"> <inertial> <origin xyz="0.0022355 0.01995 -0.00025958" rpy="0 0 0" /> <mass value="0.071103" /> <inertia ixx="1.4695E-05" ixy="-5.6331E-22" ixz="-2.0294E-22" iyy="2.6451E-05" iyz="-5.6257E-22" izz="3.0622E-05" /> </inertial> <visual> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry> <mesh filename="package://gazebo_simualtion/meshes/front_link.STL" /> </geometry> <material name=""> <color rgba="0.79216 0.81961 0.93333 1" /> </material> </visual> <collision> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry> <mesh filename="package://gazebo_simulation/meshes/front_link.STL" /> </geometry> </collision> </link> <joint name="line_joint" type="fixed"> <origin xyz="0.077552 -0.17785 0.016113" rpy="1.5708 0 0" /> <parent link="base_link" /> <child link="front_link" /> <axis xyz="0 0 0" /> </joint> </robot> ''' 2、然后launch文件如下: (1)view_gazebo_tribot.launch.pyimport os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSourcefrom launch_ros.actions import Node
def generate_launch_description():
# Include the robot_state_publisher launch file, provided by our own package. Force sim time to be enabled # !!! MAKE SURE YOU SET THE PACKAGE NAME CORRECTLY !!! package_name='gazebo_simulation' #<--- CHANGE ME world_file_path = 'worlds/neighborhood.world' pkg_path = os.path.join(get_package_share_directory(package_name)) world_path = os.path.join(pkg_path, world_file_path) # Pose where we want to spawn the robot spawn_x_val = '0.0' spawn_y_val = '0.0' spawn_z_val = '0.0' spawn_yaw_val = '0.0' tribot = IncludeLaunchDescription( PythonLaunchDescriptionSource([os.path.join( get_package_share_directory(package_name),'launch','tribot.launch.py' )]), launch_arguments={'use_sim_time': 'true', 'world':world_path}.items() ) # Include the Gazebo launch file, provided by the gazebo_ros package gazebo = IncludeLaunchDescription( PythonLaunchDescriptionSource([os.path.join( get_package_share_directory('gazebo_ros'), 'launch', 'gazebo.launch.py')]), ) # Run the spawner node from the gazebo_ros package. The entity name doesn't really matter if you only have a single robot. spawn_entity = Node(package='gazebo_ros', executable='spawn_entity.py', arguments=['-topic', 'robot_description', '-entity', 'rectangle', '-x', spawn_x_val, '-y', spawn_y_val, '-z', spawn_z_val, '-Y', spawn_yaw_val], output='screen') # Launch them all! return LaunchDescription([ tribot, gazebo, spawn_entity, ]) 其中调用的tribot.launch.py文件如下:import os
from ament_index_python.packages import get_package_share_directory
import launch
from launch import LaunchDescription
from launch.substitutions import LaunchConfiguration
from launch.actions import DeclareLaunchArgument
from launch_ros.actions import Nodeimport xacro
def generate_launch_description():
# Check if we're told to use sim time use_sim_time = LaunchConfiguration('use_sim_time') # Process the URDF file pkg_path = os.path.join(get_package_share_directory('gazebo_simulation')) xacro_file = os.path.join(pkg_path,'urdf','demo1-3.urdf') robot_description_config = xacro.process_file(xacro_file) # Create a robot_state_publisher node params = {'robot_description': robot_description_config.toxml(), 'use_sim_time': use_sim_time} node_robot_state_publisher = Node( package='robot_state_publisher', executable='robot_state_publisher', output='screen', parameters=[params] ) # Launch! return LaunchDescription([ DeclareLaunchArgument( 'use_sim_time', default_value='false', description='Use sim time if true'), node_robot_state_publisher ]) -
<robot name="my_base" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:property name="PI" value="3.141"/> <material name="black"> <color rgba="0 0 0 1.0" /> </material> <xacro:property name="base_footprint_radius" value="0.001" /> <xacro:property name="base_link_radius" value="0.1" /> <xacro:property name="base_link_length" value="0.08" /> <xacro:property name="earth_space" value="0.015" /> <link name="base_footprint"> <visual> <geometry> <sphere radius="${base_footprint_radius}" /> </geometry> </visual> </link> <link name="base_link"> <visual> <geometry> <cylinder radius="${base_link_radius}" length="${base_link_length}" /> </geometry> <origin xyz="0 0 0" rpy="0 0 0" /> <material name="yellow"> <color rgba="0.5 0.3 0.0 0.5" /> </material> </visual> </link> <joint name="base_link2base_footprint" type="fixed"> <parent link="base_footprint" /> <child link="base_link" /> <origin xyz="0 0 ${earth_space + base_link_length / 2 }" /> </joint>launch文件
<launch>
<param name="robot_description" command="$(find xacro)/xacro $(find urdf01_rviz)/urdf/xacro/demo02_test.xacro" />
<node pkg="rviz" name="rviz" type="rviz" args="-d $(find urdf01_rviz)/config/show_mycar.rviz" />
<node pkg="joint_state_publisher" name="joint_state_publisher" type="joint_state_publisher" />
<node pkg="robot_state_publisher" name="robot_state_publisher" type="robot_state_publisher" />
<node pkg="joint_state_publisher_gui" name="joint_state_publisher_gui" type="joint_state_publisher_gui" />
</launch>~/catkin_ws$ roslaunch urdf01_rviz demo01_test_xacro.launch
... logging to /home/amov/.ros/log/501cc910-c8a7-11ed-9417-1cc10cb8638e/roslaunch-amov-21757.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.XML parsing error: mismatched tag: line 74, column 10
when processing file: /home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacroCheck that:
Your XML is well-formed You have the xacro xmlns declaration: xmlns:xacro="http://www.ros.org/wiki/xacro"
RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/melodic/lib/xacro/xacro', '/home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacro']] returned with code [2].Param xml is <param command="$(find xacro)/xacro $(find urdf01_rviz)/urdf/xacro/demo02_test.xacro" name="robot_description"/>
The traceback for the exception was written to the log file
amov@amov:~/catkin_ws$ source ./devel/setup.bash
amov@amov:~/catkin_ws$ roslaunch urdf01_rviz demo01_test_xacro.launch
... logging to /home/amov/.ros/log/b4f1aada-c8a8-11ed-9417-1cc10cb8638e/roslaunch-amov-22623.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.XML parsing error: mismatched tag: line 74, column 10
when processing file: /home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacroCheck that:
Your XML is well-formed You have the xacro xmlns declaration: xmlns:xacro="http://www.ros.org/wiki/xacro"
RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/melodic/lib/xacro/xacro', '/home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacro']] returned with code [2].Param xml is <param command="$(find xacro)/xacro $(find urdf01_rviz)/urdf/xacro/demo02_test.xacro" name="robot_description"/>
The traceback for the exception was written to the log file
amov@amov:~/catkin_ws$ roslaunch urdf01_rviz demo01_test_xacro.launch
... logging to /home/amov/.ros/log/964a3ab0-c8a9-11ed-9417-1cc10cb8638e/roslaunch-amov-23038.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.XML parsing error: mismatched tag: line 74, column 10
when processing file: /home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacroCheck that:
Your XML is well-formed You have the xacro xmlns declaration: xmlns:xacro="http://www.ros.org/wiki/xacro"
RLException: Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/melodic/lib/xacro/xacro', '/home/amov/catkin_ws/src/urdf01_rviz/urdf/xacro/demo02_test.xacro']] returned with code [2].Param xml is <param command="$(find xacro)/xacro $(find urdf01_rviz)/urdf/xacro/demo02_test.xacro" name="robot_description"/>
The traceback for the exception was written to the log file