为什么可以正确地从ubuntu中的.desktop文件中正确地laanch lanch lanch lananch?

发布于 2025-02-05 17:29:03 字数 317 浏览 4 评论 0原文

我需要从桌面应用程序启动ROS .Launch文件,但是由于某种原因,这无济于事。有帮助吗?

[Desktop Entry]
Version=1.0
Name=LaunchMagnobit
Comment=Launch tracker and controller
Exec="roslaunch mbx_launch mbx_ros_tracker_camera.launch"
Icon=/home/magnebotix/Pictures/ps3.jpg
Terminal=true
Type=Application
Categories==Application;

I need to launch a ros .launch file from a desktop application, but this is doing nothing for some reason. Any help?

[Desktop Entry]
Version=1.0
Name=LaunchMagnobit
Comment=Launch tracker and controller
Exec="roslaunch mbx_launch mbx_ros_tracker_camera.launch"
Icon=/home/magnebotix/Pictures/ps3.jpg
Terminal=true
Type=Application
Categories==Application;

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

燕归巢 2025-02-12 17:29:03

运行ROS节点时,您始终需要确保您的正确环境被采购;这种情况不会直接在桌面文件中运行。而不是直接运行命令,您需要执行一个自定义的bash脚本,该脚本可以正确源。例如:

source /opt/ros/$ROS_DISTRO/setup.bash
roslaunch mbx_launch mbx_ros_tracker_camera.launch

When running ros nodes you always need to make sure that your correct environments are sourced; this won’t be the case running it directly in a desktop file. Instead of running the command directly you want to Exec a custom bash script that sources your env correctly. For example:

source /opt/ros/$ROS_DISTRO/setup.bash
roslaunch mbx_launch mbx_ros_tracker_camera.launch
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文