Skip to content

Commit

Permalink
Merge pull request #8 from Fingerling42/humble
Browse files Browse the repository at this point in the history
Reworks and small fixes for 3.1.0 version
  • Loading branch information
Fingerling42 authored Sep 6, 2024
2 parents c28ad11 + fb24264 commit 1bd9ebb
Show file tree
Hide file tree
Showing 31 changed files with 832 additions and 275 deletions.
60 changes: 28 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ of the subscription owner to the `rws_owner_address` field. Don't forget that yo
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. The `ipfs_gateway` parameter allows you
parameter `ipfs_dir_path`, otherwise it will use the current directory. The `ipfs_gateway` parameter allows you
to specify the gateway through which IPFS files will be downloaded.

The `pinata_api_key` and `pinata_api_secret_key` parameters are needed to access Pinata API.
Expand Down Expand Up @@ -224,43 +224,39 @@ the service (do not forget to insert address):
controlled using `/cmd_vel` topic, so you need to prepare corresponding messages, that will go as a launch parameter.
For convenience, these messages are prepared as JSON-file:
```json
{
"linear":{
"x":[
1.0,
2.0
],
"y":[
0.0,
0.0
],
"z":[
0.0,
0.0
]
},
"angular":{
"x":[
0.0,
0.0
],
"y":[
0.0,
0.0
],
"z":[
1.0,
2.0
]
}
}
[
{
"linear": {
"x": 5.0,
"y": 0.0,
"z": 0.0
},
"angular": {
"x": 0.0,
"y": 0.0,
"z": 1.5
}
},
{
"linear": {
"x": 2.0,
"y": 0.0,
"z": 0.0
},
"angular": {
"x": 0.0,
"y": 0.0,
"z": 2.5
}
}
]
```
This JSON example will command the turtle to move twice.

7. Save this JSON to IPFS directory of some turtle and run the following:

```shell
ros2 service call /turtlesim1/robonomics/send_launch robonomics_ros2_interfaces/srv/RobonomicsROS2SendLaunch {"param_file_name: 'test_name.json', target_address: 'TURTLE2_ADDRESS'"}
ros2 service call /turtlesim1/robonomics/send_launch robonomics_ros2_interfaces/srv/RobonomicsROS2SendLaunch {"param: 'test_name.json', target_address: 'TURTLE2_ADDRESS'"}
```

Watch for the simulation, the turtle should start moving.
Expand Down
2 changes: 1 addition & 1 deletion config/robonomics_pubsub_params_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ 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 in ROS package will be used
# Full path of your directory, e.g. '/home/user/ipfs_files/', otherwise current path will be used
ipfs_dir_path: ''

# IPFS gateway to download files, e.g. 'https://ipfs.io'
Expand Down
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.
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ IPFS-Toolkit>=0.5.23
PyYAML>=6.0.1
robonomics-interface>=1.6.2
substrate-interface>=1.7.8
websocket-client>=1.5.2
typing_extensions>=4.9.0
requests>=2.31.0
urllib3>=1.26.18
scalecodec>=1.2.8
pinatapy-vourhey>=0.2.0
pinatapy-vourhey>=0.2.0
multiformats>=0.3.1.post4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
string launch_sender_address # Address of account that sent launch command
string param_file_name # Name of file with launch parameter
string param # String with param or name of file with parameters
4 changes: 2 additions & 2 deletions 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>3.0.0</version>
<version>3.1.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 All @@ -20,7 +20,7 @@
<!-- Dependency group of which the package is a member -->
<member_of_group>rosidl_interface_packages</member_of_group>


<!-- Dependencies only for test -->
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

Expand Down
7 changes: 4 additions & 3 deletions robonomics_ros2_interfaces/srv/RobonomicsROS2SendDatalog.srv
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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_content # Just string or file name that need to be uploaded to IPFS
string[] encrypt_recipient_addresses [] # Addresses for file encryption, if empty, encryption will not be performed
bool is_file True # Is a datalog a file that needs to be uploaded to IPFS?
---
string datalog_hash # Hash of the datalog transaction
string datalog_hash # Hash of the datalog transaction
3 changes: 2 additions & 1 deletion robonomics_ros2_interfaces/srv/RobonomicsROS2SendLaunch.srv
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
string param_file_name # Name of file that contains parameter
string param # Just param string or file name with parameters that need to be uploaded to IPFS
string target_address # Address to be triggered with launch
bool is_file True # Is a launch param a file that needs to be uploaded to IPFS (default is True)?
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
8 changes: 5 additions & 3 deletions robonomics_ros2_pubsub/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
<?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>3.0.0</version>
<version>3.1.0</version>
<description>Package for using Robonomics functions from ROS 2</description>
<maintainer email="[email protected]">Ivan Berman</maintainer>
<license>Apache-2.0</license>

<!-- Dependencies that are needed at execution-time (in Python only them are relevant) -->
<exec_depend>rclpy</exec_depend>
<exec_depend>robonomics_ros2_interfaces</exec_depend>
<exec_depend>python3-yaml</exec_depend>

<depend>robonomics_ros2_interfaces</depend>

<!-- Dependencies only for test -->
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
Expand Down
Loading

0 comments on commit 1bd9ebb

Please sign in to comment.