Skip to content

Commit

Permalink
Merge pull request #4 from Fingerling42/dev-3.0.0
Browse files Browse the repository at this point in the history
Update main branch to 3.0.0
  • Loading branch information
Fingerling42 authored Jun 26, 2024
2 parents e3e3064 + ea67777 commit 595687a
Show file tree
Hide file tree
Showing 22 changed files with 459 additions and 216 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2024 Ivan Berman

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ Available features include:
* **Launch function** — launching a device to execute any command with a specified set of parameters passed as a file.
* **Datalog function** — publishing any device data in a form of hash to parachain.
* **Usage of Robonomics subscription** — the ability to send transactions without a fee.
* **Secure file storage** — to pack and unpack data, [InterPlanetary File System](https://ipfs.tech/) is used, which allows to access
files by their unique hash; for convenient usage of IPFS, [Pinata](https://www.pinata.cloud/) support included, which
allows to pin IPFS files for fast downloading.
* **File encryption and decryption** — protection of files with public key encryption.

To pack and unpack data, [InterPlanetary File System](https://ipfs.tech/) is used, which allows to access files
by their unique hash.

To learn more about Robonomics, please refer to the official documentation:
[wiki.robonomics.network](https://wiki.robonomics.network/).

Expand Down Expand Up @@ -169,15 +169,17 @@ Pay attention to the `account_seed` and `crypto_type` fields, as they determine
> **WARNING**: The seed phrase is sensitive information that allows anyone to use your account. Make sure you don't
> upload a config file with it to GitHub or anywhere else.
If you want to use a custom Robonomics node or a local one, change the `remote_node_url` parameter.
If you have a Robonomics subscription that allows you to send transactions without fees, please insert the address
of the subscription owner to the `rws_owner_address` field. Don't forget that your account must be added
to your subscription.

You may also want to change the directory where the files for IPFS will be stored. To do this, change the
parameter `ipfs_dir_path`, otherwise it will use the default directory.
parameter `ipfs_dir_path`, otherwise it will use the default directory. The `ipfs_gateway` parameter allows you
to specify the gateway through which IPFS files will be downloaded.

The fields `crypt_recipient_address` and `crypt_sender_address` are used to specify file encryption and
decryption addresses.
The `pinata_api_key` and `pinata_api_secret_key` parameters are needed to access Pinata API.

<p align="right">(<a href="#readme-top">back to top</a>)</p>

Expand All @@ -191,10 +193,10 @@ decryption addresses.
ipfs daemon
```

2. Create two configuration files for two instances of Turtlesim and Robonomics pubsub.
2. Create two configuration files for two pubsub instances, each for a different Turtlesim.

3. Run the ROS 2 launch files for two turtle with different configuration files and namespaces (this is necessary to
distinguish between identical nodes for different instances). They will launch all necessary nodes: Turtlesim itself,
distinguish between identical nodes). They will launch all necessary nodes: Turtlesim itself,
wrapper implementation for Turtlesim and Robonomics pubsub:

```shell
Expand Down Expand Up @@ -296,10 +298,9 @@ the `/robonomics_ros2_robot_handler/launch` directory. This launch file takes tw
- [x] Add IPFS support
- [x] Add file encryption
- [x] Add support for Robonomics subscription
- [ ] Add support for IPFS pinning service
- [ ] Add checks for IPFS file availability
- [x] Add support for IPFS pinning service (Pinata)
- [x] Add a selection of the IPFS gateway
- [ ] Add digital twin functionality
- [ ] Add a selection of the IPFS connection type
- [ ] Rosbag2 integration?

You can [open issue](https://github.com/Fingerling42/robonomics-ros2/issues) to request a function or ask for bug fix.
Expand Down Expand Up @@ -327,14 +328,14 @@ Distributed under the Apache-2.0 License. See `LICENSE.txt` for more information
<!-- CONTACT -->
## Contact

Ivan Berman — [@berman_ivan](https://twitter.com/berman_ivan) — [email protected]
Ivan Berman — [@berman_ivan](https://twitter.com/berman_ivan) — [email protected]

<p align="right">(<a href="#readme-top">back to top</a>)</p>

<!-- ACKNOWLEDGMENTS -->
## Acknowledgments

* [robonomics-interface docs](https://multi-agent-io.github.io/robonomics-interface/index.html)
* [robonomics-interface docs](https://airalab.github.io/robonomics-interface)
* [Best-README-Template](https://github.com/othneildrew/Best-README-Template/)

<p align="right">(<a href="#readme-top">back to top</a>)</p>
Expand Down
13 changes: 8 additions & 5 deletions config/robonomics_pubsub_params_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ crypto_type: ''
# An address of Robonomics subscription owner, empty if there is no subscription
rws_owner_address: ''

# Full path of your directory, e.g. '/home/user/ipfs_files/', otherwise default path will be used
# Full path of your directory, e.g. '/home/user/ipfs_files/', otherwise default path in ROS package will be used
ipfs_dir_path: ''

# An address that can open an encrypted file, leave empty to not encrypt IPFS files
crypt_recipient_address: ''
# IPFS gateway to download files, e.g. 'https://ipfs.io'
ipfs_gateway: ''

# An address that sends encrypted file that can be decrypted by a robot, leave empty if IPFS file is not encrypt
crypt_sender_address: ''
# API key from Pinata pinning service for IPFS
pinata_api_key: ''

# Secret API key from Pinata pinning service for IPFS
pinata_api_secret_key: ''
Binary file modified docs/imgs/basic_robonomics_handler_class_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ IPFS-Toolkit>=0.5.23
PyYAML>=6.0.1
robonomics-interface>=1.6.2
substrate-interface>=1.7.8
typing_extensions>=4.9.0
typing_extensions>=4.9.0
requests>=2.31.0
urllib3>=1.26.18
scalecodec>=1.2.8
pinatapy-vourhey>=0.2.0
1 change: 1 addition & 0 deletions robonomics_ros2_interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rosidl_generate_interfaces(${PROJECT_NAME}
"srv/RobonomicsROS2SendDatalog.srv"
"srv/RobonomicsROS2ReceiveDatalog.srv"
"srv/RobonomicsROS2SendLaunch.srv"
"srv/RobonomicsROS2GetRWSUsers.srv"
"msg/RobonomicsROS2ReceivedLaunch.msg"
DEPENDENCIES builtin_interfaces
)
Expand Down
2 changes: 1 addition & 1 deletion robonomics_ros2_interfaces/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>robonomics_ros2_interfaces</name>
<version>2.0.0</version>
<version>3.0.0</version>
<description>Description of all message/services types for Robonomics wrapper for ROS 2</description>
<maintainer email="[email protected]">Ivan Berman</maintainer>
<license>Apache-2.0</license>
Expand Down
2 changes: 2 additions & 0 deletions robonomics_ros2_interfaces/srv/RobonomicsROS2GetRWSUsers.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
string[] rws_users_list # List of RWS users
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
string sender_address # Address from which is needed to receive the datalog
string datalog_file_name '' # Name for IPFS file, default will be IPFS hash
bool decrypt_status False # Status if IPFS file should be decrypted, default is False
---
builtin_interfaces/Time timestamp # Timestamp of datalog
string datalog_content # Can be just string or file name, downloaded from IPFS
7 changes: 3 additions & 4 deletions robonomics_ros2_interfaces/srv/RobonomicsROS2SendDatalog.srv
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
string datalog_content # Can be just string or file name, that will be uploaded to IPFS
bool ipfs_file_status True # Status if datalog is needed to sent as IPFS file, default is True
bool encrypt_status False # Status if IPFS file should be encrypted, default is False
string datalog_file_name # File name that need to be uploaded to IPFS
string[] encrypt_recipient_addresses [] # Addresses for file encryption, if empty, encryption will not be performed
---
string datalog_hash # Hash of the datalog transaction
string datalog_hash # Hash of the datalog transaction
7 changes: 4 additions & 3 deletions robonomics_ros2_interfaces/srv/RobonomicsROS2SendLaunch.srv
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
string param_file_name # Name of file that contains parameter
string target_address # Address to be triggered with launch
string param_file_name # Name of file that contains parameter
string target_address # Address to be triggered with launch
bool encrypt_status True # Check whether the parameter file needs to be encrypted with the target address, default is True
---
string launch_hash # Hash of the launch transaction
string launch_hash # Hash of the launch transaction
2 changes: 1 addition & 1 deletion robonomics_ros2_pubsub/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>robonomics_ros2_pubsub</name>
<version>2.0.0</version>
<version>3.0.0</version>
<description>Package for using Robonomics functions from ROS 2</description>
<maintainer email="[email protected]">Ivan Berman</maintainer>
<license>Apache-2.0</license>
Expand Down
Loading

0 comments on commit 595687a

Please sign in to comment.