如何在 Windows 上安装机器人操作系统 ROSJava? [英] How to install Robot Operating System ROSJava on Windows?

查看:260
本文介绍了如何在 Windows 上安装机器人操作系统 ROSJava?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ROS 的文档很糟糕.

具有讽刺意味的是,创建 ROS 的 Groovy 和 ROSJava 版本是为了允许 Windows 等平台上的开发人员使用出色的机器人 SDK,而所有安装说明仍然面向 linux/ubuntu 用户.

One great irony is that the Groovy and ROSJava versions of ROS was created to allow developers on platforms like Windows to utilize the great robotics SDK, while all the installation instructions are still geared toward linux/ubuntu users.

ROSJava 核心 文档说:

TODO: write a guide for a strictly java installation.

我已尝试按照此处的说明进行操作在 Google Code 项目上,但鉴于所有说明都假设我正在运行 Ubuntu,因此作为传统的 Windows/Web 开发人员,很难自行将其转换为 Windows 说明.

I've tried to follow the instructions here on the Google Code project, but seeing as all the instructions assume I'm running Ubuntu, it is very difficult as a traditional Windows/Web developer to translate into windows instructions on my own.

GIT repo 的链接也断开了,移到了 github:https://github.com/rosjava/rosjava_core.git

The link is also broken to the GIT repo, it is moved to github: https://github.com/rosjava/rosjava_core.git

如果您正在寻找 rosws 文档,请点击此处.另一个断开的链接:http://www.ros.org/doc/independent/api/rosinstall/html/

If you were looking for rosws documentation, its here. Another broken link: http://www.ros.org/doc/independent/api/rosinstall/html/

现在,想要一个多功能的编码 IDE,我选择了 Eclipse,因为它可以处理 Python、Java 和 C++.现在我不知道如何使用 Gradle 和 Maven 构建这个项目——哎呀,我什至不确定我是否应该构建它.

Now, wanting a versatile IDE for coding, I chose Eclipse because it can handle Python, Java and c++. Now I have no idea how to build this project with Gradle and Maven-- Heck, I'm not even sure I should be building it.

是否有适用于 Windows 上的 ROSJava 的明确安装/构建教程?如果没有,我认为如果有人可以创建一个演练来帮助开发人员完成他们的第一个你好世界"在机器人技术中.我之前做过一些处理和一些轻量级的 Java,但没有太严重.该手册应该假设您是 Java、ROS 和所有依赖项/构建助手/编译器的新手.我觉得 Google CodeROSWiki 假设您熟悉许多工具和依赖项,或者了解 ROSJava 与 Groovy 与 Linux 实现的历史背景.许多必要的工具对于 C#.NET、Objective C 或 Javascript/Web 开发人员来说是不受欢迎的.

Is there a definitive installation/build tutorial for ROSJava on Windows? If not, I think it would greatly benefit the community if somebody could create a walk-through that can help developers make their first "Hello World" in robotics. I've done some processing and some light Java before, but nothing too serious. The manual should assume you are new to Java, ROS and all the dependencies/build helpers/compilers. I feel like all the instructions from Google Code and ROSWiki assume you're familiar with many tools and dependencies or are aware of the historical context of ROSJava versus Groovy versus Linux implementations. Many of the necessary tools are off the beaten path for a C#.NET, Objective C or Javascript/Web developer.

另外,一个很大的缺点是ROSWiki 中完全没有预编译版本的 ROS SDK.页面不存在"所以,我们新人还必须安装 10-16 个依赖项用于编译核心(更不用说弄清楚如何配置和使用它们).

Also, a big detriment is that the pre-compiled version of the ROS SDK is outright missing from ROSWiki. "Page Does Not Exist" so, us newcomers have to also install 10-16 dependencies for compiling the core (not to mention figuring out how to configure and use them).

此外,在 Wiki 中命名的构建脚本甚至还不存在.

Additionally, build scripts named in the Wiki don't even exist yet.

目前,我还没有遇到这样的问题:Gradle Eclipse 插件

Currently, I've not even gotten far enough to start encountering problems like this: Gradle Eclipse Plugin

推荐答案

虽然过去几年 ROS 文档总体上有所改进,但 ROS Java 文档目前还不够详细.

While the ROS documentation has improved in general during the past years, the ROS Java documentation is even currently not as detailed.

如果您不使用自定义消息,使用 ROS_JAVA 实际上就像使用任何其他依赖项一样简单.ROS_JAVA 实际上可以分为两部分.

Using ROS_JAVA is in fact as easy as using any other dependency if you do not use custom messages. ROS_JAVA can be practically divided in two parts.

  1. 用于创建您自己的服务器/客户端和发布者/订阅者的 API
  2. 纯 Java roscore

该 API 非常适合访问和使用以任何语言编写的基于 ROS 的服务/主题/操作.在不支持 C++ ROS 的情况下,纯 Java roscore 可用于测试或安装在任何运行 Java 的系统中.然而它不如ROS C++完整.

The API is perfect for accessing and consuming ROS based services/topics/actions written in any language. The pure Java roscore can be used for testing, or installation in any system that runs Java, in cases where the C++ ROS is not supported. However it is not as complete as ROS C++.

如果您使用自定义消息,您可以轻松添加所需的依赖项.以下配置应该可以在 gradle 中工作.

If you do not use custom messages you can easily add the required dependencies. The following configuration should work in gradle.

repositories {
    repositories {
        mavenCentral()
         maven {
            url "https://github.com/rosjava/rosjava_mvn_repo/raw/master"
        }
    }
}
dependencies {
    implementation 'org.ros.rosjava_core:rosjava:[0.3,0.4)'

    implementation 'org.ros.rosjava_bootstrap:message_generation:0.3.3'
    implementation 'org.ros.rosjava_messages:std_msgs:0.5.11'
}

这是一个简单的Hello World"的一部分我在此处发布的纯 Java 项目.仅适用于 Java/ROS Java 你不需要在 windows 中安装 ROSjava.(这也是我写的一篇文章,试图提供有关该问题的一些快速说明.)如果您还需要在没有安装 ROS 的情况下编译消息,那么您也可以通过 java 手动执行此操作.

This is part of a simple "Hello World" pure Java project that I have published here. For programming only in Java /ROS Java you do not need to install ROSjava in windows. (This is also an article I had written trying to provide some quick instructions on the issue.) If you also need to compile messages without a ROS installation then you can also do this manually through java.

最后值得一提的是ROS Noetic可以安装在windows中.虽然这不是使用 ROS java 开发的要求.

Finally it is worth noting that ROS Noetic can be installed in windows. While this is not a requirement for development using ROS java.

这篇关于如何在 Windows 上安装机器人操作系统 ROSJava?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆