To start the demo, run the following commands in order:
- Run
./env_setup.sh
- Run
roscore
- Run
rosrun cse571_project server.py -sub 1 -b 1
- Run
roslaunch cse571_project maze.launch
- Run
rosrun cse571_project move_tbot3.py
- Run
rosrun cse571_project random_walk.py
Implements action execution and environment updation functions
Implements an interface to communicate with the server and random_walk.py script
Environment generation script
Handles movement of turtlebot
Environment information dictionary generated by server.py
Lists all actions and their rewards, probabilities etc. Format:
{
"<action_name>": {
"function": "<function to execute inside action_server.py>",
"params": [<list of parameters accepted by corresponding function in action_server.py (must be in same order)>],
"success_reward": <reward if action succeeds>,
"fail_reward": <reward if action fails>,
"possibilities": {
"<action_name>": <probability of execution>, #<action_name> corresponds to an action in the config
"<action_name>": <probability of execution>,
.
.
}
},
.
.
Sample Action Config explanation:
{
"pick": {
"function": "execute_pick",
"params": ["book_name"],
"success_reward": 25,
"fail_reward": -25,
"possibilities": {
"pick": 0.85,
"noaction": 0.15
}
},
The action name is defined as pick
. It corresponds to the execute_pick
function implemented in action_server.py
. The function takes 1 variable parameter i.e. book_name
defined in the params
key. The reward for successful execution of this action is 25
and reward for a failed execution is -25
. The given config defines a stochastic environment where executing this action pick
can result in pick
being executed with probability 0.85
or a no-op action (defined as noaction
) with probability 0.15
Note: To convert this to a deterministic action, we can change the probability of a pick
action to 1