Skip to content

Commit 1bd9ebb

Browse files
authored
Merge pull request #8 from Fingerling42/humble
Reworks and small fixes for 3.1.0 version
2 parents c28ad11 + fb24264 commit 1bd9ebb

31 files changed

+832
-275
lines changed

README.md

+28-32
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ of the subscription owner to the `rws_owner_address` field. Don't forget that yo
176176
to your subscription.
177177

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

182182
The `pinata_api_key` and `pinata_api_secret_key` parameters are needed to access Pinata API.
@@ -224,43 +224,39 @@ the service (do not forget to insert address):
224224
controlled using `/cmd_vel` topic, so you need to prepare corresponding messages, that will go as a launch parameter.
225225
For convenience, these messages are prepared as JSON-file:
226226
```json
227-
{
228-
"linear":{
229-
"x":[
230-
1.0,
231-
2.0
232-
],
233-
"y":[
234-
0.0,
235-
0.0
236-
],
237-
"z":[
238-
0.0,
239-
0.0
240-
]
241-
},
242-
"angular":{
243-
"x":[
244-
0.0,
245-
0.0
246-
],
247-
"y":[
248-
0.0,
249-
0.0
250-
],
251-
"z":[
252-
1.0,
253-
2.0
254-
]
255-
}
256-
}
227+
[
228+
{
229+
"linear": {
230+
"x": 5.0,
231+
"y": 0.0,
232+
"z": 0.0
233+
},
234+
"angular": {
235+
"x": 0.0,
236+
"y": 0.0,
237+
"z": 1.5
238+
}
239+
},
240+
{
241+
"linear": {
242+
"x": 2.0,
243+
"y": 0.0,
244+
"z": 0.0
245+
},
246+
"angular": {
247+
"x": 0.0,
248+
"y": 0.0,
249+
"z": 2.5
250+
}
251+
}
252+
]
257253
```
258254
This JSON example will command the turtle to move twice.
259255

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

262258
```shell
263-
ros2 service call /turtlesim1/robonomics/send_launch robonomics_ros2_interfaces/srv/RobonomicsROS2SendLaunch {"param_file_name: 'test_name.json', target_address: 'TURTLE2_ADDRESS'"}
259+
ros2 service call /turtlesim1/robonomics/send_launch robonomics_ros2_interfaces/srv/RobonomicsROS2SendLaunch {"param: 'test_name.json', target_address: 'TURTLE2_ADDRESS'"}
264260
```
265261

266262
Watch for the simulation, the turtle should start moving.

config/robonomics_pubsub_params_template.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ crypto_type: ''
1010
# An address of Robonomics subscription owner, empty if there is no subscription
1111
rws_owner_address: ''
1212

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

1616
# IPFS gateway to download files, e.g. 'https://ipfs.io'
Loading

requirements.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ IPFS-Toolkit>=0.5.23
22
PyYAML>=6.0.1
33
robonomics-interface>=1.6.2
44
substrate-interface>=1.7.8
5+
websocket-client>=1.5.2
56
typing_extensions>=4.9.0
67
requests>=2.31.0
78
urllib3>=1.26.18
89
scalecodec>=1.2.8
9-
pinatapy-vourhey>=0.2.0
10+
pinatapy-vourhey>=0.2.0
11+
multiformats>=0.3.1.post4
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
string launch_sender_address # Address of account that sent launch command
2-
string param_file_name # Name of file with launch parameter
2+
string param # String with param or name of file with parameters

robonomics_ros2_interfaces/package.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>robonomics_ros2_interfaces</name>
5-
<version>3.0.0</version>
5+
<version>3.1.0</version>
66
<description>Description of all message/services types for Robonomics wrapper for ROS 2</description>
77
<maintainer email="fingerling42@proton.me">Ivan Berman</maintainer>
88
<license>Apache-2.0</license>
@@ -20,7 +20,7 @@
2020
<!-- Dependency group of which the package is a member -->
2121
<member_of_group>rosidl_interface_packages</member_of_group>
2222

23-
23+
<!-- Dependencies only for test -->
2424
<test_depend>ament_lint_auto</test_depend>
2525
<test_depend>ament_lint_common</test_depend>
2626

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
string datalog_file_name # File name that need to be uploaded to IPFS
2-
string[] encrypt_recipient_addresses [] # Addresses for file encryption, if empty, encryption will not be performed
1+
string datalog_content # Just string or file name that need to be uploaded to IPFS
2+
string[] encrypt_recipient_addresses [] # Addresses for file encryption, if empty, encryption will not be performed
3+
bool is_file True # Is a datalog a file that needs to be uploaded to IPFS?
34
---
4-
string datalog_hash # Hash of the datalog transaction
5+
string datalog_hash # Hash of the datalog transaction
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
string param_file_name # Name of file that contains parameter
1+
string param # Just param string or file name with parameters that need to be uploaded to IPFS
22
string target_address # Address to be triggered with launch
3+
bool is_file True # Is a launch param a file that needs to be uploaded to IPFS (default is True)?
34
bool encrypt_status True # Check whether the parameter file needs to be encrypted with the target address, default is True
45
---
56
string launch_hash # Hash of the launch transaction

robonomics_ros2_pubsub/package.xml

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
44
<name>robonomics_ros2_pubsub</name>
5-
<version>3.0.0</version>
5+
<version>3.1.0</version>
66
<description>Package for using Robonomics functions from ROS 2</description>
77
<maintainer email="fingerling42@proton.me">Ivan Berman</maintainer>
88
<license>Apache-2.0</license>
99

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

12-
<depend>robonomics_ros2_interfaces</depend>
13-
15+
<!-- Dependencies only for test -->
1416
<test_depend>ament_copyright</test_depend>
1517
<test_depend>ament_flake8</test_depend>
1618
<test_depend>ament_pep257</test_depend>

0 commit comments

Comments
 (0)