ROS#资讯汇总(ROS、C#、.NET和Unity3D)

ROS#是C#中的一组软件库和工具,用于.NET应用程序(尤其是Unity)与ROS进行通信。

之前博文涉及windows系统与ROS应用可参考(ROS2有windows版本):链接1链接2


^_^


本文是西门子公司的Martin Bischoff客座博客文章。 感谢Martin的更新,感谢西门子对ROS-Industrial Consortium的支持!

ROS#包括如下内容:

  • RosBridgeClient, a .NET API to ROS using rosbridge_suite on the ROS side.
  • UrdfImporter, a URDF file parser for .NET applications.
  • RosSharp.unitypackage, a Unity Asset package providing Unity-specific extensions to RosBridgeClient and UrdfImporter.

----

ROS#可以实现功能有:

1. Communicate通过Windows应用程序与ROS进行通讯:订阅和发布主题,调用和发布服务,设置和获取参数以及使用rosbridge套件提供的所有功能。



2. Import将机器人的URDF模型作为GameObject导入到Unity3D中。 使用robot_description服务直接从ROS系统导入数据,或通过复制到Unity资源文件夹中的URDF文件导入数据。




3. Control通过Unity3D控制真实机器人




4. Visualize在Unity3D中可视化机器人的实际状态和传感器数据




5. Simulate:使用URDF提供的数据在Unity3D中实现机器人仿真(这里不使用与ROS的连接的方式)。 除了网格和纹理的可视化组件之外,还可以导入了刚体的关节参数、质量、CoMs、惯性和碰撞等规格指标。




6. And much more:更多功能!ROS#可用于各种应用,如机器学习、人机交互、远程监控、虚拟原型、机器人操作、游戏和娱乐等!

其他附加资料(英文):

Got Interested?

Please do not hesitate to try it out yourself and to get in touch with us! We are very interested in your feedback, applications, improvement suggestions, and contributions!

ROS# Development Team (ros-sharp.ct@siemens.com), Siemens AG, Corporate Technology, 2017


----

ROS# is a set of open source software libraries and tools in C# for communicating with ROS from .NET applications, in particularUnity3D.

Find some examples what you can do with ROS# here.

Contents:

RosBridgeClient

... provides a .NET API to ROS via rosbridge_suite.

UrdfImporter

... provides a URDF file parser for .NET applications.

ROS

... contains code for ROS nodes and ROS launch files which are useful to RosBridgeClient and/or UrdfImporter.

Unity3D

... is a Unity3D reference project providing Unity3D-specifc extensions to

Release

... contains RosSharp.unitypackage the latest package of ROS# assets from the Unity3D project.

Tutorials

... contains Unity3D tutorial projects described described in the Wiki.

Licensing:

ROS# is open source under the Apache 2.0 license and is free for commercial use.

External Dependencies:

RosBridgeClient uses the following 3rd party libraries:

UrdfImporter uses the following 3rd party libraries:

.NET Standard 2.0:

Both RosBridgeClient and UrdfImporter are running on .NET Framework 3.5 as this is the .NET platform currently supported by official Unity3D releases.

For Non-Unity3D-Applications blommers kindly provides a .NET Standard 2.0 version of UrdfImporter.

Special Thanks:

Further Info:


© Siemens AG, 2017

Author: Dr. Martin Bischoff (martin.bischoff@siemens.com)


----

User Documentation

1. Installation and Configuration

1.1 Unity3D on Windows

1.2 Ubuntu on Oracle VM

1.3 ROS on Ubuntu

1.4 Robot Setup and Configuration

1.4.1 NextageOpen
1.4.2 TurtleBot2

2. Application examples without ROS connection

2.1 Importing a URDF on Windows

2.2 Simulating a robot model in Unity3D

3. Application examples with ROS connection

3.1 Importing a URDF from ROS

3.2 Animating a robot model in Unity3D via ROS

3.2.1 Animating a robot model using /joint_states
3.2.2. Animating a robot model using /odom

Developer Documentation

General Information


----

  • 8
    点赞
  • 60
    收藏
    觉得还不错? 一键收藏
  • 8
    评论
连接UnityROS可以通过ROS#ROS Sharp)来实现。ROS#是一个C#实现的ROS客户端库,可以在Unity中使用,让UnityROS进行通信。 以下是连接UnityROS的步骤: 1. 安装ROS#Unity Asset Store中搜索ROS#,然后安装它。 2. 创建ROS#工作空间 在终端中运行以下命令来创建ROS#工作空间: ``` mkdir -p catkin_ws/src cd catkin_ws/src git clone https://github.com/siemens/ros-sharp.git cd .. catkin_make ``` 3. 配置Unity项目 在Unity项目中导入ROS#包后,需要设置ROS#的参数。在Unity编辑器中,选择“ROS#”>“Settings”,然后设置ROS#的参数,包括ROS主节点的IP地址和端口号,以及订阅和发布主题的名称和数据类型。 4. 编写ROS#脚本 在Unity项目中,需要编写ROS#脚本来实现与ROS的通信。例如,可以编写一个ROS#脚本来订阅ROS主题,并将数据传递给Unity游戏对象。 下面是一个简单的例子: ```csharp using RosSharp.RosBridgeClient; using UnityEngine; public class MySubscriber : UnitySubscriber<MessageType> { protected override void ReceiveMessage(MessageType message) { Debug.Log(message.data); } } ``` 其中,`MessageType`是ROS主题的数据类型,`ReceiveMessage`方法会在收到消息时被调用。 5. 运行ROS#节点 在终端中运行以下命令来启动ROS#节点: ``` source catkin_ws/devel/setup.bash roslaunch rosbridge_server rosbridge_websocket.launch ``` 6. 运行Unity项目 在Unity编辑器中,按下“Play”按钮来启动Unity项目,并连接到ROS#节点。如果一切正常,Unity项目将能够收到来自ROS主题的消息,并将其传递给Unity游戏对象。 以上就是连接UnityROS的基本步骤。需要注意的是,ROS#目前仍然处于开发阶段,可能存在一些问题和限制。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值