From f51d1b4d3edaf9b6188c57937903aa502794d6a2 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 9 Sep 2022 09:11:06 +0200 Subject: [PATCH 1/7] Initial creation of README This is a README which shows and explains the available examples. --- example/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 example/README.md diff --git a/example/README.md b/example/README.md new file mode 100644 index 0000000..ac507d3 --- /dev/null +++ b/example/README.md @@ -0,0 +1,3 @@ +# Heading test + +This is a first test From 6a6b6b4cf05362a0db42c9c9675bb05b22dad624 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 9 Sep 2022 09:32:44 +0200 Subject: [PATCH 2/7] Update README.md --- example/README.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/example/README.md b/example/README.md index ac507d3..0eddf07 100644 --- a/example/README.md +++ b/example/README.md @@ -1,3 +1,27 @@ -# Heading test +# Overview of dartros flutter examples + +## Hardware setup +In order to test the example code inside this folder you need to setup your network communication. There are quite a few situations when this can go wrong. It is not an issue with this dart package but most likely with the used hardware. You can learn from the issues by other users to avoid these situations. For example, in issue #39 + + +## Example code + +### 1.) client.dart +This example demonstrates... +### 2.) dartros_example.dart +This example demonstrates... +### 3.) pub.dart +This example demonstrates how to create a Publisher and publish a string with a custom ROS node from your own app. +### 4.) pub2.dart +This example demonstrates how to create a Publisher which will connect to a ROS Master node on the same device and publishes a string with a custom ROS node. +### 5.) pub_image.dart +This example demonstrates how to create a Publisher and publish an image which is procedurally generated using a generator method of a flutter List object. + +MISSING: explanation of how to get the package used for message creation in the third line (import 'package:sensor_msgs/msgs.dart';) +### 6.) server.dart +This example demonstrates... +### 7.) service_message_example.dart +This example demonstrates... +### 8.) sub.dart +This example demonstrates how to create a Subscriber which will listen to a chat message (string) within an infinite loop. You can use this in combination with Example 3 which publishes these chat message. -This is a first test From 944bcb1a2bf638cd5357a866d5b4eb0738c78e8f Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 9 Sep 2022 09:34:53 +0200 Subject: [PATCH 3/7] Update README.md --- example/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/README.md b/example/README.md index 0eddf07..e6a6875 100644 --- a/example/README.md +++ b/example/README.md @@ -1,7 +1,7 @@ # Overview of dartros flutter examples ## Hardware setup -In order to test the example code inside this folder you need to setup your network communication. There are quite a few situations when this can go wrong. It is not an issue with this dart package but most likely with the used hardware. You can learn from the issues by other users to avoid these situations. For example, in issue #39 +In order to test the example code inside this folder you need to setup your network communication. There are quite a few situations when this can go wrong. It is not an issue with this dart package but most likely with the used hardware. You can learn from the issues by other users to avoid these situations. For example, in issue #39 it was important to set the ROS_HOSTNAME to the loopback ip address (127.0.0.1) instead of using "localhost". And in issue #46 the communication was blocked when a WIFI hotspot was used but did work with a dedicated WIFI router. ## Example code From 1d1431af39461992e1a4ec40ad76afee487c587a Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 13 Sep 2022 21:19:56 +0200 Subject: [PATCH 4/7] Linked issues 39 and 46. --- example/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/README.md b/example/README.md index e6a6875..7b25a50 100644 --- a/example/README.md +++ b/example/README.md @@ -1,7 +1,7 @@ # Overview of dartros flutter examples ## Hardware setup -In order to test the example code inside this folder you need to setup your network communication. There are quite a few situations when this can go wrong. It is not an issue with this dart package but most likely with the used hardware. You can learn from the issues by other users to avoid these situations. For example, in issue #39 it was important to set the ROS_HOSTNAME to the loopback ip address (127.0.0.1) instead of using "localhost". And in issue #46 the communication was blocked when a WIFI hotspot was used but did work with a dedicated WIFI router. +In order to test the example code inside this folder you need to setup your network communication. There are quite a few situations when this can go wrong. It is not an issue with this dart package but most likely with the used hardware. You can learn from the issues by other users to avoid these situations. For example, in issue https://github.com/TimWhiting/dartros/issues/39 it was important to set the ROS_HOSTNAME to the loopback ip address (127.0.0.1) instead of using "localhost". And in issue https://github.com/TimWhiting/dartros/issues/46 the communication was blocked when a WIFI hotspot was used but did work with a dedicated WIFI router. ## Example code From cd17718067a71f461fd93da3a31a40c9f3c1103c Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 13 Sep 2022 21:53:06 +0200 Subject: [PATCH 5/7] Updated hardware setup --- example/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/example/README.md b/example/README.md index 7b25a50..9d8a484 100644 --- a/example/README.md +++ b/example/README.md @@ -1,7 +1,10 @@ # Overview of dartros flutter examples ## Hardware setup -In order to test the example code inside this folder you need to setup your network communication. There are quite a few situations when this can go wrong. It is not an issue with this dart package but most likely with the used hardware. You can learn from the issues by other users to avoid these situations. For example, in issue https://github.com/TimWhiting/dartros/issues/39 it was important to set the ROS_HOSTNAME to the loopback ip address (127.0.0.1) instead of using "localhost". And in issue https://github.com/TimWhiting/dartros/issues/46 the communication was blocked when a WIFI hotspot was used but did work with a dedicated WIFI router. +In order to test the example code inside this folder you need to setup your network communication. There are quite a few situations when this can go wrong. It is not an issue with this dart package but most likely with the used hardware. Here is an illustration of an example setup: + + +In case you face any issues, first try to see if you can learn from the issues by other users and avoid these situations. For example, in issue https://github.com/TimWhiting/dartros/issues/39 it was important to set the `ROS_MASTER_URI` environment variable to the specific ip address of the device where "roscore" is running (e.g. `export ROS_MASTER_URI=http://192.168.2.142:11311/`) instead of using `export ROS_MASTER_URI=http://localhost:11311/`. In general it is recommended to set all three environment variables correctly, namely `ROS_MASTER_URI`, `ROS_HOSTNAME` and `ROS_IP` on all devices that should communicate via ROS (see https://wiki.ros.org/ROS/EnvironmentVariables for more information). And in issue https://github.com/TimWhiting/dartros/issues/46 the communication was blocked when a WIFI hotspot was used but did work with a dedicated WIFI router. ## Example code @@ -17,7 +20,7 @@ This example demonstrates how to create a Publisher which will connect to a ROS ### 5.) pub_image.dart This example demonstrates how to create a Publisher and publish an image which is procedurally generated using a generator method of a flutter List object. -MISSING: explanation of how to get the package used for message creation in the third line (import 'package:sensor_msgs/msgs.dart';) +MISSING: explanation of how to get the package used for message creation in the third line (`import 'package:sensor_msgs/msgs.dart';`) ### 6.) server.dart This example demonstrates... ### 7.) service_message_example.dart From d216372b504db57a05ddc6a20c4c2f9763718663 Mon Sep 17 00:00:00 2001 From: Adam Kalisz Date: Tue, 13 Sep 2022 22:01:31 +0200 Subject: [PATCH 6/7] Added image to illustrate hardware setup --- example/images/HardwareSetup.svg | 51 ++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 example/images/HardwareSetup.svg diff --git a/example/images/HardwareSetup.svg b/example/images/HardwareSetup.svg new file mode 100644 index 0000000..24bb54c --- /dev/null +++ b/example/images/HardwareSetup.svg @@ -0,0 +1,51 @@ + + + + +Flutter App (Android) +Laptop (Linux + ROS) +Dedicated Wifi Router +192.168.0.10 +192.168.0.20 +192.168.0.1 + + + + + + + + + + + + + + + + + + + + + + + + + + From a54692041375bd474e6082915e24842afdf23043 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 13 Sep 2022 22:06:46 +0200 Subject: [PATCH 7/7] Added Hardware setup illustration --- example/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/README.md b/example/README.md index 9d8a484..7981b56 100644 --- a/example/README.md +++ b/example/README.md @@ -2,7 +2,7 @@ ## Hardware setup In order to test the example code inside this folder you need to setup your network communication. There are quite a few situations when this can go wrong. It is not an issue with this dart package but most likely with the used hardware. Here is an illustration of an example setup: - +![An example hardware setup illustrated](images/HardwareSetup.svg "An example hardware setup illustrated") In case you face any issues, first try to see if you can learn from the issues by other users and avoid these situations. For example, in issue https://github.com/TimWhiting/dartros/issues/39 it was important to set the `ROS_MASTER_URI` environment variable to the specific ip address of the device where "roscore" is running (e.g. `export ROS_MASTER_URI=http://192.168.2.142:11311/`) instead of using `export ROS_MASTER_URI=http://localhost:11311/`. In general it is recommended to set all three environment variables correctly, namely `ROS_MASTER_URI`, `ROS_HOSTNAME` and `ROS_IP` on all devices that should communicate via ROS (see https://wiki.ros.org/ROS/EnvironmentVariables for more information). And in issue https://github.com/TimWhiting/dartros/issues/46 the communication was blocked when a WIFI hotspot was used but did work with a dedicated WIFI router.