Skip to content

Commit a3cc127

Browse files
committed
📝 update readme
1 parent f80dd0c commit a3cc127

File tree

1 file changed

+79
-39
lines changed

1 file changed

+79
-39
lines changed

README.md

+79-39
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,70 @@ Docker images containing this repo and needed environment can be found at [docke
1212

1313
armv7 version at branch [armv7](https://github.com/Rezenders/jason-ros/tree/armv7) (out of date)
1414

15+
## Installation
16+
17+
### Install Dependencies
18+
19+
First you need to [install ROS](http://wiki.ros.org/noetic/Installation/Ubuntu), this package was tested the last time with ROS noetic, but it should work with ROS melodic as well.
20+
21+
Then you need to install gradle (tested with gradle 8.1):
22+
23+
```Bash
24+
$ wget https://services.gradle.org/distributions/gradle-8.1-bin.zip -P /tmp
25+
$ unzip -d /opt/gradle /tmp/gradle-*.zip
26+
```
27+
28+
Set environment variables
29+
```Bash
30+
echo `export GRADLE_HOME=/opt/gradle/gradle-8.1` >> ~/.bashrc
31+
echo `export PATH=${GRADLE_HOME}/bin:${PATH}` >> ~/.bashrc
32+
```
33+
34+
Don't forget to reload your terminal.
35+
36+
Install Java 17:
37+
```Bash
38+
$ apt install openjdk-17-jdk
39+
```
40+
41+
Set java environment variable:
42+
```Bash
43+
$ echo `export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64` >> ~/.bashrc
44+
```
45+
46+
### Build jason_ros
47+
Create a ROS workspace:
48+
49+
```Bash
50+
$ mkdir -p ~/jason_ros_ws/src
51+
$ cd ~/jason_ros_ws/src
52+
$ catkin_init_workspace
53+
```
54+
55+
Clone this repo into:
56+
```Bash
57+
$ git clone https://github.com/jason-lang/jason_ros.git
58+
```
59+
60+
Install deps:
61+
```Bash
62+
$ cd ~/jason_ros_ws/
63+
$ rosdep init
64+
$ rosdep update
65+
$ rosdep install --from-paths src --ignore-src -r -y
66+
```
67+
68+
Build workspace:
69+
```Bash
70+
$ cd ~/jason_ros_ws/
71+
$ catkin_make
72+
```
73+
74+
**PS**: Don't forget to source ROS before running ROS commands
75+
```Bash
76+
$ source /opt/ros/noetic/setup.bash
77+
```
78+
1579
## Usage
1680

1781
### mas2j
@@ -40,9 +104,9 @@ repositories {
40104
}
41105
42106
dependencies {
43-
compile group: 'org.jason-lang', name: 'jason' , version: '2.4-SNAPSHOT'
44-
compile group: 'org.jason-lang', name: 'jasonros' , version: '1.4'
45-
compile group: 'org.jason-lang', name: 'jasonros_msgs' , version: '1.4'
107+
implementation group: 'org.jason', name: 'jason' , version: '3.0-SNAPSHOT'
108+
implementation group: 'org.jason-lang', name: 'jasonros' , version: '1.9.2'
109+
implementation group: 'org.jason-lang', name: 'jasonros_msgs' , version: '1.9.2'
46110
}
47111
```
48112

@@ -61,19 +125,13 @@ params_name = data
61125
params_type = str
62126
latch = True
63127
```
64-
method - topic or service
65-
66-
name - name of the topic or service
67-
68-
msg_type - type of the message e.g. String, Bool, Int32
69-
70-
dependencies - python module which contains the message type e.g. std_msgs.msg, mavros_msgs.msg
71-
72-
params_name - name of the parameter being sent
73-
74-
params_type - type of the parameter e.g. bool, str, int. If not inclued the default type is str
75-
76-
latch - if the action should be latched e.g. true, True, yes, 1, False, false. If not included the default is true
128+
* method - topic or service
129+
* name - name of the topic or service
130+
* msg_type - type of the message e.g. String, Bool, Int32
131+
* dependencies - python module which contains the message type e.g. std_msgs.msg, mavros_msgs.msg
132+
* params_name - name of the parameter being sent
133+
* params_type - type of the parameter e.g. bool, str, int. If not inclued the default type is str
134+
* latch - if the action should be latched e.g. true, True, yes, 1, False, false. If not included the default is true
77135

78136
For more examples of actions you can take a look at this [action_manifest](https://github.com/Rezenders/MAS-UAV/blob/master/MiddleNode/actions_manifest)
79137

@@ -86,35 +144,17 @@ dependencies = std_msgs.msg
86144
args = data
87145
buf = add
88146
```
89-
name - name of the topic or service
90-
91-
msg_type - type of the message e.g. String, Bool, Int32
92-
93-
dependencies - python module which contains the message type e.g. std_msgs.msg, mavros_msgs.msg
94-
95-
args - fields that you want to perceive
96-
97-
buf (belief update function) - if the perception should be added or updated in the belief base. If not inclued the default option is update
98-
99-
This perception would be added into the agent belief base as state(data)
147+
* name - name of the topic or service
148+
* msg_type - type of the message e.g. String, Bool, Int32
149+
* dependencies - python module which contains the message type e.g. std_msgs.msg, mavros_msgs.msg
150+
* args - fields that you want to perceive
151+
* buf (belief update function) - if the perception should be added or updated in the belief base. If not included the default option is update. The perception in the example would be added into the agent belief base as state(data)
100152

101153
For more examples of perceptions you can take a look at this [perceptions_manifest](https://github.com/Rezenders/MAS-UAV/blob/master/MiddleNode/perceptions_manifest)
102154

103155
### Running Bare Metal
104156

105-
#### Dependencies
106-
ros - this project was tested with ros melodic but it should work with different versions
107-
108-
java
109-
110-
gradle
111-
112157
#### Running
113-
Clone this repo:
114-
```
115-
$ git clone https://github.com/Rezenders/jason-ros.git
116-
```
117-
118158
Initialize roscore:
119159
```
120160
$ roscore

0 commit comments

Comments
 (0)