diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..145d686
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,20 @@
+cmake_minimum_required(VERSION 2.8.3)
+project(pal_navigation_sm)
+
+find_package(catkin REQUIRED)
+
+catkin_python_setup()
+
+catkin_package()
+
+install(
+ PROGRAMS
+ scripts/map_setup.py
+ scripts/pal_navigation_main_sm.py
+ scripts/navigation.sh
+ DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
+
+foreach(dir config launch)
+ install(DIRECTORY ${dir}/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir})
+endforeach()
diff --git a/config/pose.yaml b/config/pose.yaml
new file mode 100644
index 0000000..90387ae
--- /dev/null
+++ b/config/pose.yaml
@@ -0,0 +1,2 @@
+{initial_cov_aa: 0.02, initial_cov_xx: 0.01, initial_cov_yy: 0.01, initial_pose_a: 0.0,
+ initial_pose_x: 0.0, initial_pose_y: 0.0}
diff --git a/launch/map.launch b/launch/map.launch
new file mode 100644
index 0000000..c0a07e8
--- /dev/null
+++ b/launch/map.launch
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/launch/pal_navigation_sm.launch b/launch/pal_navigation_sm.launch
new file mode 100644
index 0000000..8aba77b
--- /dev/null
+++ b/launch/pal_navigation_sm.launch
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/package.xml b/package.xml
new file mode 100644
index 0000000..82ae5af
--- /dev/null
+++ b/package.xml
@@ -0,0 +1,29 @@
+
+
+ pal_navigation_sm
+ 0.1.7
+
+ Dummy public version of PAL Navigation State Machine. It allows saving a map and loading that map for navigation purposes.
+ The complete version allows changing form localization to
+ mapping (and viceversa), provides the pose saver and the map manager
+ service to save and change the current map.
+
+
+ TIAGo support team
+ Jeremie Deray
+ Enrique Fernandez
+ Siegfried-A. Gevatter Pujals
+ Ricardo Tellez
+
+ BSD
+
+ catkin
+
+ rospy
+ rosnode
+ rosparam
+ std_msgs
+ map_server
+ pal_navigation_msgs
+ pal_python
+
diff --git a/scripts/map_setup.py b/scripts/map_setup.py
new file mode 100755
index 0000000..cbf7adb
--- /dev/null
+++ b/scripts/map_setup.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# map_setup.py
+#
+# Copyright (c) 2012-2013 PAL Robotics SL. All Rights Reserved
+#
+# Authors:
+# * Enrique Fernández
+
+import rospy
+import rosparam
+
+from std_msgs.msg import String
+
+import os
+
+class MapSetupException(Exception):
+ pass
+
+class MapSetup:
+
+ def __init__(self):
+ try:
+ self._map = rospy.get_param("~map")
+ except KeyError as e:
+ rospy.logfatal("map param not set!: %s " % e)
+ raise MapSetupException("map param not set")
+
+ # Clean/delete params:
+ try:
+ rospy.delete_param("mmap")
+ except:
+ pass
+
+ # Publish map_in_use (latched):
+ self._map_in_use_pub = rospy.Publisher("map_in_use", String, queue_size=1, latch=True)
+ self._map_in_use_pub.publish("submap_0")
+
+ # Set params:
+ rospy.set_param("map_package_in_use" , "deprecated")
+ rospy.set_param("nice_map_in_use" , os.path.join(self._map, "map.bmp"))
+ rospy.set_param("map_transformation_in_use", os.path.join(self._map, "transformation.xml"))
+
+ # Load
+ paramlist = rosparam.load_file(os.path.join(self._map, "mmap.yaml"), "mmap")
+ for param, ns in paramlist:
+ try:
+ rosparam.upload_params(ns, param)
+ except:
+ pass # ignore empty params
+
+def main():
+ rospy.init_node("map_setup", log_level=rospy.ERROR)
+
+ MapSetup()
+
+ while not rospy.is_shutdown():
+ rospy.spin()
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/navigation.sh b/scripts/navigation.sh
new file mode 100755
index 0000000..75f8268
--- /dev/null
+++ b/scripts/navigation.sh
@@ -0,0 +1,58 @@
+#! /bin/sh
+#
+# Check if the $HOME/.pal folder is available and creates it if needed before
+# launching navigation.
+#
+# Usage: $0 [] [] [] [