Allow to use Nexus 4WD mecanum robot as LTL agent of ltl_automaton_core package.
-
ltl_automaton_core. Core ROS package for LTL.
-
sml_nexus_simulator. Nexus robot simulation package, only needed for running gazebo simulation
-
sml_nexus. Nexus robot package, only needed for running gazebo simulation
-
motion_capture_simulator. Simulate the motion capture system in gazebo, only needed for running gazebo simulation.
-
PyYAML. Should be integrated with ROS but it's better to check if version is up-to-date.
- For Python2 (ROS Kinetic & Melodic):
pip install pyyaml
- For Python3 (ROS Morenia):
pip3 install pyyaml
- For Python2 (ROS Kinetic & Melodic):
To build the package, clone the current repository in your catkin workspace and build it.
cd catkin_ws/src
git clone https://github.com/KTH-SML/ltl_automaton_nexus.git
Build your workspace with either catkin_make or catkin build
cd ...
catkin_make
The package provides the agent-level code needed for interacting with the Nexus robot.
To launch the planner and LTL nexus node, simply run the following command. Please notice that a move_base node needs to be running for the nexus robot to receive the velocity commands.
roslaunch ltl_automaton_nexus ltl_nexus.launch
This will run the planner using the task specification in config/nexus_ltl_formula.yaml
and transition system in config/nexus_ts.yaml
and the obstacle list ["nexus2", "nexus3"]
.
To run the aformentioned program with a simulation of the nexus robot in Gazebo, run the following:
roslaunch ltl_automaton_nexus ltl_nexus_gazebo.launch
The robot transition system needs to be of the following type: [2d_pose_region, nexus_load]
. The robot can carry the following actions:
-
goto_<region>
(from 2d_pose_region): Go to the defined regions. The action needs to be part of the transition system textfile with the following attributesattr: region: r6 # Region name pose: [[1,1.2,0], [0,0,0,1]] # Pose of center of region: # [origin [x,y,0], orientation quaternion [x,y,z,w]]
-
pick_box
(from nexus_load): Perform pick up action. The nexus robot doesn't do anything per se but wait for confirmation of placed box. -
pick_assembly
(from nexus_load): Perform pick up action of full assembly. The nexus robot doesn't do anything per se but wait for confirmation of placed assembly. -
deliver_assembly
(from nexus_load): Perform deliver action. The nexus robot doesn't do anything per se but wait for confirmation that assembly has been taken off.
A very limited "obstacle avoidance" feature is included. In addition of the low-level path planner avoidance, the robot will not move into an occupied region even when given the order to. The goto_<region>
action will not output a goal pose command if the region it is supposed to go to is occupied. Occupation is checked by simply looking at the current_region
topic of all agent included in the obstacle_names
list parameter. All agents in obstacle_names
must use a region_2d_pose_monitor and the same 2d_pose_region
state model in their transition system.
-
nexus_ltl_formula.yaml Example of LTL formula with both hard and soft task.
-
nexus_ts.yaml Example of LTL transition system definition.
-
ltl_nexus.launch: Example of the LTL planner implementation with the nexus as agent. Run the planner node and nexus node with an example TS (Transition System) and example LTL formula.
initial_ts_state_from_agent
If false, get initial TS (Transition System) state from the TS definition text parameter. If true, get initial TS state from agent topic. Default:true
.agent_name
Agent name. Default:nexus
.
-
ltl_nexus_gazebo.launch: Gazebo simulation of the LTL planner implementation with the nexus as agent. Run the planner node and nexus node with an example TS (Transition System) and example LTL formula.
initial_ts_state_from_agent
If false, get initial TS (Transition System) state from the TS definition text parameter. If true, get initial TS state from agent topic. Default:true
.agent_name
Agent name. Default:nexus
.
-
ltl_nexus_hil.launch: Gazebo simulation with HIL (Human-in-The-Loop) and IRL (Inverse Reinforcement Learning) features. Run the planner node and nexus node with an example TS (Transition System) and example LTL formula.
initial_ts_state_from_agent
If false, get initial TS (Transition System) state from the TS definition text parameter. If true, get initial TS state from agent topic. Default:true
.agent_name
Agent name. Default:nexus
.
LTL Nexus node, execute the action sent by the LTL planner and returns the aggregated TS state from the state monitors. The nexus load state monitor is integrated within the nexus node and switching state in automatically done after completed the relevant action.
Action published topics
-
move_base/goal
(move_base_msgs/MoveBaseActionGoal)Send pose command to reach region when executing the action
goto_<region>
.
-
next_move_cmd
(std_msgs/String)Next move from the output word (action sequence) to be carried out by the agent in order to satisfy the plan.
-
current_region
(std_msgs/String)Agent region from the transition system state model
2d_pose_region
. -
placed_box_ack
(std_msgs/Bool)Feedback for the action
pick_box
. The action is considered completed when an acknowledgement message is received on this topic. -
placed_assembly_ack
(std_msgs/Bool)Feedback for the action
pick_assembly
. The action is considered completed when an acknowledgement message is received on this topic. -
delivered_assembly_ack
(std_msgs/Bool)Feedback for the action
deliver_assembly
. The action is considered completed when an acknowledgement message is received on this topic. -
<obstacle_name>/current_region
(std_msgs/String)For each obstacle in the
obstacle_names
list parameter, get the current region and mark it s occupied.
-
ts_state
(ltl_automaton_msgs/TransitionSystemStateStamped)Agent TS state topic. The agent TS state is composed of a list of states from the different state models composing the action model. The Nexus node aggretates the
2d_pose_region
state from a region_2d_pose_monitor with the internal load state. -
station_access_request
(std_msgs/String)Station the nexus agent wants to enter. Left empty when the agent wants to exit a station.
-
agent_name
(string, default: "agent")Agent name.
-
transition_system_textfile
(string)Action model transition system definition.
-
obstacle_names
(string[])List of obstacle to be tracked to check if a region is occupied. All tracked agents must use the region_2d_pose_monitor and the same
2d_pose_region
state model in their transition system.