GAZEBO_PLUGIN_PATH 设置方法

2023-05-16

http://answers.gazebosim.org/question/13391/how-to-set-gazebo_plugin_path-correctly-and-add-the-plugin-into-gazebo_ros/

Hi, I am using gazebo to simulate a sonar. Thus I will use hector_sonar_plugin. While after I install the hector plugins from source and call it in my sdf, errors come.

At first, an error appear asking me to add libhector_sonar_plugin.so to gazebo_ros package.

I cannot understand it and thought it cannot find the plugin. Thus,I use

export GAZEBO_PLUGIN_PATH=`pwd`:$GAZEBO_PLUGIN_PATH

to add hector_plugin folder into path, then more error come:

Error [Plugin.hh:156] Failed to load plugin libRayPlugin.so: libRayPlugin.so: cannot open shared object file: No such file or directory
[FATAL] [1464103865.820981859]: A ROS node for Gazebo has not been initialized, unable to load plugin. Load the Gazebo system plugin 'libgazebo_ros_api_plugin.so' in the gazebo_ros package)

Could someone tell me how to set the GAZEBO_PLUGIN_PATH correctly (or reset it correctly)? And if I want to use plug-Ins such as hector's, what should I do? (just copy .so to the model folder or ...?)

I am using Indigo full desktop, and thus version should be gazebo2

 

as already mentioned previously you can see your current GAZEBO_PLUGIN_PATH by the command echo $GAZEBO_PLUGIN_PATH. The path should point directly to the folder where the .so file is located (for example the build folder).

the export GAZEBO_PLUGIN_PATH=´pwd´:$GAZEBO_PLUGIN_PATH doesn't overwrite the path it just append the current directory(pwd) to the variable. (you can also use $PWD which is handier) Resulting you have a mess after several tries. In addition, export is just temporary and depends on the current terminal. (don't confuse yourself with too many tabs / terminals)

To clean the variable use unset GAZEBO_PLUGIN_PATH , then check again the variable: echo $GAZEBO_PLUGIN_PATH (no nothing should be returned)

Now you have to navigate in terminal to the folder where the .so file is located (since pwd is the current folder). After using export GAZEBO_PLUGIN_PATH=$PWD your variable should be set correctly. (overwrites existing values)

If you want to append your path to the variable use export GAZEBO_PLUGIN_PATH=$PWD:$GAZEBO_PLUGIN_PATH.

(Hint: you can also set the path directly for example: export GAZEBO_PLUGIN_PATH=/home/#USERNAME#/Documents/testplugin/build)

To have the GAZEBO_PLUGIN_PATH permanent you can include the "export xx=xx" line into your ~/.bashrc file

Edit/Remark:

The default gazebo plugins are loading since gazebo is sourcing its default environment variables before the start. This is carried out using the file /usr/share/gazebo/setup.sh or /usr/share/gazebo-X.X/setup.sh(the X.X is your respective gazebo version)

To be aware of this behavior and be able to see its default values, you can use source /usr/share/gazebo/setup.sh

Again, to have this permanent in every console instance, add the line to your .bashrc file.

link

Comments

1

Thank you! I was quite confused why echo GAZEBO_PLUGIN_PATH just return a same name a same name, even if the gazebo default plugin setting still works. But at least I can use your method now.

wyxf007 gravatar imagewyxf007 ( )

add a comment

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

GAZEBO_PLUGIN_PATH 设置方法 的相关文章

  • 带有图标相对路径的 Windows 快捷方式

    有没有办法设置Windows快捷方式中图标的相对路径 对于目标位置 它工作正常 windir system32 cmd exe c cd CD start fileToExecute bat 我读到 win 快捷方式可以自动从 exe 文件
  • 如何使用 WSGI 实现 Flask 应用程序按路径调度?

    我想使用单个域作为多个 Flask 应用程序的暂存环境 这些应用程序最终将在自己的域上运行 就像是 example staging com app1 example staging com app2 example staging com
  • Swift:如何扩展路径字符串中的波形符

    如何在 Swift 中用波形符扩展路径字符串 我有一个像这样的字符串 Desktop 我想使用这条路径NSFileManager方法 这需要将波形符扩展为 Users
  • SVG路径定位

    我正在制作脸部 SVG 无法将眉毛固定在正确的位置 请指教
  • Twig 链接到当前路线但更改区域设置

    我会在现有网站中添加一些指向不同区域设置版本的链接 效果很好 但是很丑 li a href img src alt es a li li a href a li
  • 在 Node.js 中获取父目录名称

    我正在使用 Node js 并且我想获取某个目录的父目录名称 文件 我有文件 test1 folder1 FolderIWant test txt 我想要得到 FolderIWant 我努力了 var path require path v
  • ANDROID NDK - android:找不到命令

    我试图完成 Android NDK 中提供的第一个示例练习 我试图在 cygwin 上运行以下命令 android update project p 然而 我得到android command not found error 我检查了我的
  • JavaScript 文件中的代码如何获取文件的 URL?

    我需要将 CSS 样式表动态加载到位于不同的领域 如何获取 JS 文件的完整 URL 以在href样式表的属性 例如 结构如下 http bla com js script js http bla com css style css 我想将
  • 正则表达式:验证没有查询参数的 URL 路径

    我不是正则表达式专家 我正在绞尽脑汁尝试做一个看起来非常简单并且在 python 2 7 中工作的事情 在没有查询字符串的情况下验证 URL 的路径 无主机名 换句话说 以 开头的字符串允许字母数字值 并且不允许任何其他特殊字符 除了这些
  • 如何获取R中的脚本路径? [复制]

    这个问题在这里已经有答案了 可能的重复 Rscript 确定执行脚本的路径 https stackoverflow com questions 1815606 rscript determine path of the executing
  • $PATH 中 /usr/bin 和 /usr/local/bin 等的顺序

    在我的 Mac 上 我经常使用 bash 对于我的环境设置 我添加了 usr bin and usr local bin into PATH就像我平常做的那样 虽然我知道什么 usr bin and usr local bin关于 我很好奇
  • Delphi - 将物理路径(设备文件句柄)转换为虚拟路径

    我怎样才能转换像这样的路径 设备 HarddiskVolume3 Windows 进入其相应的虚拟路径 如本例中的 c Windows 我个人更喜欢原生方式 function GetHDDDevicesWithDOSPath TString
  • 求任意节点到一个节点的最小公共路径

    我的问题如下 我有一个 backup 节点和其他节点 从这些节点 我需要生成一个到备份节点的最小公共路径 未加权和无向图 我不需要每次都需要解决方案 我如何知道我是否可以生成这条路径 我正在考虑将图分成一些子图并搜索最小的 subpath
  • Haskell,堆栈:找到可执行文件

    我正在寻找类似的东西 stack whereis hasktags where whereis行为或多或少类似于 UNIXwhereis命令 hasktags是这样运行的 stack exec hasktags stack exec whe
  • 如何在Python中独立于语言安装(linux)获取用户桌面路径

    我找到了 如何找到用户桌面的路径 的几个问题和答案 但在我看来它们都已失效 至少我找到的那些 原因是 如果用户安装的 Linux 不是英语 他或她的桌面很可能位于除 Desktop 例如 对于瑞典语 我相信它是在 Skrivbord 谁知道
  • C# 获取资源文件夹路径

    我的项目中的一些资源很好 并且使用字符串路径可以正常工作 但是如果我将项目移动到另一个目录或另一台计算机 它将停止工作 请我需要在字符串变量中获取项目资源文件夹的路径 像这样的东西 C Users User1 Documents
  • Javascript:通过将路径作为字符串传递给对象来获取对象的深层值[重复]

    这个问题在这里已经有答案了 可能的重复 使用字符串键访问嵌套的 JavaScript 对象 https stackoverflow com questions 6491463 accessing nested javascript obje
  • Android 中的 java.io.FileNotFoundException

    我正在使用代码从图库中选择图像 public void onCreate Bundle savedInstanceState super onCreate savedInstanceState setContentView R layout
  • 连接路径的函数?

    是否有现有的函数来连接路径 我知道实施起来并不困难 但仍然 除了照顾尾随 or 我需要注意正确的操作系统路径格式检测 即我们是否编写C dir file or dir file 正如我所说 我相信我知道如何实施它 问题是 我应该这样做吗 现
  • 从子域中的 ../ 路径

    假设我创建了一个子域 http subdomain mydomain com http subdomain mydomain com 最初是在这个网址 http mydomain com subfolder folder http mydo

随机推荐

  • novatel计算odom--GPS坐标与UTM坐标转换

    保证你的novatel的driver是在ros drivers上的驱动 1 简介 1 1 消息 gps common定义了两个通用消息 xff0c 供GPS驱动程序输出 xff1a gps common GPSFix和gps common
  • 搭建自己的slam系统

    手头有的传感器 一个vlp16线激光雷达 一个120 的fisheye相机 一整套novatel GPS 43 IMU 采集了一个闭环的bag 第一步 数据预处理 将camera的数据单独提取出来 因为没有时间戳 因此无法做到传感器的紧耦合
  • KCF_ROS + TLD_ROS 原理以及源码分析

    扩展链接 xff1a 百度搜素vot2016 xff0c 会有相关的资料 KCF缺点是有边界效应 有一个改进的版本是 xff1a SRDCF 大牛的 CSDN博客 说明 xff1a http blog csdn net app 120620
  • 数据结构+算法=程序

    xff08 1 xff09 数据结构 43 算法 61 程序 每个学计算机的人都听过这个公式 这个公式是尼克劳斯沃斯在1976年出版 算法 43 数据结构 xff1a 程序 一书中提出 尼克劳斯沃斯还是Pascal编程语言的发明人 xff0
  • librealsense源码编译-- Failed to identify Internet connection, disabling BUILD_WITH_TM2

    问题概述 xff1a 由于Realsense t265源码编译需要在CMakeList txt中将BUILD WITH TM2设置为ON xff0c 但是由于国内网络原因 xff0c 无法通过网络连接检测 xff0c 因此我通过查找文件 x
  • 内外网映射环境配置

    一 环境搭建 1 环境说明 此环境由内 外网组成 xff0c 主要实现内外网映射功能 2 环境配置图 本手册中 xff0c 内网使用78 网段 xff0c 外网使用 20 网段 外网交换机IP 地址为 192 168 20 1 3 配置路由
  • 浅析extern “C”的作用

    浅析extern C 的作用 关于extern C 的作用和意思 xff0c 网上资料已经有很多了 xff08 我也参考了几篇 xff09 xff0c 不过我还是觉得有必要自己总结一下 xff0c 毕竟 好记性不如烂笔头 嘛 到C标准函数库
  • 使用prometheus+grafana监控k8s集群

    Prometheus官网地址 xff1a https prometheus io GitHub地址 xff1a https github com prometheus prometheus 一 prometheus的安装 Prometheu
  • ARM 学习笔记(四) 快速上下文切换(FCSE)技术

    接上回说 xff0c 我们已经了解存储器管理的方法 xff0c 现在我们来看一下 xff0c ARM 对不同进程的地址管理 快速上下文切换技术 xff08 Fast Context Switch Extension FCSE xff09 F
  • Linux与Windows串口通信

    串口是常用的计算机与外部串行设备之间的数据传输通道 xff0c 由于串行通信方便易行 xff0c 所以应用广泛 现在国际上不断有串口新技术及新规格推出 xff0c 结合社会各方面需要 xff0c 串口通信发展的空间庞大 串口通讯技术因其自身
  • Git代码下载以及子模块更新git submodule update --init

    Git代码下载 加速代码下载 xff1a git clone https ghproxy com https github com 加入https ghproxy com 后下载速度会快很多 xff0c 还是由于科学上网的问题 子模块下载
  • 解决UnicodeEncodeError: 'gbk' codec can't encode character '\xbb' in position

    在抓取网页上面的一些源代码的时候 xff0c 将uft 8的编码写入文档 xff0c 并输出的时候 xff0c 出现这了这个报错 xff0c 说gbk无法编码 xbb 查找相关资料 xff1a 1 str转bytes叫encode xff0
  • FIFO(First-In First-Out)先进先出页面置换算法详解

    FIFO xff08 First In First Out xff09 先进先出页面置换算法 xff1a FIFO淘汰算法总是淘汰最先装入内存的页面 xff0c 即选择在内存中驻留时间最久的页面进行淘汰 该算法实现只需把一个进程已调入内存的
  • 解决方法:git遇到过的错误

    用git也是走了很多弯路 比如 xff1a 这种错误 1 git commit a fatal Unable to create 39 E git index lock 39 File exists Another git process
  • 路径规划学习入门

    运动规划简介 当虚拟人开始一次漫游时 xff0c 首先全局规划器根据已有的长期信息进行全局静态规划 xff0c 确定虚拟人应该经过的最优化路线 然后全局规划器控制执行系统按照该路径运动 在运动过程中 xff0c 感知系统会持续对周围环境进行
  • 测试开发工程师面试题目

    测试开发工程师面试题目 1 什么是兼容性测试 兼容性测试侧重哪些方面 主要检验的是软件的可移植性 xff0c 检查软件在不同的硬件平台软件平台上是否可以正常的运行 细分会有 xff1a 平台的兼容 xff0c 网络兼容 xff0c 数据库兼
  • 【ROS2】四、使用tf坐标变换实现小海龟跟随

    1 创建功能包 创建工作空间并在工作空间下创建功能包 xff1a span class token function mkdir span p turtle tf ws src span class token builtin class
  • 滑模控制简单理解(hm-1)

    变结构控制 xff08 VSC xff09 是一种特殊的非线性控制器 xff0c 表现为控制的不连续性 xff0c 又称滑模控制 xff08 SMC xff09 一般步骤为滑模面的设计 趋近率的设计 控制器的求解 滑模控制的理解 如图所示
  • BP神经网络的数学本质

    原创文章 xff0c 转载请说明来自 老饼讲解 BP神经网络 xff1a bp bbbdata com 目录 一 隐神经元与tansig函数 二 BP本质 三 BP神经网络的曲线拟合要素 一 误差函数 二 拟合基函数 三 待解参数与求解算法
  • GAZEBO_PLUGIN_PATH 设置方法

    http answers gazebosim org question 13391 how to set gazebo plugin path correctly and add the plugin into gazebo ros Hi