diff --git a/.gitmodules b/.gitmodules index aa369ee349..89fbcfd20f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -38,3 +38,6 @@ [submodule "meta-yocto"] path = meta-yocto url = https://git.yoctoproject.org/git/meta-yocto +[submodule "meta-ros"] + path = meta-ros + url = https://github.com/bmwcarit/meta-ros.git diff --git a/doc/industrial-profile.rst b/doc/industrial-profile.rst new file mode 100644 index 0000000000..e59b636c4f --- /dev/null +++ b/doc/industrial-profile.rst @@ -0,0 +1,67 @@ +Industrial Robotics profile +########################### + +Introduction +============ + +The purpose of the industrial profile is to provide a solid base for +developing robotics applications that can be used for labour automation in +manufacturing, logistics and other domains. + +Target audience +=============== + +The profile is for anybody who is interested in developing such applications +on top of Intel hardware. The main use cases are: + +#. Welding/Soldering; +#. Material handling; +#. Dispensing/Coating; +#. Pick and place. + +However combined with the computer vision profile they can be extended to +other applications like drones, self-driving cars, agricultural robots etc. + +Value proposition +================= + +Industrial Robotics profile is made to simplify creation of products using +robotics technologies and is tailored for embedded hardware. Being a part of +Yocto layer it provides full control over build configuration. Unlike +other robotics projects the profile is independent from external binary +package streams. + +Key components +============== + +So far the `ROS Industrial`_ (ROS-I) project has been identified as a starting +point for the base and this profile includes core packages from the project +and their direct dependencies. + +ROS-I is a layer between `ROS`_ (a set of software libraries and tools used +in robot applications) and industrial hardware equipment converting +messages in ROS formats to something understandable by actual hardware. +Although no vendor specific packages are included at the moment. + +Currently the profile includes: + +- core ROS components, +- libraries for handling geometry and kinematics models of robots in + the URDF format, +- components from the `MoveIt!`_ framework responsible for a robot's + joints movement planning, +- core ROS-I components used for interfacing with real robot hardware. + +Due to the embedded nature of IoT Refkit no GUI components have been included +in the profile. Users are expected to run ROS GUI nodes (e.g. Rviz) on +their workstations if there's such a need. + +For detailed usage instructions please refer `ROS Industrial tutorials`_ + +The ``meta-refkit-extra`` layer contains example ROS applications and +detailed instructions on how to run them. + +.. _ROS Industrial: http://rosindustrial.org +.. _ROS: http://ros.org +.. _MoveIt!: http://moveit.ros.org +.. _ROS Industrial tutorials: http://wiki.ros.org/Industrial/Tutorials diff --git a/doc/profiles.rst b/doc/profiles.rst index 5bae69ca29..a5db9fe7b3 100644 --- a/doc/profiles.rst +++ b/doc/profiles.rst @@ -61,3 +61,4 @@ Profile Summary #. refkit-image-common: A configuration with interactive tools but without any special software in it. Recommended target if you are not interested in any given profile. #. refkit-image-computervision: A profile with tools and configuration for computer vision use cases. #. refkit-image-gateway: A profile with tools and configuration for acting as an IoT sensor. +#. refkit-image-industrial: A profile with tools for industrial use cases, i.e. ROS Industrial packages intended to be used in industrial robotics applications. diff --git a/meta-refkit-core/conf/distro/include/refkit-config.inc b/meta-refkit-core/conf/distro/include/refkit-config.inc index 9653ad6256..049739bdc1 100644 --- a/meta-refkit-core/conf/distro/include/refkit-config.inc +++ b/meta-refkit-core/conf/distro/include/refkit-config.inc @@ -47,6 +47,9 @@ REFKIT_DEFAULT_DISTRO_FEATURES += "refkit-firewall" # Reconfigure several upstream recipes for the computer vision profile. REFKIT_DEFAULT_DISTRO_FEATURES += "refkit-computervision" +# Reconfigure several upstream recipes for the industrial profile. +REFKIT_DEFAULT_DISTRO_FEATURES += "refkit-industrial" + # Misc recipe changes for the Refkit distro. May also be useful # for distros not called "refkit" and thus has its own DISTRO_FEATURE and # "refkit-config" override. diff --git a/meta-refkit-core/conf/distro/include/refkit-overrides.inc b/meta-refkit-core/conf/distro/include/refkit-overrides.inc index 7377bac08c..51cfacf732 100644 --- a/meta-refkit-core/conf/distro/include/refkit-overrides.inc +++ b/meta-refkit-core/conf/distro/include/refkit-overrides.inc @@ -8,6 +8,7 @@ DISTROFEATURES2OVERRIDES += " \ refkit-firewall \ refkit-computervision \ refkit-gateway \ + refkit-industrial \ " INHERIT += "distrooverrides" diff --git a/meta-refkit-core/conf/distro/include/refkit_security_flags.inc b/meta-refkit-core/conf/distro/include/refkit_security_flags.inc index 10ad55a0d3..3095c02f98 100644 --- a/meta-refkit-core/conf/distro/include/refkit_security_flags.inc +++ b/meta-refkit-core/conf/distro/include/refkit_security_flags.inc @@ -15,6 +15,11 @@ SECURITY_CFLAGS_pn-tbb = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CFLAGS}" SECURITY_CFLAGS_pn-protobuf = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CFLAGS}" SECURITY_CFLAGS_pn-glog = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CFLAGS}" SECURITY_CFLAGS_pn-clang = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CFLAGS}" +SECURITY_CFLAGS_pn-log4cxx = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CFLAGS}" +SECURITY_CFLAGS_pn-python3-lxml = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CFLAGS}" +SECURITY_CFLAGS_pn-python3-netifaces = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CFLAGS}" +SECURITY_CFLAGS_pn-python3-pyyaml = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CFLAGS}" +SECURITY_CFLAGS_pn-moveit-ros-perception = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CFLAGS}" # openjdk-8 ends up linking with "-shared -pie -fpie" in some cases (see # hotspot/make/linux/makefiles/saproc.make) which then tries (and fails) to @@ -30,3 +35,4 @@ SECURITY_STRINGFORMAT_pn-giflib = "" SECURITY_STRINGFORMAT_pn-gsignond = "" SECURITY_STRINGFORMAT_pn-openjdk-8 = "" SECURITY_STRINGFORMAT_pn-openjre-8 = "" +SECURITY_STRINGFORMAT_pn-qhull = "" diff --git a/meta-refkit-extra/conf/distro/include/refkit-extra-supported-recipes.txt b/meta-refkit-extra/conf/distro/include/refkit-extra-supported-recipes.txt index 342cb07a9f..c8e3746ae8 100644 --- a/meta-refkit-extra/conf/distro/include/refkit-extra-supported-recipes.txt +++ b/meta-refkit-extra/conf/distro/include/refkit-extra-supported-recipes.txt @@ -1,7 +1,15 @@ caffe@refkit-extra +household-objects-database-msgs@ros-layer hdf5@refkit-extra leveldb@openembedded-layer lmdb@refkit-extra +manipulation-msgs@ros-layer +moveit-kinematics@ros-layer +moveit-planners-ompl@ros-layer +moveit-ros-manipulation@ros-layer +moveit-ros-move-group@ros-layer +moveit-simple-controller-manager@ros-layer +ompl@ros-layer openblas@refkit-extra python3-imageio@refkit-extra python3-pillow@refkit-extra @@ -9,4 +17,10 @@ python3-protobuf@refkit-extra python3-pycparser@meta-python python3-pyrealsense@refkit-extra python3-six@core +refkit-ros-tests@refkit-extra +robot-state-publisher@ros-layer snappy@refkit-extra +std-srvs@ros-layer +tf2-kdl@ros-layer +uarmmetal-moveit-config@refkit-extra +uarmmetal-support@refkit-extra diff --git a/meta-refkit-extra/conf/distro/include/refkit_extra_security_flags.inc b/meta-refkit-extra/conf/distro/include/refkit_extra_security_flags.inc index ce57f941f9..7f0fbadd01 100644 --- a/meta-refkit-extra/conf/distro/include/refkit_extra_security_flags.inc +++ b/meta-refkit-extra/conf/distro/include/refkit_extra_security_flags.inc @@ -2,3 +2,4 @@ SECURITY_CFLAGS_pn-python3-pillow = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CF SECURITY_CFLAGS_pn-snappy = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CFLAGS}" SECURITY_CFLAGS_pn-leveldb = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CFLAGS}" SECURITY_CFLAGS_pn-python3-pyrealsense = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CFLAGS}" +SECURITY_CFLAGS_pn-moveit-planners-ompl = "${SECURITY_NO_PIE_CFLAGS} ${SECURITY_PIC_CFLAGS}" diff --git a/meta-refkit-extra/doc/robotics-helloworld.rst b/meta-refkit-extra/doc/robotics-helloworld.rst new file mode 100644 index 0000000000..b17eaf2ba2 --- /dev/null +++ b/meta-refkit-extra/doc/robotics-helloworld.rst @@ -0,0 +1,51 @@ +Introduction +============ + +The core of the ROS project is a XMLRPC-based publisher-subscriber +middleware. This instruction documents how to run a simple ROS +application in IoT Refkit. The application is documented in +the `Writing a Simple Publisher and Subscriber`_ tutorial. + +How to run +========== + +1. Create an image containing the package `refkit-ros-tests`, e.g. by putting + this line in your `local.conf`:: + + IMAGE_INSTALL_append = " refkit-ros-tests" + + and running:: + + $ bitbake refkit-image-common + +2. Start up a QEMU VM with the built image:: + + $ runqemu ovmf refkit-image-common wic slirp serial nographic + +3. Set up ROS environment in the VM:: + + export ROS_ROOT=/opt/ros + export ROS_DISTRO=indigo + export ROS_PACKAGE_PATH=/opt/ros/indigo/share + export PATH=$PATH:/opt/ros/indigo/bin + export LD_LIBRARY_PATH=/opt/ros/indigo/lib + export PYTHONPATH=/opt/ros/indigo/lib/python3.5/site-packages + export ROS_MASTER_URI=http://localhost:11311 + export CMAKE_PREFIX_PATH=/opt/ros/indigo + touch /opt/ros/indigo/.catkin + +4. Launch all the needed ROS nodes with the command:: + + roslaunch refkit_ros_tests helloworld.launch + +If everything is correct then two nodes get launched: + +- a publisher node sending standard string messages "hello world" to a ROS + topic and +- a subscriber node listening to the topic and exiting upon the + message. + +As soon as the subscriber node exits all the other nodes should +exit successfully. + +.. _Writing a Simple Publisher and Subscriber: http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28python%29 diff --git a/meta-refkit-extra/doc/robotics-uarm-metal.rst b/meta-refkit-extra/doc/robotics-uarm-metal.rst new file mode 100644 index 0000000000..d16410bc3d --- /dev/null +++ b/meta-refkit-extra/doc/robotics-uarm-metal.rst @@ -0,0 +1,299 @@ +Introduction +============ + +This is a detailed walkthrough on how to configure MoveIt! framework to +control an uArm Metal mechanical arm. All the needed config files +are provided by this layer. + +Prerequisites +============= + +Your uArm Metal's controller must be programmed to support a small subset +of G-codes sent via its serial. Particularly it needs to understand the codes: + +M203 + Attach all servos. + +M204 + Detach all servos. + +G205 + Set position for all four servos. The code accepts four parameters which + are PWM signal widths for the respective servos in microseconds. + +P200 + Return current servo positions as raw data from the servos' analog pins. + The command should reply with a line like:: + + RET + +As soon as the controller is ready to receive a new G-code it must signal that +by sending `ok` to serial. + +Setting up +========== + +1. Create an image containing the packages `uarmmeta-moveit-config`, + `python3-pyserial` and `python3-asyncio`, e.g. by putting this line + in your `local.conf`:: + + IMAGE_INSTALL_append = " uarmmeta-moveit-config python3-pyserial python3-asyncio" + + and running:: + + $ bitbake refkit-image-common + +2. Install the image onto your device. See the howto "Installing the Images" + in IoT Reference OS Kit documentation for details. + +3. Plug the mechanical arm in the device's USB port. + +4. Run the following script on the device. + +.. code:: python + + #!/usr/bin/env python3 + """ + TCP robot controller implementing streaming Joint Position Streaming Interface + for uARM Metal. + + The controller acts as a server for all connections and manages + the mechanical arm through a serial connection. + + See http://wiki.ros.org/Industrial/Tutorials/create_joint_position_streaming_interface_using_tcp_socket_libraries. + """ + + import asyncio + import struct + import math + + import serial + + # Analog signal for servos' null positions + BASE_ANALOG_NULL = 350 + LEFT_ANALOG_NULL = 145 + RIGHT_ANALOG_NULL = 137 + HAND_ANALOG_NULL = 282 + + # 1 unit of analog signal in radians + BASE_ANALOG_RAD = math.pi/(3.111111111*180) + LEFT_ANALOG_RAD = math.pi/(2.811111111*180) + RIGHT_ANALOG_RAD = math.pi/(2.655555555*180) + + # 1 PWM microsecond in analog signal units + BASE_PWM_ANALOG = 0.281 + LEFT_PWM_ANALOG = 0.280 + RIGHT_PWM_ANALOG = 0.275 + + # Zero positions in PWM microseconds + BASE_ZERO_PWM = 1500 + LEFT_ZERO_PWM = 750 + RIGHT_ZERO_PWM = 700 + HAND_ZERO_PWM = 1500 + + class RobotArm(object): + """Represent the mechanical arm.""" + + def __init__(self, loop): + """Initialize object.""" + + self.is_inited = False + self.transport = None + self.loop = loop + self.serial_lock = asyncio.Lock(loop=loop) + self.move_lock = asyncio.Lock(loop=loop) + self.serial = serial.Serial("/dev/ttyUSB0", 115200, timeout=5) + loop.add_reader(self.serial, self.__serial_reader) + + @asyncio.coroutine + def __initialize(self): + """Initialize robot arm.""" + + self.is_inited = True + yield from self.__send_to_robot(b"M203\n") + yield from self.__send_to_robot(b"G205 1500 1300 1300 1500\n") + + def __serial_reader(self): + line = self.serial.readline() + + if line == b"ok\r\n": + if self.is_inited: + self.serial_lock.release() + else: + self.loop.create_task(self.__initialize()) + elif line.startswith(b"RET") and not self.transport.is_closing(): + (j1, j2, j3, _) = (int(analog_signal) + for analog_signal in line[4:].split()) + base_link_to_base_rot = (j1 - BASE_ANALOG_NULL) * BASE_ANALOG_RAD + base_rot_to_link_1 = (j2 - LEFT_ANALOG_NULL) * LEFT_ANALOG_RAD + link_2_to_link_3 = (j3 - RIGHT_ANALOG_NULL) * RIGHT_ANALOG_RAD + link_1_to_link_2 = -base_rot_to_link_1 - link_2_to_link_3 + link_3_to_link_end = 0 + message = struct.pack(" 0: + self.loop.create_task(self.robot.move_servos(unpacked[0], + unpacked[1], + unpacked[3], + unpacked[4], + unpacked[11])) + + class JointStateStreamProtocol(asyncio.Protocol): + """Implements joint states streaming protocol.""" + + def __init__(self, loop, robot): + self.loop = loop + self.robot = robot + + def connection_made(self, transport): + print("A client connected to Joint State Stream") + self.robot.stream_joint_state(transport) + + def main(): + """Entry point.""" + + loop = asyncio.get_event_loop() + robotarm = RobotArm(loop) + + proto_factory = lambda: JointPositionStreamProtocol(loop, robotarm) + joint_pos_coro = loop.create_server(proto_factory, '0.0.0.0', 11000) + + proto_factory = lambda: JointStateStreamProtocol(loop, robotarm) + joint_state_coro = loop.create_server(proto_factory, '0.0.0.0', 11002) + + joint_pos_server = loop.run_until_complete(joint_pos_coro) + joint_state_server = loop.run_until_complete(joint_state_coro) + + # Serve requests until Ctrl+C is pressed + print('Serving on {}'.format(joint_pos_server.sockets[0].getsockname())) + print('Serving on {}'.format(joint_state_server.sockets[0].getsockname())) + try: + loop.run_forever() + except KeyboardInterrupt: + pass + + # Close the server + joint_pos_server.close() + joint_state_server.close() + loop.run_until_complete(asyncio.gather(joint_pos_server.wait_closed(), + joint_state_server.wait_closed())) + robotarm.deinit() + loop.close() + + if __name__ == "__main__": + main() + +5. Set up ROS environment on the device:: + + export ROS_ROOT=/opt/ros + export ROS_DISTRO=indigo + export ROS_PACKAGE_PATH=/opt/ros/indigo/share + export PATH=$PATH:/opt/ros/indigo/bin + export LD_LIBRARY_PATH=/opt/ros/indigo/lib + export PYTHONPATH=/opt/ros/indigo/lib/python3.5/site-packages + export ROS_MASTER_URI=http://localhost:11311 + export CMAKE_PREFIX_PATH=/opt/ros/indigo + touch /opt/ros/indigo/.catkin + +6. Launch all the needed ROS nodes with the command:: + + roslaunch uarmmetal_support refkit-uarm.launch robot_ip:=127.0.0.1 sim:=false + +Now your mechanical arm can be controlled through MoveIt's Move Group Interface. +It's possible to control the arm interactively with a GUI ROS node installed +on your desktop (i.e. `RViz`_). For that copy the source code of the packages +`uarmmetal-support` and `uarmmetal-moveit-configs` to your `catkin workspace`_ +on the desktop as `uarmmetal_support` and `uarmmetal_moveit_configs` ROS packages +respectively. First initialize ROS environment:: + + source /devel/setup.bash + +Then run:: + + ROS_MASTER_URI=http://:11311 roslaunch uarmmetal_moveit_config moveit_rviz.launch config:=true + +.. _RViz: http://wiki.ros.org/rviz/UserGuide +.. _catkin workspace: http://wiki.ros.org/catkin/workspaces diff --git a/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/CMakeLists.txt b/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/CMakeLists.txt new file mode 100644 index 0000000000..08464ed844 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 2.8.3) +project(refkit_ros_tests) + +find_package(catkin REQUIRED) + +catkin_package() + +install(DIRECTORY launch + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) +install(PROGRAMS scripts/talker.py + scripts/listener.py + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) diff --git a/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/launch/helloworld.launch b/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/launch/helloworld.launch new file mode 100644 index 0000000000..6751a48941 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/launch/helloworld.launch @@ -0,0 +1,5 @@ + + + + + diff --git a/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/package.xml b/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/package.xml new file mode 100644 index 0000000000..b148ce668d --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/package.xml @@ -0,0 +1,18 @@ + + + refkit_ros_tests + 0.1.0 + + Test ROS nodes for Refkit + + Dmitry Rozhkov + Dmitry Rozhkov + + MIT + + http://todo/ + https://todo/issues + https://todo/ + + catkin + diff --git a/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/scripts/listener.py b/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/scripts/listener.py new file mode 100644 index 0000000000..6000ef26b4 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/scripts/listener.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +import rospy +from std_msgs.msg import String + +def callback(data): + rospy.loginfo(rospy.get_caller_id() + "I heard %s", data.data) + rospy.signal_shutdown("Success") + +def listener(): + + rospy.init_node('listener', anonymous=True) + + rospy.Subscriber("chatter", String, callback) + + rospy.spin() + +if __name__ == '__main__': + listener() diff --git a/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/scripts/talker.py b/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/scripts/talker.py new file mode 100644 index 0000000000..e5a54b2ed9 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests/refkit-ros-tests-0.1.0/scripts/talker.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python + +import rospy +from std_msgs.msg import String + +def talker(): + pub = rospy.Publisher('chatter', String, queue_size=10) + rospy.init_node('talker', anonymous=True) + rate = rospy.Rate(1) # 1hz + while not rospy.is_shutdown(): + hello_str = "hello world" + rospy.loginfo(hello_str) + pub.publish(hello_str) + rate.sleep() + +if __name__ == '__main__': + try: + talker() + except rospy.ROSInterruptException: + pass diff --git a/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests_0.1.0.bb b/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests_0.1.0.bb new file mode 100644 index 0000000000..21f1407dcc --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/refkit-ros-tests/refkit-ros-tests_0.1.0.bb @@ -0,0 +1,13 @@ +DESCRIPTION = "Test ROS nodes for Refkit" +SECTION = "devel" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://package.xml;beginline=11;endline=11;md5=58e54c03ca7f821dd3967e2a2cd1596e" + +SRC_URI = "file://${PN}-${PV}/scripts/talker.py \ + file://${PN}-${PV}/scripts/listener.py \ + file://${PN}-${PV}/launch/helloworld.launch \ + file://${PN}-${PV}/CMakeLists.txt \ + file://${PN}-${PV}/package.xml \ + " + +inherit catkin \ No newline at end of file diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/.setup_assistant b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/.setup_assistant new file mode 100644 index 0000000000..520f43dca8 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/.setup_assistant @@ -0,0 +1,10 @@ +moveit_setup_assistant_config: + URDF: + package: uarmmetal_support + relative_path: ../uarmmetal_support/urdf/model.urdf + SRDF: + relative_path: config/uarmmetal.srdf + CONFIG: + author_name: Dmitry Rozhkov + author_email: dmitry.rozhkov@intel.com + generated_timestamp: 1494245745 diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/CMakeLists.txt b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/CMakeLists.txt new file mode 100644 index 0000000000..b4907f9e77 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 2.8.3) +project(uarmmetal_moveit_config) + +find_package(catkin REQUIRED) + +catkin_package() + +install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} + PATTERN "setup_assistant.launch" EXCLUDE) +install(DIRECTORY config DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/controllers.yaml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/controllers.yaml new file mode 100644 index 0000000000..c157e006f6 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/controllers.yaml @@ -0,0 +1,5 @@ +controller_list: + - name: "" + action_ns: joint_trajectory_action + type: FollowJointTrajectory + joints: [base_link_to_base_rot, base_rot_to_link_1, link_1_to_link_2, link_2_to_link_3, link_3_to_link_end] diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/fake_controllers.yaml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/fake_controllers.yaml new file mode 100644 index 0000000000..c8d85b76de --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/fake_controllers.yaml @@ -0,0 +1,8 @@ +controller_list: + - name: fake_manipulator_controller + joints: + - base_link_to_base_rot + - base_rot_to_link_1 + - link_1_to_link_2 + - link_2_to_link_3 + - link_3_to_link_end \ No newline at end of file diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/joint_limits.yaml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/joint_limits.yaml new file mode 100644 index 0000000000..c5036b5f5f --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/joint_limits.yaml @@ -0,0 +1,29 @@ +# joint_limits.yaml allows the dynamics properties specified in the URDF to be overwritten or augmented as needed +# Specific joint properties can be changed with the keys [max_position, min_position, max_velocity, max_acceleration] +# Joint limits can be turned off with [has_velocity_limits, has_acceleration_limits] +joint_limits: + base_link_to_base_rot: + has_velocity_limits: false + max_velocity: 0 + has_acceleration_limits: false + max_acceleration: 0 + base_rot_to_link_1: + has_velocity_limits: false + max_velocity: 0 + has_acceleration_limits: false + max_acceleration: 0 + link_1_to_link_2: + has_velocity_limits: false + max_velocity: 0 + has_acceleration_limits: false + max_acceleration: 0 + link_2_to_link_3: + has_velocity_limits: false + max_velocity: 0 + has_acceleration_limits: false + max_acceleration: 0 + link_3_to_link_end: + has_velocity_limits: false + max_velocity: 0 + has_acceleration_limits: false + max_acceleration: 0 \ No newline at end of file diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/kinematics.yaml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/kinematics.yaml new file mode 100644 index 0000000000..969ba14252 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/kinematics.yaml @@ -0,0 +1,5 @@ +manipulator: + kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin + kinematics_solver_search_resolution: 0.005 + kinematics_solver_timeout: 0.005 + kinematics_solver_attempts: 3 \ No newline at end of file diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/ompl_planning.yaml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/ompl_planning.yaml new file mode 100644 index 0000000000..524c60640d --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/ompl_planning.yaml @@ -0,0 +1,149 @@ +planner_configs: + SBLkConfigDefault: + type: geometric::SBL + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + ESTkConfigDefault: + type: geometric::EST + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0 setup() + goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 + LBKPIECEkConfigDefault: + type: geometric::LBKPIECE + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 + min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 + BKPIECEkConfigDefault: + type: geometric::BKPIECE + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 + failed_expansion_score_factor: 0.5 # When extending motion fails, scale score by factor. default: 0.5 + min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 + KPIECEkConfigDefault: + type: geometric::KPIECE + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 + border_fraction: 0.9 # Fraction of time focused on boarder default: 0.9 (0.0,1.] + failed_expansion_score_factor: 0.5 # When extending motion fails, scale score by factor. default: 0.5 + min_valid_path_fraction: 0.5 # Accept partially valid moves above fraction. default: 0.5 + RRTkConfigDefault: + type: geometric::RRT + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 + RRTConnectkConfigDefault: + type: geometric::RRTConnect + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + RRTstarkConfigDefault: + type: geometric::RRTstar + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 + delay_collision_checking: 1 # Stop collision checking as soon as C-free parent found. default 1 + TRRTkConfigDefault: + type: geometric::TRRT + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05 + max_states_failed: 10 # when to start increasing temp. default: 10 + temp_change_factor: 2.0 # how much to increase or decrease temp. default: 2.0 + min_temperature: 10e-10 # lower limit of temp change. default: 10e-10 + init_temperature: 10e-6 # initial temperature. default: 10e-6 + frountier_threshold: 0.0 # dist new state to nearest neighbor to disqualify as frontier. default: 0.0 set in setup() + frountierNodeRatio: 0.1 # 1/10, or 1 nonfrontier for every 10 frontier. default: 0.1 + k_constant: 0.0 # value used to normalize expresssion. default: 0.0 set in setup() + PRMkConfigDefault: + type: geometric::PRM + max_nearest_neighbors: 10 # use k nearest neighbors. default: 10 + PRMstarkConfigDefault: + type: geometric::PRMstar + FMTkConfigDefault: + type: geometric::FMT + num_samples: 1000 # number of states that the planner should sample. default: 1000 + radius_multiplier: 1.1 # multiplier used for the nearest neighbors search radius. default: 1.1 + nearest_k: 1 # use Knearest strategy. default: 1 + cache_cc: 1 # use collision checking cache. default: 1 + heuristics: 0 # activate cost to go heuristics. default: 0 + extended_fmt: 1 # activate the extended FMT*: adding new samples if planner does not finish successfully. default: 1 + BFMTkConfigDefault: + type: geometric::BFMT + num_samples: 1000 # number of states that the planner should sample. default: 1000 + radius_multiplier: 1.0 # multiplier used for the nearest neighbors search radius. default: 1.0 + nearest_k: 1 # use the Knearest strategy. default: 1 + balanced: 0 # exploration strategy: balanced true expands one tree every iteration. False will select the tree with lowest maximum cost to go. default: 1 + optimality: 1 # termination strategy: optimality true finishes when the best possible path is found. Otherwise, the algorithm will finish when the first feasible path is found. default: 1 + heuristics: 1 # activates cost to go heuristics. default: 1 + cache_cc: 1 # use the collision checking cache. default: 1 + extended_fmt: 1 # Activates the extended FMT*: adding new samples if planner does not finish successfully. default: 1 + PDSTkConfigDefault: + type: geometric::PDST + STRIDEkConfigDefault: + type: geometric::STRIDE + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 + use_projected_distance: 0 # whether nearest neighbors are computed based on distances in a projection of the state rather distances in the state space itself. default: 0 + degree: 16 # desired degree of a node in the Geometric Near-neightbor Access Tree (GNAT). default: 16 + max_degree: 18 # max degree of a node in the GNAT. default: 12 + min_degree: 12 # min degree of a node in the GNAT. default: 12 + max_pts_per_leaf: 6 # max points per leaf in the GNAT. default: 6 + estimated_dimension: 0.0 # estimated dimension of the free space. default: 0.0 + min_valid_path_fraction: 0.2 # Accept partially valid moves above fraction. default: 0.2 + BiTRRTkConfigDefault: + type: geometric::BiTRRT + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + temp_change_factor: 0.1 # how much to increase or decrease temp. default: 0.1 + init_temperature: 100 # initial temperature. default: 100 + frountier_threshold: 0.0 # dist new state to nearest neighbor to disqualify as frontier. default: 0.0 set in setup() + frountier_node_ratio: 0.1 # 1/10, or 1 nonfrontier for every 10 frontier. default: 0.1 + cost_threshold: 1e300 # the cost threshold. Any motion cost that is not better will not be expanded. default: inf + LBTRRTkConfigDefault: + type: geometric::LBTRRT + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 + epsilon: 0.4 # optimality approximation factor. default: 0.4 + BiESTkConfigDefault: + type: geometric::BiEST + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + ProjESTkConfigDefault: + type: geometric::ProjEST + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + goal_bias: 0.05 # When close to goal select goal, with this probability. default: 0.05 + LazyPRMkConfigDefault: + type: geometric::LazyPRM + range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup() + LazyPRMstarkConfigDefault: + type: geometric::LazyPRMstar + SPARSkConfigDefault: + type: geometric::SPARS + stretch_factor: 3.0 # roadmap spanner stretch factor. multiplicative upper bound on path quality. It does not make sense to make this parameter more than 3. default: 3.0 + sparse_delta_fraction: 0.25 # delta fraction for connection distance. This value represents the visibility range of sparse samples. default: 0.25 + dense_delta_fraction: 0.001 # delta fraction for interface detection. default: 0.001 + max_failures: 1000 # maximum consecutive failure limit. default: 1000 + SPARStwokConfigDefault: + type: geometric::SPARStwo + stretch_factor: 3.0 # roadmap spanner stretch factor. multiplicative upper bound on path quality. It does not make sense to make this parameter more than 3. default: 3.0 + sparse_delta_fraction: 0.25 # delta fraction for connection distance. This value represents the visibility range of sparse samples. default: 0.25 + dense_delta_fraction: 0.001 # delta fraction for interface detection. default: 0.001 + max_failures: 5000 # maximum consecutive failure limit. default: 5000 +manipulator: + planner_configs: + - SBLkConfigDefault + - ESTkConfigDefault + - LBKPIECEkConfigDefault + - BKPIECEkConfigDefault + - KPIECEkConfigDefault + - RRTkConfigDefault + - RRTConnectkConfigDefault + - RRTstarkConfigDefault + - TRRTkConfigDefault + - PRMkConfigDefault + - PRMstarkConfigDefault + - FMTkConfigDefault + - BFMTkConfigDefault + - PDSTkConfigDefault + - STRIDEkConfigDefault + - BiTRRTkConfigDefault + - LBTRRTkConfigDefault + - BiESTkConfigDefault + - ProjESTkConfigDefault + - LazyPRMkConfigDefault + - LazyPRMstarkConfigDefault + - SPARSkConfigDefault + - SPARStwokConfigDefault + projection_evaluator: joints(base_link_to_base_rot,base_rot_to_link_1) + longest_valid_segment_fraction: 0.005 \ No newline at end of file diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/uarmmetal.srdf b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/uarmmetal.srdf new file mode 100644 index 0000000000..059b210ff0 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/config/uarmmetal.srdf @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/default_warehouse_db.launch b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/default_warehouse_db.launch new file mode 100644 index 0000000000..245c60d05d --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/default_warehouse_db.launch @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/demo.launch b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/demo.launch new file mode 100644 index 0000000000..11005b3bf6 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/demo.launch @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + [/move_group/fake_controller_joint_states] + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/fake_moveit_controller_manager.launch.xml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/fake_moveit_controller_manager.launch.xml new file mode 100644 index 0000000000..83c4fb1122 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/fake_moveit_controller_manager.launch.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/joystick_control.launch b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/joystick_control.launch new file mode 100644 index 0000000000..f741735275 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/joystick_control.launch @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/move_group.launch b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/move_group.launch new file mode 100644 index 0000000000..8fefabc4bc --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/move_group.launch @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/moveit.rviz b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/moveit.rviz new file mode 100644 index 0000000000..633a6a9ed9 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/moveit.rviz @@ -0,0 +1,689 @@ +Panels: + - Class: rviz/Displays + Help Height: 84 + Name: Displays + Property Tree Widget: + Expanded: + - /MotionPlanning1 + Splitter Ratio: 0.74256 + Tree Height: 664 + - Class: rviz/Help + Name: Help + - Class: rviz/Views + Expanded: + - /Current View1 + Name: Views + Splitter Ratio: 0.5 +Visualization Manager: + Class: "" + Displays: + - Alpha: 0.5 + Cell Size: 1 + Class: rviz/Grid + Color: 160; 160; 164 + Enabled: true + Line Style: + Line Width: 0.03 + Value: Lines + Name: Grid + Normal Cell Count: 0 + Offset: + X: 0 + Y: 0 + Z: 0 + Plane: XY + Plane Cell Count: 10 + Reference Frame: + Value: true + - Class: moveit_rviz_plugin/MotionPlanning + Enabled: true + MoveIt_Goal_Tolerance: 0 + MoveIt_Planning_Time: 30 + MoveIt_Use_Constraint_Aware_IK: true + MoveIt_Warehouse_Host: 127.0.0.1 + MoveIt_Warehouse_Port: 33829 + Name: MotionPlanning + Planned Path: + Links: + base_bellow_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + base_footprint: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + base_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + bl_caster_l_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + bl_caster_r_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + bl_caster_rotation_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + br_caster_l_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + br_caster_r_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + br_caster_rotation_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + double_stereo_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + fl_caster_l_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + fl_caster_r_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + fl_caster_rotation_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + fr_caster_l_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + fr_caster_r_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + fr_caster_rotation_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_mount_kinect_ir_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_mount_kinect_rgb_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_mount_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_mount_prosilica_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_pan_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_plate_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_tilt_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_elbow_flex_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_forearm_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_forearm_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_gripper_l_finger_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_gripper_l_finger_tip_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_gripper_motor_accelerometer_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_gripper_palm_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_gripper_r_finger_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_gripper_r_finger_tip_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_shoulder_lift_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_shoulder_pan_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_upper_arm_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_upper_arm_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_wrist_flex_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_wrist_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + laser_tilt_mount_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_elbow_flex_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_forearm_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_forearm_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_gripper_l_finger_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_gripper_l_finger_tip_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_gripper_motor_accelerometer_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_gripper_palm_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_gripper_r_finger_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_gripper_r_finger_tip_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_shoulder_lift_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_shoulder_pan_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_upper_arm_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_upper_arm_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_wrist_flex_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_wrist_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + sensor_mount_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + torso_lift_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + Loop Animation: true + Robot Alpha: 0.5 + Show Robot Collision: false + Show Robot Visual: true + Show Trail: false + State Display Time: 0.05 s + Trajectory Topic: move_group/display_planned_path + Planning Metrics: + Payload: 1 + Show Joint Torques: false + Show Manipulability: false + Show Manipulability Index: false + Show Weight Limit: false + Planning Request: + Colliding Link Color: 255; 0; 0 + Goal State Alpha: 1 + Goal State Color: 250; 128; 0 + Interactive Marker Size: 0 + Joint Violation Color: 255; 0; 255 + Planning Group: left_arm + Query Goal State: true + Query Start State: false + Show Workspace: false + Start State Alpha: 1 + Start State Color: 0; 255; 0 + Planning Scene Topic: move_group/monitored_planning_scene + Robot Description: robot_description + Scene Geometry: + Scene Alpha: 1 + Scene Color: 50; 230; 50 + Scene Display Time: 0.2 + Show Scene Geometry: true + Voxel Coloring: Z-Axis + Voxel Rendering: Occupied Voxels + Scene Robot: + Attached Body Color: 150; 50; 150 + Links: + base_bellow_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + base_footprint: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + base_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + bl_caster_l_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + bl_caster_r_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + bl_caster_rotation_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + br_caster_l_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + br_caster_r_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + br_caster_rotation_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + double_stereo_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + fl_caster_l_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + fl_caster_r_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + fl_caster_rotation_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + fr_caster_l_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + fr_caster_r_wheel_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + fr_caster_rotation_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_mount_kinect_ir_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_mount_kinect_rgb_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_mount_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_mount_prosilica_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_pan_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_plate_frame: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_tilt_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_elbow_flex_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_forearm_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_forearm_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_gripper_l_finger_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_gripper_l_finger_tip_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_gripper_motor_accelerometer_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_gripper_palm_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_gripper_r_finger_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_gripper_r_finger_tip_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_shoulder_lift_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_shoulder_pan_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_upper_arm_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_upper_arm_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_wrist_flex_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_wrist_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + laser_tilt_mount_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_elbow_flex_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_forearm_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_forearm_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_gripper_l_finger_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_gripper_l_finger_tip_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_gripper_motor_accelerometer_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_gripper_palm_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_gripper_r_finger_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_gripper_r_finger_tip_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_shoulder_lift_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_shoulder_pan_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_upper_arm_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_upper_arm_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_wrist_flex_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_wrist_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + sensor_mount_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + torso_lift_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + Robot Alpha: 0.5 + Show Scene Robot: true + Value: true + Enabled: true + Global Options: + Background Color: 48; 48; 48 + Fixed Frame: /base_link + Name: root + Tools: + - Class: rviz/Interact + Hide Inactive Objects: true + - Class: rviz/MoveCamera + - Class: rviz/Select + Value: true + Views: + Current: + Class: rviz/XYOrbit + Distance: 2.9965 + Focal Point: + X: 0.113567 + Y: 0.10592 + Z: 2.23518e-07 + Name: Current View + Near Clip Distance: 0.01 + Pitch: 0.509797 + Target Frame: /base_link + Value: XYOrbit (rviz) + Yaw: 5.65995 + Saved: ~ +Window Geometry: + Displays: + collapsed: false + Height: 1337 + Help: + collapsed: false + Hide Left Dock: false + Hide Right Dock: false + Motion Planning: + collapsed: false + QMainWindow State: 000000ff00000000fd0000000100000000000002a2000004bcfc0200000005fb000000100044006900730070006c00610079007301000000410000032d000000dd00fffffffb0000000800480065006c00700000000342000000bb0000007600fffffffb0000000a0056006900650077007300000003b0000000b0000000b000fffffffb0000000c00430061006d00650072006100000002ff000001610000000000000000fb0000001e004d006f00740069006f006e00200050006c0061006e006e0069006e00670100000374000001890000017400ffffff0000047a000004bc00000001000000020000000100000002fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 + Views: + collapsed: false + Width: 1828 + X: 459 + Y: -243 diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/moveit_planning_execution.launch b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/moveit_planning_execution.launch new file mode 100644 index 0000000000..476ff74fad --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/moveit_planning_execution.launch @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/moveit_rviz.launch b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/moveit_rviz.launch new file mode 100644 index 0000000000..ece7d1470b --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/moveit_rviz.launch @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/ompl_planning_pipeline.launch.xml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/ompl_planning_pipeline.launch.xml new file mode 100644 index 0000000000..3395e57b8b --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/ompl_planning_pipeline.launch.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/planning_context.launch b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/planning_context.launch new file mode 100644 index 0000000000..0dd4b6a7b7 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/planning_context.launch @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/planning_pipeline.launch.xml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/planning_pipeline.launch.xml new file mode 100644 index 0000000000..3ac5c14e7c --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/planning_pipeline.launch.xml @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/run_benchmark_ompl.launch b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/run_benchmark_ompl.launch new file mode 100644 index 0000000000..c36f173660 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/run_benchmark_ompl.launch @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/sensor_manager.launch.xml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/sensor_manager.launch.xml new file mode 100644 index 0000000000..2e2d83ed20 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/sensor_manager.launch.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/setup_assistant.launch b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/setup_assistant.launch new file mode 100644 index 0000000000..5b7b0ebd86 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/setup_assistant.launch @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/trajectory_execution.launch.xml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/trajectory_execution.launch.xml new file mode 100644 index 0000000000..07732085d0 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/trajectory_execution.launch.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/uarmmetal_moveit_controller_manager.launch.xml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/uarmmetal_moveit_controller_manager.launch.xml new file mode 100644 index 0000000000..63cdd45dce --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/uarmmetal_moveit_controller_manager.launch.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/uarmmetal_moveit_sensor_manager.launch.xml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/uarmmetal_moveit_sensor_manager.launch.xml new file mode 100644 index 0000000000..5d02698d7b --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/uarmmetal_moveit_sensor_manager.launch.xml @@ -0,0 +1,3 @@ + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/warehouse.launch b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/warehouse.launch new file mode 100644 index 0000000000..5400c4cac5 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/warehouse.launch @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/warehouse_settings.launch.xml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/warehouse_settings.launch.xml new file mode 100644 index 0000000000..967e0ff4d7 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/launch/warehouse_settings.launch.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/package.xml b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/package.xml new file mode 100644 index 0000000000..c2c240f0ac --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/files/uarmmetal-moveit-config-0.3.0/package.xml @@ -0,0 +1,32 @@ + + + uarmmetal_moveit_config + 0.3.0 + + An automatically generated package with all the configuration and launch files for using the uarmmetal with the MoveIt! Motion Planning Framework + + Dmitry Rozhkov + Dmitry Rozhkov + + BSD + + http://moveit.ros.org/ + https://github.com/ros-planning/moveit/issues + https://github.com/ros-planning/moveit + + catkin + + moveit_ros_move_group + moveit_kinematics + moveit_planners_ompl + moveit_ros_visualization + joint_state_publisher + robot_state_publisher + xacro + + + uarmmetal_support + uarmmetal_support + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/uarmmetal-moveit-config_0.3.0.bb b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/uarmmetal-moveit-config_0.3.0.bb new file mode 100644 index 0000000000..88a4394ceb --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-moveit-config/uarmmetal-moveit-config_0.3.0.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "An automatically generated package with all the configuration and launch files for using the uarmmetal with the MoveIt!" +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://package.xml;beginline=11;endline=11;md5=d566ef916e9dedc494f5f793a6690ba5" + +SRC_URI = "file://${PN}-${PV}/config/controllers.yaml \ + file://${PN}-${PV}/config/fake_controllers.yaml \ + file://${PN}-${PV}/config/joint_limits.yaml \ + file://${PN}-${PV}/config/kinematics.yaml \ + file://${PN}-${PV}/config/ompl_planning.yaml \ + file://${PN}-${PV}/config/uarmmetal.srdf \ + file://${PN}-${PV}/launch/default_warehouse_db.launch \ + file://${PN}-${PV}/launch/demo.launch \ + file://${PN}-${PV}/launch/fake_moveit_controller_manager.launch.xml \ + file://${PN}-${PV}/launch/joystick_control.launch \ + file://${PN}-${PV}/launch/move_group.launch \ + file://${PN}-${PV}/launch/moveit_planning_execution.launch \ + file://${PN}-${PV}/launch/moveit.rviz \ + file://${PN}-${PV}/launch/moveit_rviz.launch \ + file://${PN}-${PV}/launch/ompl_planning_pipeline.launch.xml \ + file://${PN}-${PV}/launch/planning_context.launch \ + file://${PN}-${PV}/launch/planning_pipeline.launch.xml \ + file://${PN}-${PV}/launch/run_benchmark_ompl.launch \ + file://${PN}-${PV}/launch/sensor_manager.launch.xml \ + file://${PN}-${PV}/launch/setup_assistant.launch \ + file://${PN}-${PV}/launch/trajectory_execution.launch.xml\ + file://${PN}-${PV}/launch/uarmmetal_moveit_controller_manager.launch.xml \ + file://${PN}-${PV}/launch/uarmmetal_moveit_sensor_manager.launch.xml \ + file://${PN}-${PV}/launch/warehouse.launch \ + file://${PN}-${PV}/launch/warehouse_settings.launch.xml \ + file://${PN}-${PV}/CMakeLists.txt \ + file://${PN}-${PV}/package.xml \ + file://${PN}-${PV}/.setup_assistant \ + " + +inherit catkin + +RDEPENDS_${PN} = "uarmmetal-support robot-state-publisher moveit-ros-move-group roslaunch moveit-planners-ompl moveit-simple-controller-manager moveit-ros-manipulation" diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/CMakeLists.txt b/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/CMakeLists.txt new file mode 100644 index 0000000000..147dc82bc6 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 2.8.3) +project(uarmmetal_support) + +find_package(catkin REQUIRED) + +catkin_package() + +install(DIRECTORY config launch urdf DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}) diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/config/joint_names.yaml b/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/config/joint_names.yaml new file mode 100644 index 0000000000..845e6afba6 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/config/joint_names.yaml @@ -0,0 +1 @@ +controller_joint_names: [base_link_to_base_rot, base_rot_to_link_1, link_1_to_link_2, link_2_to_link_3, link_3_to_link_end] diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/launch/refkit-uarm.launch b/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/launch/refkit-uarm.launch new file mode 100644 index 0000000000..1a06f3347f --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/launch/refkit-uarm.launch @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/launch/robot_interface_streaming.launch b/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/launch/robot_interface_streaming.launch new file mode 100644 index 0000000000..6eb7d35469 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/launch/robot_interface_streaming.launch @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/package.xml b/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/package.xml new file mode 100644 index 0000000000..b7df43de10 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/package.xml @@ -0,0 +1,18 @@ + + + uarmmetal_support + 0.3.0 + + ROS-Industrial support for the uArm Metal. + + Dmitry Rozhkov + Dmitry Rozhkov + + BSD + + http://todo/ + https://todo/issues + https://todo/ + + catkin + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/urdf/model.urdf b/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/urdf/model.urdf new file mode 100644 index 0000000000..40fb9c30a8 --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-support/files/uarmmetal-support-0.3.0/urdf/model.urdf @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/meta-refkit-extra/recipes-robotics/uarmmetal-support/uarmmetal-support_0.3.0.bb b/meta-refkit-extra/recipes-robotics/uarmmetal-support/uarmmetal-support_0.3.0.bb new file mode 100644 index 0000000000..b7ac68166f --- /dev/null +++ b/meta-refkit-extra/recipes-robotics/uarmmetal-support/uarmmetal-support_0.3.0.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "ROS-Industrial support for the uArm Metal" +SECTION = "devel" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://package.xml;beginline=11;endline=11;md5=d566ef916e9dedc494f5f793a6690ba5" + +SRC_URI = "file://${PN}-${PV}/config/joint_names.yaml \ + file://${PN}-${PV}/launch/refkit-uarm.launch \ + file://${PN}-${PV}/launch/robot_interface_streaming.launch \ + file://${PN}-${PV}/urdf/model.urdf \ + file://${PN}-${PV}/CMakeLists.txt \ + file://${PN}-${PV}/package.xml \ + " + +inherit catkin + +RDEPENDS_${PN} = "industrial-robot-client" diff --git a/meta-refkit-industrial/COPYING.MIT b/meta-refkit-industrial/COPYING.MIT new file mode 100644 index 0000000000..89de354795 --- /dev/null +++ b/meta-refkit-industrial/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/meta-refkit-industrial/README.rst b/meta-refkit-industrial/README.rst new file mode 100644 index 0000000000..2e22f86337 --- /dev/null +++ b/meta-refkit-industrial/README.rst @@ -0,0 +1,39 @@ +This README file contains information on the contents of the +refkit-industrial layer. + + +Dependencies +============ + +This layer depends on:: + + URI: git://git.openembedded.org/bitbake + branch: master + + URI: git://git.openembedded.org/openembedded-core + layers: meta + branch: master + + URI: https://github.com/intel/intel-iot-refkit + layers: refkit-core + branch: master + + URI: http://git.openembedded.org/meta-openembedded + layers: openembedded-layer, meta-python + branch: master + + URI: https://github.com/bmwcarit/meta-ros.git + layers: ros-layer + branch: master + +Patches +======= + +See the "Submitting Patches" section in the top-level ``README.rst``. + + +Adding the refkit-industrial layer to your build +==================================================== + +See the "Layer Overview and Reuse" section in ``doc/introduction.rst`` +for details. diff --git a/meta-refkit-industrial/conf/layer.conf b/meta-refkit-industrial/conf/layer.conf new file mode 100644 index 0000000000..d89a4bbdd2 --- /dev/null +++ b/meta-refkit-industrial/conf/layer.conf @@ -0,0 +1,12 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "refkit-industrial" +BBFILE_PATTERN_refkit-industrial = "^${LAYERDIR}/" +BBFILE_PRIORITY_refkit-industrial = "6" + +LAYERDEPENDS_refkit-industrial = "refkit-core openembedded-layer meta-python ros-layer" diff --git a/meta-refkit-industrial/recipes-image/images/refkit-image-industrial.bb b/meta-refkit-industrial/recipes-image/images/refkit-image-industrial.bb new file mode 100644 index 0000000000..c5dee62b84 --- /dev/null +++ b/meta-refkit-industrial/recipes-image/images/refkit-image-industrial.bb @@ -0,0 +1,17 @@ +SUMMARY = "IoT Reference OS Kit image for Industrial profile." +DESCRIPTION = "IoT Reference OS Kit image for Industrial profile." + +REFKIT_IMAGE_INDUSTRIAL_EXTRA_FEATURES ?= "${REFKIT_IMAGE_FEATURES_COMMON}" +REFKIT_IMAGE_INDUSTRIAL_EXTRA_INSTALL ?= "${REFKIT_IMAGE_INSTALL_COMMON}" +REFKIT_IMAGE_EXTRA_FEATURES += "${REFKIT_IMAGE_INDUSTRIAL_EXTRA_FEATURES}" +REFKIT_IMAGE_EXTRA_INSTALL += "${REFKIT_IMAGE_INDUSTRIAL_EXTRA_INSTALL}" + +REFKIT_IMAGE_INDUSTRIAL_EXTRA_INSTALL_append = " packagegroup-industrial-robotics" + +# Example for customization in local.conf when building +# refkit-image-industrial.bb: +# IMAGE_BASENAME_pn-refkit-image-industrial = "my-refkit-image-reference" +# REFKIT_IMAGE_INDUSTRIAL_EXTRA_INSTALL_append = "my-own-package" +# REFKIT_IMAGE_INDUSTRIAL_EXTRA_FEATURES_append = "dev-pkgs" + +inherit refkit-image diff --git a/meta-refkit-industrial/recipes-industrial/packagegroups/packagegroup-industrial-robotics.bb b/meta-refkit-industrial/recipes-industrial/packagegroups/packagegroup-industrial-robotics.bb new file mode 100644 index 0000000000..d0d5ba6dea --- /dev/null +++ b/meta-refkit-industrial/recipes-industrial/packagegroups/packagegroup-industrial-robotics.bb @@ -0,0 +1,14 @@ +SUMMARY = "IoT Reference OS Kit Industrial Robotics profile package groups" +LICENSE = "MIT" +PR = "r1" + +inherit packagegroup + +SUMMARY_${PN} = "IoT Reference OS Kit Industrial Robotics profile" +RDEPENDS_${PN} = "\ + roslaunch \ + industrial-trajectory-filters \ + industrial-robot-simulator \ + industrial-robot-client \ + industrial-utils \ + " diff --git a/meta-refkit-industrial/recipes-ros/cmake-modules/cmake-modules/0001-Add-FindTinyXML2-module.patch b/meta-refkit-industrial/recipes-ros/cmake-modules/cmake-modules/0001-Add-FindTinyXML2-module.patch new file mode 100644 index 0000000000..74ec0432ab --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/cmake-modules/cmake-modules/0001-Add-FindTinyXML2-module.patch @@ -0,0 +1,96 @@ +From d0771d1bd974abc8b3f793b63a360c4d21bcc1b7 Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Fri, 3 Jun 2016 14:29:45 +0300 +Subject: [PATCH] Add FindTinyXML2 module + +Upstream-Status: Accepted [available since v0.4.1] + +Signed-off-by: Dmitry Rozhkov +--- + cmake/Modules/FindTinyXML2.cmake | 74 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 74 insertions(+) + create mode 100644 cmake/Modules/FindTinyXML2.cmake + +diff --git a/cmake/Modules/FindTinyXML2.cmake b/cmake/Modules/FindTinyXML2.cmake +new file mode 100644 +index 0000000..87ff2fb +--- /dev/null ++++ b/cmake/Modules/FindTinyXML2.cmake +@@ -0,0 +1,74 @@ ++################################################################################################## ++# ++# CMake script for finding TinyXML2. ++# ++# Input variables: ++# ++# - TinyXML2_ROOT_DIR (optional): When specified, header files and libraries will be searched for in ++# ${TinyXML2_ROOT_DIR}/include ++# ${TinyXML2_ROOT_DIR}/libs ++# respectively, and the default CMake search order will be ignored. When unspecified, the default ++# CMake search order is used. ++# This variable can be specified either as a CMake or environment variable. If both are set, ++# preference is given to the CMake variable. ++# Use this variable for finding packages installed in a nonstandard location, or for enforcing ++# that one of multiple package installations is picked up. ++# ++# ++# Cache variables (not intended to be used in CMakeLists.txt files) ++# ++# - TinyXML2_INCLUDE_DIR: Absolute path to package headers. ++# - TinyXML2_LIBRARY: Absolute path to library. ++# ++# ++# Output variables: ++# ++# - TinyXML2_FOUND: Boolean that indicates if the package was found ++# - TinyXML2_INCLUDE_DIRS: Paths to the necessary header files ++# - TinyXML2_LIBRARIES: Package libraries ++# ++# ++# Example usage: ++# ++# find_package(TinyXML2) ++# if(NOT TinyXML2_FOUND) ++# # Error handling ++# endif() ++# ... ++# include_directories(${TinyXML2_INCLUDE_DIRS} ...) ++# ... ++# target_link_libraries(my_target ${TinyXML2_LIBRARIES}) ++# ++################################################################################################## ++ ++# Get package location hint from environment variable (if any) ++if(NOT TinyXML2_ROOT_DIR AND DEFINED ENV{TinyXML2_ROOT_DIR}) ++ set(TinyXML2_ROOT_DIR "$ENV{TinyXML2_ROOT_DIR}" CACHE PATH ++ "TinyXML2 base directory location (optional, used for nonstandard installation paths)") ++endif() ++ ++# Search path for nonstandard package locations ++if(TinyXML2_ROOT_DIR) ++ set(TinyXML2_INCLUDE_PATH PATHS "${TinyXML2_ROOT_DIR}/include" NO_DEFAULT_PATH) ++ set(TinyXML2_LIBRARY_PATH PATHS "${TinyXML2_ROOT_DIR}/lib" NO_DEFAULT_PATH) ++endif() ++ ++# Find headers and libraries ++find_path(TinyXML2_INCLUDE_DIR NAMES tinyxml2.h PATH_SUFFIXES "tinyxml2" ${TinyXML2_INCLUDE_PATH}) ++find_library(TinyXML2_LIBRARY NAMES tinyxml2 PATH_SUFFIXES "tinyxml2" ${TinyXML2_LIBRARY_PATH}) ++ ++mark_as_advanced(TinyXML2_INCLUDE_DIR ++ TinyXML2_LIBRARY) ++ ++# Output variables generation ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(TinyXML2 DEFAULT_MSG TinyXML2_LIBRARY ++ TinyXML2_INCLUDE_DIR) ++ ++set(TinyXML2_FOUND ${TINYXML2_FOUND}) # Enforce case-correctness: Set appropriately cased variable... ++unset(TINYXML2_FOUND) # ...and unset uppercase variable generated by find_package_handle_standard_args ++ ++if(TinyXML2_FOUND) ++ set(TinyXML2_INCLUDE_DIRS ${TinyXML2_INCLUDE_DIR}) ++ set(TinyXML2_LIBRARIES ${TinyXML2_LIBRARY}) ++endif() +-- +2.7.4 + diff --git a/meta-refkit-industrial/recipes-ros/cmake-modules/cmake-modules_%.bbappend b/meta-refkit-industrial/recipes-ros/cmake-modules/cmake-modules_%.bbappend new file mode 100644 index 0000000000..b292afa1ab --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/cmake-modules/cmake-modules_%.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_refkit-industrial = "\ + file://0001-Add-FindTinyXML2-module.patch \ +" + diff --git a/meta-refkit-industrial/recipes-ros/cv-bridge/cv-bridge_%.bbappend b/meta-refkit-industrial/recipes-ros/cv-bridge/cv-bridge_%.bbappend new file mode 100644 index 0000000000..389e41a53a --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/cv-bridge/cv-bridge_%.bbappend @@ -0,0 +1,3 @@ +# TODO: This way cv_bridge doesn't require libboost_python, but this tweak +# should be dropped after ROS drops compatibility with python2. +EXTRA_OECMAKE_append_refkit-industrial = " -DANDROID=ON" diff --git a/meta-refkit-industrial/recipes-ros/kdl-parser/kdl-parser/0001-Switch-from-TinyXML-to-TinyXML2.patch b/meta-refkit-industrial/recipes-ros/kdl-parser/kdl-parser/0001-Switch-from-TinyXML-to-TinyXML2.patch new file mode 100644 index 0000000000..0d5bed912a --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/kdl-parser/kdl-parser/0001-Switch-from-TinyXML-to-TinyXML2.patch @@ -0,0 +1,119 @@ +From 25484577d6a7ad0266fe50415d3b123ef19783e8 Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Tue, 14 Mar 2017 15:57:18 +0200 +Subject: [PATCH] Switch from TinyXML to TinyXML2 + +The library TinyXML is considered to be unmaintained and +since all future development is focused on TinyXML2 this +patch updates kdl_parser to use TinyXML2. + +Upstream-Status: Submitted [https://github.com/ros/kdl_parser/pull/2] + +Signed-off-by: Dmitry Rozhkov +--- + CMakeLists.txt | 8 ++++---- + include/kdl_parser/kdl_parser.hpp | 8 ++++---- + src/kdl_parser.cpp | 9 +++++---- + 3 files changed, 13 insertions(+), 12 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5c96e55..1acad20 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,9 +10,9 @@ find_package(catkin REQUIRED + ) + find_package(orocos_kdl REQUIRED) + find_package(Eigen3 REQUIRED) +-find_package(TinyXML REQUIRED) ++find_package(TinyXML2 REQUIRED) + +-include_directories(include ${EIGEN3_INCLUDE_DIR} ${orocos_kdl_INCLUDE_DIRS} ${TinyXML_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}) ++include_directories(include ${EIGEN3_INCLUDE_DIR} ${orocos_kdl_INCLUDE_DIRS} ${TinyXML2_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}) + + link_directories(${catkin_LIBRARY_DIRS}) + link_directories(${orocos_kdl_LIBRARY_DIRS}) +@@ -24,12 +24,12 @@ catkin_package( + LIBRARIES ${PROJECT_NAME} ${KDL_LIBRARY} + INCLUDE_DIRS include + CATKIN_DEPENDS roscpp rosconsole urdf +- DEPENDS orocos_kdl TinyXML ++ DEPENDS orocos_kdl TinyXML2 + ) + + add_library(${PROJECT_NAME} src/kdl_parser.cpp) + target_link_libraries(${PROJECT_NAME} +- ${TinyXML_LIBRARIES} ${orocos_kdl_LIBRARIES} ${catkin_LIBRARIES} ++ ${TinyXML2_LIBRARIES} ${orocos_kdl_LIBRARIES} ${catkin_LIBRARIES} + ) + + add_executable(check_kdl_parser src/check_kdl_parser.cpp ) +diff --git a/include/kdl_parser/kdl_parser.hpp b/include/kdl_parser/kdl_parser.hpp +index 68a6456..3dd89d3 100644 +--- a/include/kdl_parser/kdl_parser.hpp ++++ b/include/kdl_parser/kdl_parser.hpp +@@ -40,7 +40,7 @@ + #include + #include + #include +-#include ++#include + + namespace kdl_parser{ + +@@ -65,12 +65,12 @@ bool treeFromParam(const std::string& param, KDL::Tree& tree); + */ + bool treeFromString(const std::string& xml, KDL::Tree& tree); + +-/** Constructs a KDL tree from a TiXmlDocument +- * \param xml_doc The TiXmlDocument containting the xml description of the robot ++/** Constructs a KDL tree from a XMLDocument ++ * \param xml_doc The XMLDocument containting the xml description of the robot + * \param tree The resulting KDL Tree + * returns true on success, false on failure + */ +-bool treeFromXml(TiXmlDocument *xml_doc, KDL::Tree& tree); ++bool treeFromXml(tinyxml2::XMLDocument *xml_doc, KDL::Tree& tree); + + /** Constructs a KDL tree from a URDF robot model + * \param robot_model The URDF robot model +diff --git a/src/kdl_parser.cpp b/src/kdl_parser.cpp +index 7031247..07c02e5 100644 +--- a/src/kdl_parser.cpp ++++ b/src/kdl_parser.cpp +@@ -41,6 +41,7 @@ + + using namespace std; + using namespace KDL; ++using namespace tinyxml2; + + namespace kdl_parser{ + +@@ -154,8 +155,8 @@ bool addChildrenToTree(boost::shared_ptr root, Tree& tree) + + bool treeFromFile(const string& file, Tree& tree) + { +- TiXmlDocument urdf_xml; +- urdf_xml.LoadFile(file); ++ XMLDocument urdf_xml; ++ urdf_xml.LoadFile(file.c_str()); + return treeFromXml(&urdf_xml, tree); + } + +@@ -171,12 +172,12 @@ bool treeFromParam(const string& param, Tree& tree) + + bool treeFromString(const string& xml, Tree& tree) + { +- TiXmlDocument urdf_xml; ++ XMLDocument urdf_xml; + urdf_xml.Parse(xml.c_str()); + return treeFromXml(&urdf_xml, tree); + } + +-bool treeFromXml(TiXmlDocument *xml_doc, Tree& tree) ++bool treeFromXml(XMLDocument *xml_doc, Tree& tree) + { + urdf::Model robot_model; + if (!robot_model.initXml(xml_doc)){ +-- +2.7.4 + diff --git a/meta-refkit-industrial/recipes-ros/kdl-parser/kdl-parser_1.11.14.bbappend b/meta-refkit-industrial/recipes-ros/kdl-parser/kdl-parser_1.11.14.bbappend new file mode 100644 index 0000000000..e597aca5de --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/kdl-parser/kdl-parser_1.11.14.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_refkit-industrial = "\ + file://0001-Switch-from-TinyXML-to-TinyXML2.patch \ + " +DEPENDS_remove_refkit-industrial = "libtinyxml" +DEPENDS_append_refkit-industrial = " libtinyxml2" diff --git a/meta-refkit-industrial/recipes-ros/moveit/moveit-ros-planning/0002-moveit_ros-planning-Use-TinyXML2-instead-of-TinyXML.patch b/meta-refkit-industrial/recipes-ros/moveit/moveit-ros-planning/0002-moveit_ros-planning-Use-TinyXML2-instead-of-TinyXML.patch new file mode 100644 index 0000000000..15b1c6e80c --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/moveit/moveit-ros-planning/0002-moveit_ros-planning-Use-TinyXML2-instead-of-TinyXML.patch @@ -0,0 +1,87 @@ +From 2795d7515acfbd23723429ee5b611de88404d324 Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Wed, 25 Jan 2017 11:06:58 +0200 +Subject: [PATCH 2/2] moveit_ros/planning: Use TinyXML2 instead of TinyXML + +The library TinyXML is considered to be unmaintained and +since all future development is focused on TinyXML2 this +patch updates moveit_ros_planning to use TinyXML2. + +Upstream-Status: Submitted [https://github.com/ros-planning/moveit/pull/527] + +Signed-off-by: Dmitry Rozhkov +--- + rdf_loader/include/moveit/rdf_loader/rdf_loader.h | 4 ++-- + rdf_loader/src/rdf_loader.cpp | 4 +++- + .../include/moveit/robot_model_loader/robot_model_loader.h | 4 ++-- + 3 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/rdf_loader/include/moveit/rdf_loader/rdf_loader.h b/rdf_loader/include/moveit/rdf_loader/rdf_loader.h +index a313e1b..0999963 100644 +--- a/rdf_loader/include/moveit/rdf_loader/rdf_loader.h ++++ b/rdf_loader/include/moveit/rdf_loader/rdf_loader.h +@@ -41,7 +41,7 @@ + #include + #include + #include +-#include ++#include + + namespace rdf_loader + { +@@ -62,7 +62,7 @@ public: + RDFLoader(const std::string& urdf_string, const std::string& srdf_string); + + /** \brief Initialize the robot model from a parsed XML representation of the URDF and SRDF */ +- RDFLoader(TiXmlDocument* urdf_doc, TiXmlDocument* srdf_doc); ++ RDFLoader(tinyxml2::XMLDocument* urdf_doc, tinyxml2::XMLDocument* srdf_doc); + + /** @brief Get the resolved parameter name for the robot description */ + const std::string& getRobotDescription() const +diff --git a/rdf_loader/src/rdf_loader.cpp b/rdf_loader/src/rdf_loader.cpp +index a814124..0185714 100644 +--- a/rdf_loader/src/rdf_loader.cpp ++++ b/rdf_loader/src/rdf_loader.cpp +@@ -38,6 +38,8 @@ + #include + #include + ++using namespace tinyxml2; ++ + rdf_loader::RDFLoader::RDFLoader(const std::string& robot_description) + { + moveit::tools::Profiler::ScopedStart prof_start; +@@ -104,7 +106,7 @@ rdf_loader::RDFLoader::RDFLoader(const std::string& urdf_string, const std::stri + } + } + +-rdf_loader::RDFLoader::RDFLoader(TiXmlDocument* urdf_doc, TiXmlDocument* srdf_doc) ++rdf_loader::RDFLoader::RDFLoader(XMLDocument* urdf_doc, XMLDocument* srdf_doc) + { + moveit::tools::Profiler::ScopedStart prof_start; + moveit::tools::Profiler::ScopedBlock prof_block("RDFLoader(XML)"); +diff --git a/robot_model_loader/include/moveit/robot_model_loader/robot_model_loader.h b/robot_model_loader/include/moveit/robot_model_loader/robot_model_loader.h +index 988ea73..7c88c0a 100644 +--- a/robot_model_loader/include/moveit/robot_model_loader/robot_model_loader.h ++++ b/robot_model_loader/include/moveit/robot_model_loader/robot_model_loader.h +@@ -67,7 +67,7 @@ public: + { + } + +- Options(TiXmlDocument* urdf_doc, TiXmlDocument* srdf_doc) ++ Options(tinyxml2::XMLDocument* urdf_doc, tinyxml2::XMLDocument* srdf_doc) + : urdf_doc_(urdf_doc), srdf_doc_(srdf_doc), load_kinematics_solvers_(true) + { + } +@@ -82,7 +82,7 @@ public: + std::string urdf_string_, srdf_string_; + + /** @brief The parsed XML content of the URDF and SRDF documents. */ +- TiXmlDocument *urdf_doc_, *srdf_doc_; ++ tinyxml2::XMLDocument *urdf_doc_, *srdf_doc_; + + /** @brief Flag indicating whether the kinematics solvers should be loaded as well, using specified ROS parameters + */ +-- +2.7.4 + diff --git a/meta-refkit-industrial/recipes-ros/moveit/moveit-ros-planning_0.7.9.bbappend b/meta-refkit-industrial/recipes-ros/moveit/moveit-ros-planning_0.7.9.bbappend new file mode 100644 index 0000000000..409405f1ca --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/moveit/moveit-ros-planning_0.7.9.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_refkit-industrial = "\ + file://0002-moveit_ros-planning-Use-TinyXML2-instead-of-TinyXML.patch \ + " +DEPENDS_remove_refkit-industrial = "libtinyxml" +DEPENDS_append_refkit-industrial = " libtinyxml2" diff --git a/meta-refkit-industrial/recipes-ros/pluginlib/pluginlib/0001-Switch-from-TinyXML-to-TinyXML2.patch b/meta-refkit-industrial/recipes-ros/pluginlib/pluginlib/0001-Switch-from-TinyXML-to-TinyXML2.patch new file mode 100644 index 0000000000..139061b2f7 --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/pluginlib/pluginlib/0001-Switch-from-TinyXML-to-TinyXML2.patch @@ -0,0 +1,183 @@ +From 9181abfd3313a11e5b43151f233315d7d291cc21 Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Mon, 23 Jan 2017 11:43:07 +0200 +Subject: [PATCH] Switch from TinyXML to TinyXML2 + +The library TinyXML is considered to be unmaintained and +since all future development is focused on TinyXML2 this +patch updates pluginlib to use TinyXML2. + +Upstream-Status: Submitted [https://github.com/ros/pluginlib/pull/52] + +Signed-off-by: Dmitry Rozhkov + +--- + CMakeLists.txt | 12 ++++++------ + include/pluginlib/class_loader.h | 2 +- + include/pluginlib/class_loader_imp.h | 26 +++++++++++++------------- + package.xml | 4 ++-- + 4 files changed, 22 insertions(+), 22 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index de973b1..bd0c219 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,20 +3,20 @@ project(pluginlib) + + find_package(catkin REQUIRED COMPONENTS class_loader rosconsole roslib cmake_modules) + find_package(Boost REQUIRED COMPONENTS filesystem system) +-find_package(TinyXML REQUIRED) ++find_package(TinyXML2 REQUIRED) + + catkin_python_setup() + + catkin_package( + INCLUDE_DIRS include + CATKIN_DEPENDS class_loader rosconsole roslib +- DEPENDS Boost TinyXML ++ DEPENDS Boost TinyXML2 + ) + +-include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${TinyXML_INCLUDE_DIRS}) ++include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${TinyXML2_INCLUDE_DIRS}) + + add_executable(plugin_tool src/plugin_tool.cpp) +-target_link_libraries(plugin_tool ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${TinyXML_LIBRARIES}) ++target_link_libraries(plugin_tool ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${TinyXML2_LIBRARIES}) + + install(TARGETS plugin_tool + RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +@@ -37,7 +37,7 @@ if(CATKIN_ENABLE_TESTING) + + catkin_add_gtest(${PROJECT_NAME}_utest test/utest.cpp) + if(TARGET ${PROJECT_NAME}_utest) +- target_link_libraries(${PROJECT_NAME}_utest ${TinyXML_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) ++ target_link_libraries(${PROJECT_NAME}_utest ${TinyXML2_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) + add_dependencies(${PROJECT_NAME}_utest test_plugins) + endif() + +@@ -46,7 +46,7 @@ if(CATKIN_ENABLE_TESTING) + if(COMPILER_SUPPORTS_CXX11) + catkin_add_gtest(${PROJECT_NAME}_unique_ptr_test test/unique_ptr_test.cpp) + if(TARGET ${PROJECT_NAME}_unique_ptr_test) +- target_link_libraries(${PROJECT_NAME}_unique_ptr_test ${TinyXML_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) ++ target_link_libraries(${PROJECT_NAME}_unique_ptr_test ${TinyXML2_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) + set_target_properties(${PROJECT_NAME}_unique_ptr_test PROPERTIES COMPILE_FLAGS -std=c++11 LINK_FLAGS -std=c++11) + add_dependencies(${PROJECT_NAME}_unique_ptr_test test_plugins) + endif() +diff --git a/include/pluginlib/class_loader.h b/include/pluginlib/class_loader.h +index 0752290..6438346 100644 +--- a/include/pluginlib/class_loader.h ++++ b/include/pluginlib/class_loader.h +@@ -37,7 +37,7 @@ + #include "pluginlib/pluginlib_exceptions.h" + #include "ros/console.h" + #include "ros/package.h" +-#include "tinyxml.h" ++#include "tinyxml2.h" + + //Note: pluginlib has traditionally utilized a "lookup name" for classes that does not match its real C++ name. This was + //done due to limitations of how pluginlib was implemented. As of version 1.9, a lookup name is no longer necessary and +diff --git a/include/pluginlib/class_loader_imp.h b/include/pluginlib/class_loader_imp.h +index 894fdbc..7e0addb 100644 +--- a/include/pluginlib/class_loader_imp.h ++++ b/include/pluginlib/class_loader_imp.h +@@ -240,9 +240,9 @@ namespace pluginlib + std::string ClassLoader::extractPackageNameFromPackageXML(const std::string& package_xml_path) + /***************************************************************************/ + { +- TiXmlDocument document; +- document.LoadFile(package_xml_path); +- TiXmlElement* doc_root_node = document.FirstChildElement("package"); ++ tinyxml2::XMLDocument document; ++ document.LoadFile(package_xml_path.c_str()); ++ tinyxml2::XMLElement* doc_root_node = document.FirstChildElement("package"); + if (doc_root_node == NULL) + { + ROS_ERROR_NAMED("pluginlib.ClassLoader","Could not find a root element for package manifest at %s.", package_xml_path.c_str()); +@@ -251,7 +251,7 @@ namespace pluginlib + + assert(doc_root_node == document.RootElement()); + +- TiXmlElement* package_name_node = doc_root_node->FirstChildElement("name"); ++ tinyxml2::XMLElement* package_name_node = doc_root_node->FirstChildElement("name"); + if(package_name_node == NULL) + { + ROS_ERROR_NAMED("pluginlib.ClassLoader","package.xml at %s does not have a tag! Cannot determine package which exports plugin.", package_xml_path.c_str()); +@@ -590,28 +590,28 @@ namespace pluginlib + /***************************************************************************/ + { + ROS_DEBUG_NAMED("pluginlib.ClassLoader","Processing xml file %s...", xml_file.c_str()); +- TiXmlDocument document; +- document.LoadFile(xml_file); +- TiXmlElement * config = document.RootElement(); ++ tinyxml2::XMLDocument document; ++ document.LoadFile(xml_file.c_str()); ++ tinyxml2::XMLElement * config = document.RootElement(); + if (config == NULL) + { + ROS_ERROR_NAMED("pluginlib.ClassLoader","Skipping XML Document \"%s\" which had no Root Element. This likely means the XML is malformed or missing.", xml_file.c_str()); + return; + } +- if (config->ValueStr() != "library" && +- config->ValueStr() != "class_libraries") ++ if (!(strcmp(config->Value(), "library") == 0 || ++ strcmp(config->Value(), "class_libraries") == 0)) + { + ROS_ERROR_NAMED("pluginlib.ClassLoader","The XML document \"%s\" given to add must have either \"library\" or \ + \"class_libraries\" as the root tag", xml_file.c_str()); + return; + } + //Step into the filter list if necessary +- if (config->ValueStr() == "class_libraries") ++ if (strcmp(config->Value(), "class_libraries") == 0) + { + config = config->FirstChildElement("library"); + } + +- TiXmlElement* library = config; ++ tinyxml2::XMLElement* library = config; + while ( library != NULL) + { + std::string library_path = library->Attribute("path"); +@@ -625,7 +625,7 @@ namespace pluginlib + if (package_name == "") + ROS_ERROR_NAMED("pluginlib.ClassLoader","Could not find package manifest (neither package.xml or deprecated manifest.xml) at same directory level as the plugin XML file %s. Plugins will likely not be exported properly.\n)", xml_file.c_str()); + +- TiXmlElement* class_element = library->FirstChildElement("class"); ++ tinyxml2::XMLElement* class_element = library->FirstChildElement("class"); + while (class_element) + { + std::string derived_class; +@@ -658,7 +658,7 @@ namespace pluginlib + if(base_class_type == base_class_){ + + // register class here +- TiXmlElement* description = class_element->FirstChildElement("description"); ++ tinyxml2::XMLElement* description = class_element->FirstChildElement("description"); + std::string description_str; + if (description) + description_str = description->GetText() ? description->GetText() : ""; +diff --git a/package.xml b/package.xml +index 8984eb2..6a7b410 100644 +--- a/package.xml ++++ b/package.xml +@@ -23,13 +23,13 @@ + class_loader + rosconsole + roslib +- tinyxml ++ tinyxml2 + + boost + class_loader + rosconsole + roslib +- tinyxml ++ tinyxml2 + + + +-- +2.9.3 + diff --git a/meta-refkit-industrial/recipes-ros/pluginlib/pluginlib_1.10.5.bbappend b/meta-refkit-industrial/recipes-ros/pluginlib/pluginlib_1.10.5.bbappend new file mode 100644 index 0000000000..e597aca5de --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/pluginlib/pluginlib_1.10.5.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_refkit-industrial = "\ + file://0001-Switch-from-TinyXML-to-TinyXML2.patch \ + " +DEPENDS_remove_refkit-industrial = "libtinyxml" +DEPENDS_append_refkit-industrial = " libtinyxml2" diff --git a/meta-refkit-industrial/recipes-ros/robot-model/urdf/0001-Switch-from-TinyXML-to-TinyXML2.patch b/meta-refkit-industrial/recipes-ros/robot-model/urdf/0001-Switch-from-TinyXML-to-TinyXML2.patch new file mode 100644 index 0000000000..16fc6fe61b --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/robot-model/urdf/0001-Switch-from-TinyXML-to-TinyXML2.patch @@ -0,0 +1,138 @@ +From 7ad0ae9498063be239e51afe869a0c91083aa7ea Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Mon, 23 Jan 2017 11:31:38 +0200 +Subject: [PATCH] Switch from TinyXML to TinyXML2 + +The library TinyXML is considered to be unmaintained and +since all future development is focused on TinyXML2 this +patch updates urdf to use TinyXML2. + +Upstream-Status: Submitted [https://github.com/ros/robot_model/pull/205] + +Signed-off-by: Dmitry Rozhkov +--- + CMakeLists.txt | 8 ++++---- + include/urdf/model.h | 10 +++++----- + src/model.cpp | 17 +++++++++++------ + 3 files changed, 20 insertions(+), 15 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f19fb04..b0c76e5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,7 +8,7 @@ find_package(catkin REQUIRED COMPONENTS + urdf_parser_plugin pluginlib rosconsole_bridge roscpp cmake_modules) + + +-find_package(TinyXML REQUIRED) ++find_package(TinyXML2 REQUIRED) + + find_package(PkgConfig) + pkg_check_modules(libpcrecpp libpcrecpp) +@@ -26,7 +26,7 @@ configure_file(urdfdom_compatibility.h.in "${generated_compat_header}" @ONLY) + + catkin_package( + LIBRARIES ${PROJECT_NAME} +- INCLUDE_DIRS include ${TinyXML_INLCLUDE_DIRS} ${CATKIN_DEVEL_PREFIX}/include ++ INCLUDE_DIRS include ${TinyXML2_INLCLUDE_DIRS} ${CATKIN_DEVEL_PREFIX}/include + CATKIN_DEPENDS rosconsole_bridge roscpp + DEPENDS urdfdom_headers urdfdom Boost pcrecpp + ) +@@ -39,13 +39,13 @@ include_directories( + ${catkin_INCLUDE_DIRS} + ${urdfdom_INCLUDE_DIRS} + ${urdfdom_headers_INCLUDE_DIRS} +- ${TinyXML_INCLUDE_DIRS} ++ ${TinyXML2_INCLUDE_DIRS} + ) + + link_directories(${Boost_LIBRARY_DIRS} ${catkin_LIBRARY_DIRS}) + + add_library(${PROJECT_NAME} src/model.cpp src/rosconsole_bridge.cpp) +-target_link_libraries(${PROJECT_NAME} ${TinyXML_LIBRARIES} ${catkin_LIBRARIES} ${urdfdom_LIBRARIES}) ++target_link_libraries(${PROJECT_NAME} ${TinyXML2_LIBRARIES} ${catkin_LIBRARIES} ${urdfdom_LIBRARIES}) + + if(APPLE) + set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") +diff --git a/include/urdf/model.h b/include/urdf/model.h +index 794ca34..4735c91 100644 +--- a/include/urdf/model.h ++++ b/include/urdf/model.h +@@ -41,17 +41,17 @@ + #include + #include + #include +-#include ++#include + + namespace urdf{ + + class Model: public ModelInterface + { + public: +- /// \brief Load Model from TiXMLElement +- bool initXml(TiXmlElement *xml); +- /// \brief Load Model from TiXMLDocument +- bool initXml(TiXmlDocument *xml); ++ /// \brief Load Model from XMLElement ++ bool initXml(tinyxml2::XMLElement *xml); ++ /// \brief Load Model from XMLDocument ++ bool initXml(tinyxml2::XMLDocument *xml); + /// \brief Load Model given a filename + bool initFile(const std::string& filename); + /// \brief Load Model given the name of a parameter on the parameter server +diff --git a/src/model.cpp b/src/model.cpp +index a721056..14998fd 100644 +--- a/src/model.cpp ++++ b/src/model.cpp +@@ -52,6 +52,8 @@ + #include + #include + ++using namespace tinyxml2; ++ + namespace urdf{ + + static bool IsColladaData(const std::string& data) +@@ -106,7 +108,7 @@ bool Model::initParam(const std::string& param) + return Model::initString(xml_string); + } + +-bool Model::initXml(TiXmlDocument *xml_doc) ++bool Model::initXml(XMLDocument *xml_doc) + { + if (!xml_doc) + { +@@ -114,13 +116,14 @@ bool Model::initXml(TiXmlDocument *xml_doc) + return false; + } + +- std::stringstream ss; +- ss << *xml_doc; ++ XMLPrinter printer; ++ xml_doc->Print(&printer); ++ std::string str(printer.CStr()); + +- return Model::initString(ss.str()); ++ return Model::initString(str); + } + +-bool Model::initXml(TiXmlElement *robot_xml) ++bool Model::initXml(XMLElement *robot_xml) + { + if (!robot_xml) + { +@@ -129,7 +132,9 @@ bool Model::initXml(TiXmlElement *robot_xml) + } + + std::stringstream ss; +- ss << (*robot_xml); ++ XMLPrinter printer; ++ robot_xml->Accept(&printer); ++ ss << printer.CStr(); + + return Model::initString(ss.str()); + } +-- +2.9.3 + diff --git a/meta-refkit-industrial/recipes-ros/robot-model/urdf_1.11.13.bbappend b/meta-refkit-industrial/recipes-ros/robot-model/urdf_1.11.13.bbappend new file mode 100644 index 0000000000..e597aca5de --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/robot-model/urdf_1.11.13.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_refkit-industrial = "\ + file://0001-Switch-from-TinyXML-to-TinyXML2.patch \ + " +DEPENDS_remove_refkit-industrial = "libtinyxml" +DEPENDS_append_refkit-industrial = " libtinyxml2" diff --git a/meta-refkit-industrial/recipes-ros/rospack/rospack/0001-Fixed-inverted-result-code-check.patch b/meta-refkit-industrial/recipes-ros/rospack/rospack/0001-Fixed-inverted-result-code-check.patch new file mode 100644 index 0000000000..ac252e824d --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/rospack/rospack/0001-Fixed-inverted-result-code-check.patch @@ -0,0 +1,27 @@ +From 8147211740570bd9c2c43050c3e88cbaaadba1ca Mon Sep 17 00:00:00 2001 +From: Tim Rakowski +Date: Sun, 26 Feb 2017 12:39:29 +0100 +Subject: [PATCH] Fixed inverted result code check + +Upstream-Status: Backported + +--- + src/rospack.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/rospack.cpp b/src/rospack.cpp +index ebdecd7..a515f4f 100644 +--- a/src/rospack.cpp ++++ b/src/rospack.cpp +@@ -1546,7 +1546,7 @@ Rosstackage::loadManifest(Stackage* stackage) + if(stackage->manifest_loaded_) + return; + +- if(!stackage->manifest_.LoadFile(stackage->manifest_path_.c_str())) ++ if(stackage->manifest_.LoadFile(stackage->manifest_path_.c_str()) != XML_SUCCESS) + { + std::string errmsg = std::string("error parsing manifest of package ") + + stackage->name_ + " at " + stackage->manifest_path_; +-- +2.9.3 + diff --git a/meta-refkit-industrial/recipes-ros/rospack/rospack/0001-Switch-from-TinyXML-to-TinyXML2.patch b/meta-refkit-industrial/recipes-ros/rospack/rospack/0001-Switch-from-TinyXML-to-TinyXML2.patch new file mode 100644 index 0000000000..11c05b5e87 --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/rospack/rospack/0001-Switch-from-TinyXML-to-TinyXML2.patch @@ -0,0 +1,241 @@ +From ebd1f196fa51bd1df678923d5d298ffe6cd46e30 Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Fri, 3 Jun 2016 11:49:06 +0300 +Subject: [PATCH] Switch from TinyXML to TinyXML2 + +The library TinyXML is considered to be unmaintained and +since all future development is focused on TinyXML2 this +patch updates rospack to use TinyXML2. + +Upstream-Status: Accepted [available since v2.4.0] + +Signed-off-by: Dmitry Rozhkov + +--- + CMakeLists.txt | 8 ++++---- + package.xml | 4 ++-- + src/rospack.cpp | 52 +++++++++++++++++++++++++++------------------------- + 3 files changed, 33 insertions(+), 31 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6b5bb44..c45cc94 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,12 +5,12 @@ find_package(catkin REQUIRED COMPONENTS cmake_modules) + find_package(Boost REQUIRED COMPONENTS filesystem program_options system) + set(Python_ADDITIONAL_VERSIONS "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") + find_package(PythonLibs "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" REQUIRED) +-find_package(TinyXML REQUIRED) ++find_package(TinyXML2 REQUIRED) + + catkin_package( + INCLUDE_DIRS include + LIBRARIES rospack ${PYTHON_LIBRARIES} +- DEPENDS Boost TinyXML ++ DEPENDS Boost TinyXML2 + ) + + #add_definitions(-Wall) +@@ -21,7 +21,7 @@ if(API_BACKCOMPAT_V1) + set(backcompat_source src/rospack_backcompat.cpp) + endif() + +-include_directories(include ${TinyXML_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}) ++include_directories(include ${TinyXML2_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}) + + add_library(rospack + src/rospack.cpp +@@ -29,7 +29,7 @@ add_library(rospack + src/rospack_cmdline.cpp + src/utils.cpp + ) +-target_link_libraries(rospack ${TinyXML_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) ++target_link_libraries(rospack ${TinyXML2_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) + + add_executable(rospackexe src/rospack_main.cpp) + # Set the name, and make it a "global" executable +diff --git a/package.xml b/package.xml +index 448788a..c2c514a 100644 +--- a/package.xml ++++ b/package.xml +@@ -20,14 +20,14 @@ + gtest + pkg-config + python +- tinyxml ++ tinyxml2 + + boost + pkg-config + python + python-catkin-pkg + python-rosdep +- tinyxml ++ tinyxml2 + + python-coverage + +diff --git a/src/rospack.cpp b/src/rospack.cpp +index 18be326..ebdecd7 100644 +--- a/src/rospack.cpp ++++ b/src/rospack.cpp +@@ -27,7 +27,7 @@ + + #include "rospack/rospack.h" + #include "utils.h" +-#include "tinyxml.h" ++#include "tinyxml2.h" + + #include + #include +@@ -81,6 +81,8 @@ + #define PyUnicode_FromString PyString_FromString + #endif + ++using namespace tinyxml2; ++ + // TODO: + // recrawl on: + // package not found in cache +@@ -115,7 +117,7 @@ static const int MAX_CRAWL_DEPTH = 1000; + static const int MAX_DEPENDENCY_DEPTH = 1000; + static const double DEFAULT_MAX_CACHE_AGE = 60.0; + +-TiXmlElement* get_manifest_root(Stackage* stackage); ++XMLElement* get_manifest_root(Stackage* stackage); + double time_since_epoch(); + + #ifdef __APPLE__ +@@ -150,7 +152,7 @@ class Stackage + // \brief have we already loaded the manifest? + bool manifest_loaded_; + // \brief TinyXML structure, filled in during parsing +- TiXmlDocument manifest_; ++ XMLDocument manifest_; + std::vector deps_; + bool deps_computed_; + bool is_wet_package_; +@@ -176,14 +178,14 @@ class Stackage + assert(is_wet_package_); + assert(manifest_loaded_); + // get name from package.xml instead of folder name +- TiXmlElement* root = get_manifest_root(this); +- for(TiXmlElement* el = root->FirstChildElement("name"); el; el = el->NextSiblingElement("name")) ++ XMLElement* root = get_manifest_root(this); ++ for(XMLElement* el = root->FirstChildElement("name"); el; el = el->NextSiblingElement("name")) + { + name_ = el->GetText(); + break; + } + // check if package is a metapackage +- for(TiXmlElement* el = root->FirstChildElement("export"); el; el = el->NextSiblingElement("export")) ++ for(XMLElement* el = root->FirstChildElement("export"); el; el = el->NextSiblingElement("export")) + { + if(el->FirstChildElement("metapackage")) + { +@@ -722,8 +724,8 @@ Rosstackage::rosdeps(const std::string& name, bool direct, + void + Rosstackage::_rosdeps(Stackage* stackage, std::set& rosdeps, const char* tag_name) + { +- TiXmlElement* root = get_manifest_root(stackage); +- for(TiXmlElement* ele = root->FirstChildElement(tag_name); ++ XMLElement* root = get_manifest_root(stackage); ++ for(XMLElement* ele = root->FirstChildElement(tag_name); + ele; + ele = ele->NextSiblingElement(tag_name)) + { +@@ -765,8 +767,8 @@ Rosstackage::vcs(const std::string& name, bool direct, + it != deps_vec.end(); + ++it) + { +- TiXmlElement* root = get_manifest_root(*it); +- for(TiXmlElement* ele = root->FirstChildElement(MANIFEST_TAG_VERSIONCONTROL); ++ XMLElement* root = get_manifest_root(*it); ++ for(XMLElement* ele = root->FirstChildElement(MANIFEST_TAG_VERSIONCONTROL); + ele; + ele = ele->NextSiblingElement(MANIFEST_TAG_VERSIONCONTROL)) + { +@@ -1007,16 +1009,16 @@ Rosstackage::exports_dry_package(Stackage* stackage, const std::string& lang, + const std::string& attrib, + std::vector& flags) + { +- TiXmlElement* root = get_manifest_root(stackage); +- for(TiXmlElement* ele = root->FirstChildElement(MANIFEST_TAG_EXPORT); ++ XMLElement* root = get_manifest_root(stackage); ++ for(XMLElement* ele = root->FirstChildElement(MANIFEST_TAG_EXPORT); + ele; + ele = ele->NextSiblingElement(MANIFEST_TAG_EXPORT)) + { + bool os_match = false; + const char *best_match = NULL; +- for(TiXmlElement* ele2 = ele->FirstChildElement(lang); ++ for(XMLElement* ele2 = ele->FirstChildElement(lang.c_str()); + ele2; +- ele2 = ele2->NextSiblingElement(lang)) ++ ele2 = ele2->NextSiblingElement(lang.c_str())) + { + const char *os_str; + if ((os_str = ele2->Attribute("os"))) +@@ -1113,14 +1115,14 @@ Rosstackage::plugins(const std::string& name, const std::string& attrib, + it != stackages.end(); + ++it) + { +- TiXmlElement* root = get_manifest_root(*it); +- for(TiXmlElement* ele = root->FirstChildElement(MANIFEST_TAG_EXPORT); ++ XMLElement* root = get_manifest_root(*it); ++ for(XMLElement* ele = root->FirstChildElement(MANIFEST_TAG_EXPORT); + ele; + ele = ele->NextSiblingElement(MANIFEST_TAG_EXPORT)) + { +- for(TiXmlElement* ele2 = ele->FirstChildElement(name); ++ for(XMLElement* ele2 = ele->FirstChildElement(name.c_str()); + ele2; +- ele2 = ele2->NextSiblingElement(name)) ++ ele2 = ele2->NextSiblingElement(name.c_str())) + { + const char *att_str; + if((att_str = ele2->Attribute(attrib.c_str()))) +@@ -1544,7 +1546,7 @@ Rosstackage::loadManifest(Stackage* stackage) + if(stackage->manifest_loaded_) + return; + +- if(!stackage->manifest_.LoadFile(stackage->manifest_path_)) ++ if(!stackage->manifest_.LoadFile(stackage->manifest_path_.c_str())) + { + std::string errmsg = std::string("error parsing manifest of package ") + + stackage->name_ + " at " + stackage->manifest_path_; +@@ -1590,14 +1592,14 @@ Rosstackage::computeDeps(Stackage* stackage, bool ignore_errors, bool ignore_mis + void + Rosstackage::computeDepsInternal(Stackage* stackage, bool ignore_errors, const std::string& depend_tag, bool ignore_missing) + { +- TiXmlElement* root; ++ XMLElement* root; + root = get_manifest_root(stackage); + +- TiXmlNode *dep_node = NULL; + const char* dep_pkgname; +- while((dep_node = root->IterateChildren(depend_tag, dep_node))) ++ for(XMLElement *dep_ele = root->FirstChildElement(depend_tag.c_str()); ++ dep_ele; ++ dep_ele = dep_ele->NextSiblingElement(depend_tag.c_str())) + { +- TiXmlElement *dep_ele = dep_node->ToElement(); + if (!stackage->is_wet_package_) + { + dep_pkgname = dep_ele->Attribute(tag_.c_str()); +@@ -2310,10 +2312,10 @@ std::string Rosstack::get_manifest_type() + return "stack"; + } + +-TiXmlElement* ++XMLElement* + get_manifest_root(Stackage* stackage) + { +- TiXmlElement* ele = stackage->manifest_.RootElement(); ++ XMLElement* ele = stackage->manifest_.RootElement(); + if(!ele) + { + std::string errmsg = std::string("error parsing manifest of package ") + +-- +2.7.4 + diff --git a/meta-refkit-industrial/recipes-ros/rospack/rospack_%.bbappend b/meta-refkit-industrial/recipes-ros/rospack/rospack_%.bbappend new file mode 100644 index 0000000000..76e6b5a563 --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/rospack/rospack_%.bbappend @@ -0,0 +1,8 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_refkit-industrial = "\ + file://0001-Switch-from-TinyXML-to-TinyXML2.patch \ + file://0001-Fixed-inverted-result-code-check.patch \ +" +DEPENDS_remove_refkit-industrial = "libtinyxml" +DEPENDS_append_refkit-industrial = " libtinyxml2" diff --git a/meta-refkit-industrial/recipes-ros/srdfdom/srdfdom/0002-rewrite-to-use-TinyXML2-instead-of-TinyXML.patch b/meta-refkit-industrial/recipes-ros/srdfdom/srdfdom/0002-rewrite-to-use-TinyXML2-instead-of-TinyXML.patch new file mode 100644 index 0000000000..ee0b59b366 --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/srdfdom/srdfdom/0002-rewrite-to-use-TinyXML2-instead-of-TinyXML.patch @@ -0,0 +1,807 @@ +From e2254610af2e7cc5193694d5ce7b6e0dbca73c79 Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Fri, 20 Jan 2017 15:08:40 +0200 +Subject: [PATCH 2/2] rewrite to use TinyXML2 instead of TinyXML + +The library TinyXML is considered to be unmaintained and +since all future development is focused on TinyXML2 this +patch updates srdfdom to use TinyXML2. + +Upstream-Status: Submitted [https://github.com/ros-planning/srdfdom/pull/32] + +Signed-off-by: Dmitry Rozhkov +--- + CMakeLists.txt | 8 +- + include/srdfdom/model.h | 24 ++--- + include/srdfdom/srdf_writer.h | 30 +++--- + package.xml | 4 +- + src/model.cpp | 52 ++++++----- + src/srdf_writer.cpp | 213 +++++++++++++++++++++--------------------- + 6 files changed, 169 insertions(+), 162 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 545934b..8244ea2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,16 +8,16 @@ find_package(urdfdom_headers REQUIRED) + + find_package(catkin REQUIRED COMPONENTS cmake_modules urdfdom_py) + +-find_package(TinyXML REQUIRED) ++find_package(TinyXML2 REQUIRED) + +-include_directories(include ${Boost_INCLUDE_DIR} ${TinyXML_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} ${console_bridge_INCLUDE_DIRS} ${urdfdom_headers_INCLUDE_DIRS}) ++include_directories(include ${Boost_INCLUDE_DIR} ${TinyXML2_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} ${console_bridge_INCLUDE_DIRS} ${urdfdom_headers_INCLUDE_DIRS}) + link_directories(${catkin_LIBRARY_DIRS}) + + catkin_python_setup() + + catkin_package( + LIBRARIES ${PROJECT_NAME} +- INCLUDE_DIRS include ${TinyXML_INCLUDE_DIRS} ++ INCLUDE_DIRS include ${TinyXML2_INCLUDE_DIRS} + DEPENDS console_bridge urdfdom_headers urdfdom_py + ) + +@@ -25,7 +25,7 @@ add_library(${PROJECT_NAME} + src/model.cpp + src/srdf_writer.cpp + ) +-target_link_libraries(${PROJECT_NAME} ${TinyXML_LIBRARIES} ${catkin_LIBRARIES} ${console_bridge_LIBRARIES} ${urdfdom_headers_LIBRARIES}) ++target_link_libraries(${PROJECT_NAME} ${TinyXML2_LIBRARIES} ${catkin_LIBRARIES} ${console_bridge_LIBRARIES} ${urdfdom_headers_LIBRARIES}) + + + install(TARGETS ${PROJECT_NAME} +diff --git a/include/srdfdom/model.h b/include/srdfdom/model.h +index 9ba7cf7..40ffe43 100644 +--- a/include/srdfdom/model.h ++++ b/include/srdfdom/model.h +@@ -43,7 +43,7 @@ + #include + #include + #include +-#include ++#include + + namespace urdf + { +@@ -67,10 +67,10 @@ public: + { + } + +- /// \brief Load Model from TiXMLElement +- bool initXml(const urdf::ModelInterface &urdf_model, TiXmlElement *xml); +- /// \brief Load Model from TiXMLDocument +- bool initXml(const urdf::ModelInterface &urdf_model, TiXmlDocument *xml); ++ /// \brief Load Model from XMLElement ++ bool initXml(const urdf::ModelInterface &urdf_model, tinyxml2::XMLElement *xml); ++ /// \brief Load Model from XMLDocument ++ bool initXml(const urdf::ModelInterface &urdf_model, tinyxml2::XMLDocument *xml); + /// \brief Load Model given a filename + bool initFile(const urdf::ModelInterface &urdf_model, const std::string& filename); + /// \brief Load Model from a XML-string +@@ -258,13 +258,13 @@ public: + + private: + +- void loadVirtualJoints(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml); +- void loadGroups(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml); +- void loadGroupStates(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml); +- void loadEndEffectors(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml); +- void loadLinkSphereApproximations(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml); +- void loadDisabledCollisions(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml); +- void loadPassiveJoints(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml); ++ void loadVirtualJoints(const urdf::ModelInterface &urdf_model, tinyxml2::XMLElement *robot_xml); ++ void loadGroups(const urdf::ModelInterface &urdf_model, tinyxml2::XMLElement *robot_xml); ++ void loadGroupStates(const urdf::ModelInterface &urdf_model, tinyxml2::XMLElement *robot_xml); ++ void loadEndEffectors(const urdf::ModelInterface &urdf_model, tinyxml2::XMLElement *robot_xml); ++ void loadLinkSphereApproximations(const urdf::ModelInterface &urdf_model, tinyxml2::XMLElement *robot_xml); ++ void loadDisabledCollisions(const urdf::ModelInterface &urdf_model, tinyxml2::XMLElement *robot_xml); ++ void loadPassiveJoints(const urdf::ModelInterface &urdf_model, tinyxml2::XMLElement *robot_xml); + + std::string name_; + std::vector groups_; +diff --git a/include/srdfdom/srdf_writer.h b/include/srdfdom/srdf_writer.h +index bab621f..cfe7de6 100644 +--- a/include/srdfdom/srdf_writer.h ++++ b/include/srdfdom/srdf_writer.h +@@ -105,60 +105,53 @@ public: + std::string getSRDFString(); + + /** +- * Generate SRDF XML of all contained data +- * +- * @return TinyXML document that contains current SRDF data in this class +- */ +- TiXmlDocument generateSRDF(); +- +- /** + * Generate XML for SRDF groups + * + * @param root - TinyXML root element to attach sub elements to + */ +- void createGroupsXML( TiXmlElement *root ); ++ void createGroupsXML( tinyxml2::XMLElement *root ); + + /** + * Generate XML for SRDF link collision spheres + * + * @param root - TinyXML root element to attach sub elements to + */ +- void createLinkSphereApproximationsXML( TiXmlElement *root ); ++ void createLinkSphereApproximationsXML( tinyxml2::XMLElement *root ); + + /** + * Generate XML for SRDF disabled collisions of robot link pairs + * + * @param root - TinyXML root element to attach sub elements to + */ +- void createDisabledCollisionsXML( TiXmlElement *root ); ++ void createDisabledCollisionsXML( tinyxml2::XMLElement *root ); + + /** + * Generate XML for SRDF group states of each joint's position + * + * @param root - TinyXML root element to attach sub elements to + */ +- void createGroupStatesXML( TiXmlElement *root ); ++ void createGroupStatesXML( tinyxml2::XMLElement *root ); + + /** + * Generate XML for SRDF end effectors + * + * @param root - TinyXML root element to attach sub elements to + */ +- void createEndEffectorsXML( TiXmlElement *root ); ++ void createEndEffectorsXML( tinyxml2::XMLElement *root ); + + /** + * Generate XML for SRDF virtual joints + * + * @param root - TinyXML root element to attach sub elements to + */ +- void createVirtualJointsXML( TiXmlElement *root ); ++ void createVirtualJointsXML( tinyxml2::XMLElement *root ); + + /** + * Generate XML for SRDF passive joints + * + * @param root - TinyXML root element to attach sub elements to + */ +- void createPassiveJointsXML( TiXmlElement *root ); ++ void createPassiveJointsXML( tinyxml2::XMLElement *root ); + + // ****************************************************************************************** + // Group Datastructures +@@ -178,6 +171,15 @@ public: + // Robot name + std::string robot_name_; + ++private: ++ ++ /** ++ * Generate SRDF XML of all contained data ++ * ++ * @param document - TinyXML2 document that contains current SRDF data in this class ++ */ ++ void generateSRDF(tinyxml2::XMLDocument &document); ++ + }; + + // ****************************************************************************************** +diff --git a/package.xml b/package.xml +index 57e1db7..b30e806 100644 +--- a/package.xml ++++ b/package.xml +@@ -18,12 +18,12 @@ + libconsole-bridge-dev + liburdfdom-headers-dev + urdfdom_py +- tinyxml ++ tinyxml2 + + boost + libconsole-bridge-dev + liburdfdom-headers-dev +- tinyxml ++ tinyxml2 + urdfdom_py + + rostest +diff --git a/src/model.cpp b/src/model.cpp +index bab1138..0b6132f 100644 +--- a/src/model.cpp ++++ b/src/model.cpp +@@ -44,9 +44,11 @@ + #include + #include + +-void srdf::Model::loadVirtualJoints(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml) ++using namespace tinyxml2; ++ ++void srdf::Model::loadVirtualJoints(const urdf::ModelInterface &urdf_model, XMLElement *robot_xml) + { +- for (TiXmlElement* vj_xml = robot_xml->FirstChildElement("virtual_joint"); vj_xml; vj_xml = vj_xml->NextSiblingElement("virtual_joint")) ++ for (XMLElement* vj_xml = robot_xml->FirstChildElement("virtual_joint"); vj_xml; vj_xml = vj_xml->NextSiblingElement("virtual_joint")) + { + const char *jname = vj_xml->Attribute("name"); + const char *child = vj_xml->Attribute("child_link"); +@@ -92,9 +94,9 @@ void srdf::Model::loadVirtualJoints(const urdf::ModelInterface &urdf_model, TiXm + } + } + +-void srdf::Model::loadGroups(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml) ++void srdf::Model::loadGroups(const urdf::ModelInterface &urdf_model, XMLElement *robot_xml) + { +- for (TiXmlElement* group_xml = robot_xml->FirstChildElement("group"); group_xml; group_xml = group_xml->NextSiblingElement("group")) ++ for (XMLElement* group_xml = robot_xml->FirstChildElement("group"); group_xml; group_xml = group_xml->NextSiblingElement("group")) + { + const char *gname = group_xml->Attribute("name"); + if (!gname) +@@ -106,7 +108,7 @@ void srdf::Model::loadGroups(const urdf::ModelInterface &urdf_model, TiXmlElemen + g.name_ = std::string(gname); boost::trim(g.name_); + + // get the links in the groups +- for (TiXmlElement* link_xml = group_xml->FirstChildElement("link"); link_xml; link_xml = link_xml->NextSiblingElement("link")) ++ for (XMLElement* link_xml = group_xml->FirstChildElement("link"); link_xml; link_xml = link_xml->NextSiblingElement("link")) + { + const char *lname = link_xml->Attribute("name"); + if (!lname) +@@ -124,7 +126,7 @@ void srdf::Model::loadGroups(const urdf::ModelInterface &urdf_model, TiXmlElemen + } + + // get the joints in the groups +- for (TiXmlElement* joint_xml = group_xml->FirstChildElement("joint"); joint_xml; joint_xml = joint_xml->NextSiblingElement("joint")) ++ for (XMLElement* joint_xml = group_xml->FirstChildElement("joint"); joint_xml; joint_xml = joint_xml->NextSiblingElement("joint")) + { + const char *jname = joint_xml->Attribute("name"); + if (!jname) +@@ -152,7 +154,7 @@ void srdf::Model::loadGroups(const urdf::ModelInterface &urdf_model, TiXmlElemen + } + + // get the chains in the groups +- for (TiXmlElement* chain_xml = group_xml->FirstChildElement("chain"); chain_xml; chain_xml = chain_xml->NextSiblingElement("chain")) ++ for (XMLElement* chain_xml = group_xml->FirstChildElement("chain"); chain_xml; chain_xml = chain_xml->NextSiblingElement("chain")) + { + const char *base = chain_xml->Attribute("base_link"); + const char *tip = chain_xml->Attribute("tip_link"); +@@ -207,7 +209,7 @@ void srdf::Model::loadGroups(const urdf::ModelInterface &urdf_model, TiXmlElemen + } + + // get the subgroups in the groups +- for (TiXmlElement* subg_xml = group_xml->FirstChildElement("group"); subg_xml; subg_xml = subg_xml->NextSiblingElement("group")) ++ for (XMLElement* subg_xml = group_xml->FirstChildElement("group"); subg_xml; subg_xml = subg_xml->NextSiblingElement("group")) + { + const char *sub = subg_xml->Attribute("name"); + if (!sub) +@@ -265,9 +267,9 @@ void srdf::Model::loadGroups(const urdf::ModelInterface &urdf_model, TiXmlElemen + } + } + +-void srdf::Model::loadGroupStates(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml) ++void srdf::Model::loadGroupStates(const urdf::ModelInterface &urdf_model, XMLElement *robot_xml) + { +- for (TiXmlElement* gstate_xml = robot_xml->FirstChildElement("group_state"); gstate_xml; gstate_xml = gstate_xml->NextSiblingElement("group_state")) ++ for (XMLElement* gstate_xml = robot_xml->FirstChildElement("group_state"); gstate_xml; gstate_xml = gstate_xml->NextSiblingElement("group_state")) + { + const char *sname = gstate_xml->Attribute("name"); + const char *gname = gstate_xml->Attribute("group"); +@@ -300,7 +302,7 @@ void srdf::Model::loadGroupStates(const urdf::ModelInterface &urdf_model, TiXmlE + } + + // get the joint values in the group state +- for (TiXmlElement* joint_xml = gstate_xml->FirstChildElement("joint"); joint_xml; joint_xml = joint_xml->NextSiblingElement("joint")) ++ for (XMLElement* joint_xml = gstate_xml->FirstChildElement("joint"); joint_xml; joint_xml = joint_xml->NextSiblingElement("joint")) + { + const char *jname = joint_xml->Attribute("name"); + const char *jval = joint_xml->Attribute("value"); +@@ -352,9 +354,9 @@ void srdf::Model::loadGroupStates(const urdf::ModelInterface &urdf_model, TiXmlE + } + } + +-void srdf::Model::loadEndEffectors(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml) ++void srdf::Model::loadEndEffectors(const urdf::ModelInterface &urdf_model, XMLElement *robot_xml) + { +- for (TiXmlElement* eef_xml = robot_xml->FirstChildElement("end_effector"); eef_xml; eef_xml = eef_xml->NextSiblingElement("end_effector")) ++ for (XMLElement* eef_xml = robot_xml->FirstChildElement("end_effector"); eef_xml; eef_xml = eef_xml->NextSiblingElement("end_effector")) + { + const char *ename = eef_xml->Attribute("name"); + const char *gname = eef_xml->Attribute("group"); +@@ -404,9 +406,9 @@ void srdf::Model::loadEndEffectors(const urdf::ModelInterface &urdf_model, TiXml + } + } + +-void srdf::Model::loadLinkSphereApproximations(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml) ++void srdf::Model::loadLinkSphereApproximations(const urdf::ModelInterface &urdf_model, XMLElement *robot_xml) + { +- for (TiXmlElement* cslink_xml = robot_xml->FirstChildElement("link_sphere_approximation"); cslink_xml; cslink_xml = cslink_xml->NextSiblingElement("link_sphere_approximation")) ++ for (XMLElement* cslink_xml = robot_xml->FirstChildElement("link_sphere_approximation"); cslink_xml; cslink_xml = cslink_xml->NextSiblingElement("link_sphere_approximation")) + { + int non_0_radius_sphere_cnt = 0; + const char *link_name = cslink_xml->Attribute("link"); +@@ -427,7 +429,7 @@ void srdf::Model::loadLinkSphereApproximations(const urdf::ModelInterface &urdf_ + + // get the spheres for this link + int cnt = 0; +- for (TiXmlElement* sphere_xml = cslink_xml->FirstChildElement("sphere"); sphere_xml; sphere_xml = sphere_xml->NextSiblingElement("sphere"), cnt++) ++ for (XMLElement* sphere_xml = cslink_xml->FirstChildElement("sphere"); sphere_xml; sphere_xml = sphere_xml->NextSiblingElement("sphere"), cnt++) + { + const char *s_center = sphere_xml->Attribute("center"); + const char *s_r = sphere_xml->Attribute("radius"); +@@ -491,9 +493,9 @@ void srdf::Model::loadLinkSphereApproximations(const urdf::ModelInterface &urdf_ + } + } + +-void srdf::Model::loadDisabledCollisions(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml) ++void srdf::Model::loadDisabledCollisions(const urdf::ModelInterface &urdf_model, XMLElement *robot_xml) + { +- for (TiXmlElement* c_xml = robot_xml->FirstChildElement("disable_collisions"); c_xml; c_xml = c_xml->NextSiblingElement("disable_collisions")) ++ for (XMLElement* c_xml = robot_xml->FirstChildElement("disable_collisions"); c_xml; c_xml = c_xml->NextSiblingElement("disable_collisions")) + { + const char *link1 = c_xml->Attribute("link1"); + const char *link2 = c_xml->Attribute("link2"); +@@ -522,9 +524,9 @@ void srdf::Model::loadDisabledCollisions(const urdf::ModelInterface &urdf_model, + } + } + +-void srdf::Model::loadPassiveJoints(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml) ++void srdf::Model::loadPassiveJoints(const urdf::ModelInterface &urdf_model, XMLElement *robot_xml) + { +- for (TiXmlElement* c_xml = robot_xml->FirstChildElement("passive_joint"); c_xml; c_xml = c_xml->NextSiblingElement("passive_joint")) ++ for (XMLElement* c_xml = robot_xml->FirstChildElement("passive_joint"); c_xml; c_xml = c_xml->NextSiblingElement("passive_joint")) + { + const char *name = c_xml->Attribute("name"); + if (!name) +@@ -550,10 +552,10 @@ void srdf::Model::loadPassiveJoints(const urdf::ModelInterface &urdf_model, TiXm + } + } + +-bool srdf::Model::initXml(const urdf::ModelInterface &urdf_model, TiXmlElement *robot_xml) ++bool srdf::Model::initXml(const urdf::ModelInterface &urdf_model, XMLElement *robot_xml) + { + clear(); +- if (!robot_xml || robot_xml->ValueStr() != "robot") ++ if (!robot_xml || strcmp(robot_xml->Value(), "robot") != 0) + { + logError("Could not find the 'robot' element in the xml file"); + return false; +@@ -581,9 +583,9 @@ bool srdf::Model::initXml(const urdf::ModelInterface &urdf_model, TiXmlElement * + return true; + } + +-bool srdf::Model::initXml(const urdf::ModelInterface &urdf_model, TiXmlDocument *xml) ++bool srdf::Model::initXml(const urdf::ModelInterface &urdf_model, XMLDocument *xml) + { +- TiXmlElement *robot_xml = xml ? xml->FirstChildElement("robot") : NULL; ++ XMLElement *robot_xml = xml ? xml->FirstChildElement("robot") : NULL; + if (!robot_xml) + { + logError("Could not find the 'robot' element in the xml file"); +@@ -618,7 +620,7 @@ bool srdf::Model::initFile(const urdf::ModelInterface &urdf_model, const std::st + + bool srdf::Model::initString(const urdf::ModelInterface &urdf_model, const std::string& xmlstring) + { +- TiXmlDocument xml_doc; ++ XMLDocument xml_doc; + xml_doc.Parse(xmlstring.c_str()); + return initXml(urdf_model, &xml_doc); + } +diff --git a/src/srdf_writer.cpp b/src/srdf_writer.cpp +index e82238e..fb18acc 100644 +--- a/src/srdf_writer.cpp ++++ b/src/srdf_writer.cpp +@@ -34,9 +34,11 @@ + + /* Author: Dave Coleman */ + +-#include ++#include + #include + ++using namespace tinyxml2; ++ + namespace srdf + { + +@@ -118,10 +120,11 @@ void SRDFWriter::updateSRDFModel( const urdf::ModelInterface &robot_model ) + bool SRDFWriter::writeSRDF( const std::string &file_path ) + { + // Generate the SRDF +- TiXmlDocument document = generateSRDF(); ++ XMLDocument document; ++ generateSRDF(document); + + // Save to file +- return document.SaveFile( file_path ); ++ return document.SaveFile( file_path.c_str() ); + } + + // ****************************************************************************************** +@@ -130,11 +133,11 @@ bool SRDFWriter::writeSRDF( const std::string &file_path ) + std::string SRDFWriter::getSRDFString() + { + // Generate the SRDF +- TiXmlDocument document = generateSRDF(); ++ XMLDocument document; ++ generateSRDF(document); + + // Setup printer +- TiXmlPrinter printer; +- printer.SetIndent( " " ); ++ XMLPrinter printer; + document.Accept( &printer ); + + // Return string +@@ -144,20 +147,16 @@ std::string SRDFWriter::getSRDFString() + // ****************************************************************************************** + // Generate SRDF XML of all contained data + // ****************************************************************************************** +-TiXmlDocument SRDFWriter::generateSRDF() ++void SRDFWriter::generateSRDF(tinyxml2::XMLDocument& document) + { +- TiXmlDocument document; +- TiXmlDeclaration* decl = new TiXmlDeclaration( "1.0", "", "" ); +- document.LinkEndChild( decl ); ++ document.NewDeclaration(); + + // Convenience comments +- TiXmlComment * comment = new TiXmlComment( "This does not replace URDF, and is not an extension of URDF.\n This is a format for representing semantic information about the robot structure.\n A URDF file must exist for this robot as well, where the joints and the links that are referenced are defined\n" ); +- document.LinkEndChild( comment ); ++ document.NewComment( "This does not replace URDF, and is not an extension of URDF.\n This is a format for representing semantic information about the robot structure.\n A URDF file must exist for this robot as well, where the joints and the links that are referenced are defined\n" ); + + // Root +- TiXmlElement* robot_root = new TiXmlElement("robot"); +- robot_root->SetAttribute("name", robot_name_ ); // robot name +- document.LinkEndChild( robot_root ); ++ XMLElement* robot_root = document.NewElement("robot"); ++ robot_root->SetAttribute("name", robot_name_.c_str() ); // robot name + + // Add Groups + createGroupsXML( robot_root ); +@@ -179,30 +178,28 @@ TiXmlDocument SRDFWriter::generateSRDF() + + // Add Disabled Collisions + createDisabledCollisionsXML( robot_root ); +- +- // Save +- return document; + } + + // ****************************************************************************************** + // Generate XML for SRDF groups + // ****************************************************************************************** +-void SRDFWriter::createGroupsXML( TiXmlElement *root ) ++void SRDFWriter::createGroupsXML( XMLElement *root ) + { ++ XMLDocument* doc = root->GetDocument(); ++ + // Convenience comments + if( groups_.size() ) // only show comments if there are corresponding elements + { +- TiXmlComment *comment; +- comment = new TiXmlComment( "GROUPS: Representation of a set of joints and links. This can be useful for specifying DOF to plan for, defining arms, end effectors, etc" ); +- root->LinkEndChild( comment ); +- comment = new TiXmlComment( "LINKS: When a link is specified, the parent joint of that link (if it exists) is automatically included" ); +- root->LinkEndChild( comment ); +- comment = new TiXmlComment( "JOINTS: When a joint is specified, the child link of that joint (which will always exist) is automatically included" ); +- root->LinkEndChild( comment ); +- comment = new TiXmlComment( "CHAINS: When a chain is specified, all the links along the chain (including endpoints) are included in the group. Additionally, all the joints that are parents to included links are also included. This means that joints along the chain and the parent joint of the base link are included in the group"); +- root->LinkEndChild( comment ); +- comment = new TiXmlComment( "SUBGROUPS: Groups can also be formed by referencing to already defined group names" ); +- root->LinkEndChild( comment ); ++ XMLComment *comment = doc->NewComment( "GROUPS: Representation of a set of joints and links. This can be useful for specifying DOF to plan for, defining arms, end effectors, etc" ); ++ root->InsertEndChild( comment ); ++ comment = doc->NewComment( "LINKS: When a link is specified, the parent joint of that link (if it exists) is automatically included" ); ++ root->InsertEndChild( comment ); ++ comment = doc->NewComment( "JOINTS: When a joint is specified, the child link of that joint (which will always exist) is automatically included" ); ++ root->InsertEndChild( comment ); ++ comment = doc->NewComment( "CHAINS: When a chain is specified, all the links along the chain (including endpoints) are included in the group. Additionally, all the joints that are parents to included links are also included. This means that joints along the chain and the parent joint of the base link are included in the group"); ++ root->InsertEndChild( comment ); ++ comment = doc->NewComment( "SUBGROUPS: Groups can also be formed by referencing to already defined group names" ); ++ root->InsertEndChild( comment ); + } + + // Loop through all of the top groups +@@ -211,45 +208,45 @@ void SRDFWriter::createGroupsXML( TiXmlElement *root ) + { + + // Create group element +- TiXmlElement *group = new TiXmlElement("group"); +- group->SetAttribute("name", group_it->name_ ); // group name +- root->LinkEndChild(group); ++ XMLElement *group = doc->NewElement("group"); ++ group->SetAttribute("name", group_it->name_.c_str() ); // group name ++ root->InsertEndChild(group); + + // LINKS + for( std::vector::const_iterator link_it = group_it->links_.begin(); + link_it != group_it->links_.end(); ++link_it ) + { +- TiXmlElement *link = new TiXmlElement("link"); +- link->SetAttribute("name", *link_it ); // link name +- group->LinkEndChild( link ); ++ XMLElement *link = doc->NewElement("link"); ++ link->SetAttribute("name", (*link_it).c_str() ); // link name ++ group->InsertEndChild( link ); + } + + // JOINTS + for( std::vector::const_iterator joint_it = group_it->joints_.begin(); + joint_it != group_it->joints_.end(); ++joint_it ) + { +- TiXmlElement *joint = new TiXmlElement("joint"); +- joint->SetAttribute("name", *joint_it ); // joint name +- group->LinkEndChild( joint ); ++ XMLElement *joint = doc->NewElement("joint"); ++ joint->SetAttribute("name", (*joint_it).c_str() ); // joint name ++ group->InsertEndChild( joint ); + } + + // CHAINS + for( std::vector >::const_iterator chain_it = group_it->chains_.begin(); + chain_it != group_it->chains_.end(); ++chain_it ) + { +- TiXmlElement *chain = new TiXmlElement("chain"); +- chain->SetAttribute("base_link", chain_it->first ); +- chain->SetAttribute("tip_link", chain_it->second ); +- group->LinkEndChild( chain ); ++ XMLElement *chain = doc->NewElement("chain"); ++ chain->SetAttribute("base_link", chain_it->first.c_str() ); ++ chain->SetAttribute("tip_link", chain_it->second.c_str() ); ++ group->InsertEndChild( chain ); + } + + // SUBGROUPS + for( std::vector::const_iterator subgroup_it = group_it->subgroups_.begin(); + subgroup_it != group_it->subgroups_.end(); ++subgroup_it ) + { +- TiXmlElement *subgroup = new TiXmlElement("group"); +- subgroup->SetAttribute("name", *subgroup_it ); // subgroup name +- group->LinkEndChild( subgroup ); ++ XMLElement *subgroup = doc->NewElement("group"); ++ subgroup->SetAttribute("name", (*subgroup_it).c_str() ); // subgroup name ++ group->InsertEndChild( subgroup ); + } + + } +@@ -258,15 +255,16 @@ void SRDFWriter::createGroupsXML( TiXmlElement *root ) + // ****************************************************************************************** + // Generate XML for SRDF link collision spheres + // ****************************************************************************************** +-void SRDFWriter::createLinkSphereApproximationsXML( TiXmlElement *root ) ++void SRDFWriter::createLinkSphereApproximationsXML( XMLElement *root ) + { + if( link_sphere_approximations_.empty() ) // skip it if there are none + return; + ++ XMLDocument *doc = root->GetDocument(); ++ + // Convenience comments +- TiXmlComment *comment = new TiXmlComment(); +- comment->SetValue( "COLLISION SPHERES: Purpose: Define a set of spheres that bounds a link." ); +- root->LinkEndChild( comment ); ++ XMLComment *comment = doc->NewComment( "COLLISION SPHERES: Purpose: Define a set of spheres that bounds a link." ); ++ root->InsertEndChild( comment ); + + + for ( std::vector::const_iterator link_sphere_it = link_sphere_approximations_.begin(); +@@ -276,21 +274,21 @@ void SRDFWriter::createLinkSphereApproximationsXML( TiXmlElement *root ) + continue; + + // Create new element for the link +- TiXmlElement *link = new TiXmlElement("link_sphere_approximation"); +- link->SetAttribute("link", link_sphere_it->link_); +- root->LinkEndChild( link ); ++ XMLElement *link = doc->NewElement("link_sphere_approximation"); ++ link->SetAttribute("link", link_sphere_it->link_.c_str()); ++ root->InsertEndChild( link ); + + // Add all spheres for the link + for( std::vector::const_iterator sphere_it = link_sphere_it->spheres_.begin(); + sphere_it != link_sphere_it->spheres_.end(); ++sphere_it ) + { +- TiXmlElement *sphere = new TiXmlElement("sphere"); ++ XMLElement *sphere = doc->NewElement("sphere"); + std::stringstream center; + center.precision(20); + center << sphere_it->center_x_ << " " << sphere_it->center_y_ << " " << sphere_it->center_z_; +- sphere->SetAttribute("center", center.str() ); +- sphere->SetDoubleAttribute("radius", sphere_it->radius_ ); +- link->LinkEndChild( sphere ); ++ sphere->SetAttribute("center", center.str().c_str() ); ++ sphere->SetAttribute("radius", sphere_it->radius_ ); ++ link->InsertEndChild( sphere ); + } + } + } +@@ -298,61 +296,63 @@ void SRDFWriter::createLinkSphereApproximationsXML( TiXmlElement *root ) + // ****************************************************************************************** + // Generate XML for SRDF disabled collisions of robot link pairs + // ****************************************************************************************** +-void SRDFWriter::createDisabledCollisionsXML( TiXmlElement *root ) ++void SRDFWriter::createDisabledCollisionsXML( XMLElement *root ) + { ++ XMLDocument *doc = root->GetDocument(); ++ + // Convenience comments + if( disabled_collisions_.size() ) // only show comments if there are corresponding elements + { +- TiXmlComment *comment = new TiXmlComment(); +- comment->SetValue( "DISABLE COLLISIONS: By default it is assumed that any link of the robot could potentially come into collision with any other link in the robot. This tag disables collision checking between a specified pair of links. " ); +- root->LinkEndChild( comment ); ++ XMLComment *comment = doc->NewComment( "DISABLE COLLISIONS: By default it is assumed that any link of the robot could potentially come into collision with any other link in the robot. This tag disables collision checking between a specified pair of links. " ); ++ root->InsertEndChild( comment ); + } + + for ( std::vector::const_iterator pair_it = disabled_collisions_.begin(); + pair_it != disabled_collisions_.end() ; ++pair_it) + { + // Create new element for each link pair +- TiXmlElement *link_pair = new TiXmlElement("disable_collisions"); +- link_pair->SetAttribute("link1", pair_it->link1_ ); +- link_pair->SetAttribute("link2", pair_it->link2_ ); +- link_pair->SetAttribute("reason", pair_it->reason_ ); ++ XMLElement *link_pair = doc->NewElement("disable_collisions"); ++ link_pair->SetAttribute("link1", pair_it->link1_.c_str() ); ++ link_pair->SetAttribute("link2", pair_it->link2_.c_str() ); ++ link_pair->SetAttribute("reason", pair_it->reason_.c_str() ); + +- root->LinkEndChild( link_pair ); ++ root->InsertEndChild( link_pair ); + } + } + + // ****************************************************************************************** + // Generate XML for SRDF group states + // ****************************************************************************************** +-void SRDFWriter::createGroupStatesXML( TiXmlElement *root ) ++void SRDFWriter::createGroupStatesXML( XMLElement *root ) + { ++ XMLDocument *doc = root->GetDocument(); ++ + // Convenience comments + if( group_states_.size() ) // only show comments if there are corresponding elements + { +- TiXmlComment *comment = new TiXmlComment(); +- comment->SetValue( "GROUP STATES: Purpose: Define a named state for a particular group, in terms of joint values. This is useful to define states like 'folded arms'" ); +- root->LinkEndChild( comment ); ++ XMLComment *comment = doc->NewComment( "GROUP STATES: Purpose: Define a named state for a particular group, in terms of joint values. This is useful to define states like 'folded arms'" ); ++ root->InsertEndChild( comment ); + } + + for ( std::vector::const_iterator state_it = group_states_.begin(); + state_it != group_states_.end() ; ++state_it) + { + // Create new element for each group state +- TiXmlElement *state = new TiXmlElement("group_state"); +- state->SetAttribute("name", state_it->name_ ); +- state->SetAttribute("group", state_it->group_ ); +- root->LinkEndChild( state ); ++ XMLElement *state = doc->NewElement("group_state"); ++ state->SetAttribute("name", state_it->name_.c_str() ); ++ state->SetAttribute("group", state_it->group_.c_str() ); ++ root->InsertEndChild( state ); + + // Add all joints + for( std::map >::const_iterator value_it = state_it->joint_values_.begin(); + value_it != state_it->joint_values_.end(); ++value_it ) + { +- TiXmlElement *joint = new TiXmlElement("joint"); +- joint->SetAttribute("name", value_it->first ); // joint name +- joint->SetDoubleAttribute("value", value_it->second[0] ); // joint value ++ XMLElement *joint = doc->NewElement("joint"); ++ joint->SetAttribute("name", value_it->first.c_str() ); // joint name ++ joint->SetAttribute("value", value_it->second[0] ); // joint value + + // TODO: use the vector to support multi-DOF joints +- state->LinkEndChild( joint ); ++ state->InsertEndChild( joint ); + } + } + } +@@ -360,72 +360,75 @@ void SRDFWriter::createGroupStatesXML( TiXmlElement *root ) + // ****************************************************************************************** + // Generate XML for SRDF end effectors + // ****************************************************************************************** +-void SRDFWriter::createEndEffectorsXML( TiXmlElement *root ) ++void SRDFWriter::createEndEffectorsXML( XMLElement *root ) + { ++ XMLDocument *doc = root->GetDocument(); ++ + // Convenience comments + if( end_effectors_.size() ) // only show comments if there are corresponding elements + { +- TiXmlComment *comment = new TiXmlComment(); +- comment->SetValue( "END EFFECTOR: Purpose: Represent information about an end effector." ); +- root->LinkEndChild( comment ); ++ XMLComment *comment = doc->NewComment( "END EFFECTOR: Purpose: Represent information about an end effector." ); ++ root->InsertEndChild( comment ); + } + + for ( std::vector::const_iterator effector_it = end_effectors_.begin(); + effector_it != end_effectors_.end() ; ++effector_it) + { + // Create new element for each link pair +- TiXmlElement *effector = new TiXmlElement("end_effector"); +- effector->SetAttribute("name", effector_it->name_ ); +- effector->SetAttribute("parent_link", effector_it->parent_link_ ); +- effector->SetAttribute("group", effector_it->component_group_ ); ++ XMLElement *effector = doc->NewElement("end_effector"); ++ effector->SetAttribute("name", effector_it->name_.c_str() ); ++ effector->SetAttribute("parent_link", effector_it->parent_link_.c_str() ); ++ effector->SetAttribute("group", effector_it->component_group_.c_str() ); + if (!effector_it->parent_group_.empty()) +- effector->SetAttribute("parent_group", effector_it->parent_group_ ); +- root->LinkEndChild( effector ); ++ effector->SetAttribute("parent_group", effector_it->parent_group_.c_str() ); ++ root->InsertEndChild( effector ); + } + } + + // ****************************************************************************************** + // Generate XML for SRDF virtual joints + // ****************************************************************************************** +-void SRDFWriter::createVirtualJointsXML( TiXmlElement *root ) ++void SRDFWriter::createVirtualJointsXML( XMLElement *root ) + { ++ XMLDocument *doc = root->GetDocument(); ++ + // Convenience comments + if( virtual_joints_.size() ) // only show comments if there are corresponding elements + { +- TiXmlComment *comment = new TiXmlComment(); +- comment->SetValue( "VIRTUAL JOINT: Purpose: this element defines a virtual joint between a robot link and an external frame of reference (considered fixed with respect to the robot)" ); +- root->LinkEndChild( comment ); ++ XMLComment *comment = doc->NewComment( "VIRTUAL JOINT: Purpose: this element defines a virtual joint between a robot link and an external frame of reference (considered fixed with respect to the robot)" ); ++ root->InsertEndChild( comment ); + } + + for ( std::vector::const_iterator virtual_it = virtual_joints_.begin(); + virtual_it != virtual_joints_.end() ; ++virtual_it) + { + // Create new element for each link pair +- TiXmlElement *virtual_joint = new TiXmlElement("virtual_joint"); +- virtual_joint->SetAttribute("name", virtual_it->name_ ); +- virtual_joint->SetAttribute("type", virtual_it->type_ ); +- virtual_joint->SetAttribute("parent_frame", virtual_it->parent_frame_ ); +- virtual_joint->SetAttribute("child_link", virtual_it->child_link_ ); ++ XMLElement *virtual_joint = doc->NewElement("virtual_joint"); ++ virtual_joint->SetAttribute("name", virtual_it->name_.c_str() ); ++ virtual_joint->SetAttribute("type", virtual_it->type_.c_str() ); ++ virtual_joint->SetAttribute("parent_frame", virtual_it->parent_frame_.c_str() ); ++ virtual_joint->SetAttribute("child_link", virtual_it->child_link_.c_str() ); + +- root->LinkEndChild( virtual_joint ); ++ root->InsertEndChild( virtual_joint ); + } + } + +-void SRDFWriter::createPassiveJointsXML( TiXmlElement *root ) ++void SRDFWriter::createPassiveJointsXML( XMLElement *root ) + { ++ XMLDocument *doc = root->GetDocument(); ++ + if ( passive_joints_.size() ) + { +- TiXmlComment *comment = new TiXmlComment(); +- comment->SetValue( "PASSIVE JOINT: Purpose: this element is used to mark joints that are not actuated" ); +- root->LinkEndChild( comment ); ++ XMLComment *comment = doc->NewComment( "PASSIVE JOINT: Purpose: this element is used to mark joints that are not actuated" ); ++ root->InsertEndChild( comment ); + } + for ( std::vector::const_iterator p_it = passive_joints_.begin(); + p_it != passive_joints_.end() ; ++p_it) + { + // Create new element for each link pair +- TiXmlElement *p_joint = new TiXmlElement("passive_joint"); +- p_joint->SetAttribute("name", p_it->name_ ); +- root->LinkEndChild( p_joint ); ++ XMLElement *p_joint = doc->NewElement("passive_joint"); ++ p_joint->SetAttribute("name", p_it->name_.c_str() ); ++ root->InsertEndChild( p_joint ); + } + } + +-- +2.7.4 + diff --git a/meta-refkit-industrial/recipes-ros/srdfdom/srdfdom_0.3.5.bbappend b/meta-refkit-industrial/recipes-ros/srdfdom/srdfdom_0.3.5.bbappend new file mode 100644 index 0000000000..27e37abab2 --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/srdfdom/srdfdom_0.3.5.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_refkit-industrial = "\ + file://0002-rewrite-to-use-TinyXML2-instead-of-TinyXML.patch \ + " +DEPENDS_remove_refkit-industrial = "libtinyxml" +DEPENDS_append_refkit-industrial = " libtinyxml2" diff --git a/meta-refkit-industrial/recipes-ros/urdfdom-headers/urdfdom-headers/0001-Switch-from-TinyXML-to-TinyXML2.patch b/meta-refkit-industrial/recipes-ros/urdfdom-headers/urdfdom-headers/0001-Switch-from-TinyXML-to-TinyXML2.patch new file mode 100644 index 0000000000..f02e4fe5c2 --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/urdfdom-headers/urdfdom-headers/0001-Switch-from-TinyXML-to-TinyXML2.patch @@ -0,0 +1,41 @@ +From 23f3f4cdebd47822ceb66bccc56d9a3965738f9a Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Thu, 26 Jan 2017 13:43:05 +0200 +Subject: [PATCH] Switch from TinyXML to TinyXML2 + +The library TinyXML is considered to be unmaintained and +since all future development is focused on TinyXML2 this +patch updates urdfdom_headers to use TinyXML2. + +Upstream-Status: Submitted [https://github.com/ros/urdfdom_headers/pull/35] + +Signed-off-by: Dmitry Rozhkov +--- + urdf_world/include/urdf_world/world.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/urdf_world/include/urdf_world/world.h b/urdf_world/include/urdf_world/world.h +index eb13fc4..f1003da 100644 +--- a/urdf_world/include/urdf_world/world.h ++++ b/urdf_world/include/urdf_world/world.h +@@ -73,7 +73,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + +@@ -101,7 +101,7 @@ public: + + std::vector models; + +- void initXml(TiXmlElement* config); ++ void initXml(tinyxml2::XMLElement* config); + + void clear() + { +-- +2.7.4 + diff --git a/meta-refkit-industrial/recipes-ros/urdfdom-headers/urdfdom-headers_0.3.0.bbappend b/meta-refkit-industrial/recipes-ros/urdfdom-headers/urdfdom-headers_0.3.0.bbappend new file mode 100644 index 0000000000..ff5f46c220 --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/urdfdom-headers/urdfdom-headers_0.3.0.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_refkit-industrial = "\ + file://0001-Switch-from-TinyXML-to-TinyXML2.patch \ + " diff --git a/meta-refkit-industrial/recipes-ros/urdfdom/urdfdom/0001-Switch-from-TinyXML-to-TinyXML2.patch b/meta-refkit-industrial/recipes-ros/urdfdom/urdfdom/0001-Switch-from-TinyXML-to-TinyXML2.patch new file mode 100644 index 0000000000..1a08f070f0 --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/urdfdom/urdfdom/0001-Switch-from-TinyXML-to-TinyXML2.patch @@ -0,0 +1,1228 @@ +From 614b76d421d7ac40f85188ca1fbe4263debc152c Mon Sep 17 00:00:00 2001 +From: Dmitry Rozhkov +Date: Thu, 26 Jan 2017 12:11:51 +0200 +Subject: [PATCH] Switch from TinyXML to TinyXML2 + +The library TinyXML is considered to be unmaintained and +since all future development is focused on TinyXML2 this +patch updates urdfdom to use TinyXML2. + +Upstream-Status: Submitted [https://github.com/ros/urdfdom/pull/99] + +Signed-off-by: Dmitry Rozhkov +--- + CMakeLists.txt | 7 +- + cmake/SearchForTinyXML.cmake | 20 --- + cmake/SearchForTinyXML2.cmake | 20 +++ + urdf_parser/include/urdf_parser/urdf_parser.h | 8 +- + urdf_parser/src/joint.cpp | 134 ++++++++++-------- + urdf_parser/src/link.cpp | 188 ++++++++++++++------------ + urdf_parser/src/model.cpp | 42 +++--- + urdf_parser/src/pose.cpp | 17 ++- + urdf_parser/src/twist.cpp | 6 +- + urdf_parser/src/urdf_model_state.cpp | 8 +- + urdf_parser/src/urdf_sensor.cpp | 24 ++-- + urdf_parser/src/world.cpp | 14 +- + 12 files changed, 267 insertions(+), 221 deletions(-) + delete mode 100644 cmake/SearchForTinyXML.cmake + create mode 100644 cmake/SearchForTinyXML2.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2ed60b8..b1d1bf7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,10 +34,9 @@ endif (MSVC OR MSVC90 OR MSVC10) + + set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + +-include(SearchForTinyXML) +-include_directories(${tinyxml_include_dirs}) +-link_directories(${tinyxml_library_dirs}) +-add_definitions(${tinyxml_cflags}) ++include(SearchForTinyXML2) ++include_directories(${tinyxml2_include_dirs}) ++link_libraries(${tinyxml2_libraries}) + + find_package(urdfdom_headers REQUIRED) + include_directories(SYSTEM ${urdfdom_headers_INCLUDE_DIRS}) +diff --git a/cmake/SearchForTinyXML.cmake b/cmake/SearchForTinyXML.cmake +deleted file mode 100644 +index 483247d..0000000 +--- a/cmake/SearchForTinyXML.cmake ++++ /dev/null +@@ -1,20 +0,0 @@ +-find_library(tinyxml_library tinyxml) +-if (tinyxml_library) +- message (STATUS "Looking for libtinyxml - found") +- set(tinyxml_libraries ${tinyxml_library}) +-endif () +- +-find_path(tinyxml_include_dirs NAMES tinyxml.h PATH_SUFFIXES tinyxml) +-if (NOT tinyxml_include_dirs) +- message (STATUS "Looking for tinyxml/tinyxml.hpp or tinyxml/tinyxml.h - not found.") +-endif () +- +-if (NOT tinyxml_include_dirs OR NOT tinyxml_libraries) +- include (FindPkgConfig) +- if (PKG_CONFIG_FOUND) +- # Find tinyxml +- pkg_check_modules(tinyxml tinyxml) +- else() +- MESSAGE("Missing: tinyxml") +- endif() +-endif () +diff --git a/cmake/SearchForTinyXML2.cmake b/cmake/SearchForTinyXML2.cmake +new file mode 100644 +index 0000000..4f41443 +--- /dev/null ++++ b/cmake/SearchForTinyXML2.cmake +@@ -0,0 +1,20 @@ ++find_library(tinyxml2_library tinyxml2) ++if (tinyxml2_library) ++ message (STATUS "Looking for libtinyxml2 - found") ++ set(tinyxml2_libraries ${tinyxml2_library}) ++endif () ++ ++find_path(tinyxml2_include_dirs NAMES tinyxml2.h PATH_SUFFIXES tinyxml2) ++if (NOT tinyxml2_include_dirs) ++ message (STATUS "Looking for tinyxml2/tinyxml2.hpp or tinyxml2/tinyxml2.h - not found.") ++endif () ++ ++if (NOT tinyxml2_include_dirs OR NOT tinyxml2_libraries) ++ include (FindPkgConfig) ++ if (PKG_CONFIG_FOUND) ++ # Find tinyxml2 ++ pkg_check_modules(tinyxml2 tinyxml2) ++ else() ++ MESSAGE("Missing: tinyxml2") ++ endif() ++endif () +diff --git a/urdf_parser/include/urdf_parser/urdf_parser.h b/urdf_parser/include/urdf_parser/urdf_parser.h +index 34d044b..e225fff 100644 +--- a/urdf_parser/include/urdf_parser/urdf_parser.h ++++ b/urdf_parser/include/urdf_parser/urdf_parser.h +@@ -39,7 +39,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +@@ -60,9 +60,9 @@ namespace urdf{ + + URDFDOM_DLLAPI boost::shared_ptr parseURDF(const std::string &xml_string); + URDFDOM_DLLAPI boost::shared_ptr parseURDFFile(const std::string &path); +- URDFDOM_DLLAPI TiXmlDocument* exportURDF(boost::shared_ptr &model); +- URDFDOM_DLLAPI TiXmlDocument* exportURDF(const ModelInterface &model); +- URDFDOM_DLLAPI bool parsePose(Pose&, TiXmlElement*); ++ URDFDOM_DLLAPI tinyxml2::XMLDocument* exportURDF(boost::shared_ptr &model); ++ URDFDOM_DLLAPI tinyxml2::XMLDocument* exportURDF(const ModelInterface &model); ++ URDFDOM_DLLAPI bool parsePose(Pose&, tinyxml2::XMLElement*); + } + + #endif +diff --git a/urdf_parser/src/joint.cpp b/urdf_parser/src/joint.cpp +index 4d9f2b6..897a0e9 100644 +--- a/urdf_parser/src/joint.cpp ++++ b/urdf_parser/src/joint.cpp +@@ -38,14 +38,16 @@ + #include + #include + #include +-#include ++#include + #include + ++using namespace tinyxml2; ++ + namespace urdf{ + +-bool parsePose(Pose &pose, TiXmlElement* xml); ++bool parsePose(Pose &pose, XMLElement* xml); + +-bool parseJointDynamics(JointDynamics &jd, TiXmlElement* config) ++bool parseJointDynamics(JointDynamics &jd, XMLElement* config) + { + jd.clear(); + +@@ -98,7 +100,7 @@ bool parseJointDynamics(JointDynamics &jd, TiXmlElement* config) + } + } + +-bool parseJointLimits(JointLimits &jl, TiXmlElement* config) ++bool parseJointLimits(JointLimits &jl, XMLElement* config) + { + jl.clear(); + +@@ -181,7 +183,7 @@ bool parseJointLimits(JointLimits &jl, TiXmlElement* config) + return true; + } + +-bool parseJointSafety(JointSafety &js, TiXmlElement* config) ++bool parseJointSafety(JointSafety &js, XMLElement* config) + { + js.clear(); + +@@ -267,7 +269,7 @@ bool parseJointSafety(JointSafety &js, TiXmlElement* config) + return true; + } + +-bool parseJointCalibration(JointCalibration &jc, TiXmlElement* config) ++bool parseJointCalibration(JointCalibration &jc, XMLElement* config) + { + jc.clear(); + +@@ -314,7 +316,7 @@ bool parseJointCalibration(JointCalibration &jc, TiXmlElement* config) + return true; + } + +-bool parseJointMimic(JointMimic &jm, TiXmlElement* config) ++bool parseJointMimic(JointMimic &jm, XMLElement* config) + { + jm.clear(); + +@@ -374,7 +376,7 @@ bool parseJointMimic(JointMimic &jm, TiXmlElement* config) + return true; + } + +-bool parseJoint(Joint &joint, TiXmlElement* config) ++bool parseJoint(Joint &joint, XMLElement* config) + { + joint.clear(); + +@@ -388,7 +390,7 @@ bool parseJoint(Joint &joint, TiXmlElement* config) + joint.name = name; + + // Get transform from Parent Link to Joint Frame +- TiXmlElement *origin_xml = config->FirstChildElement("origin"); ++ XMLElement *origin_xml = config->FirstChildElement("origin"); + if (!origin_xml) + { + logDebug("urdfdom: Joint [%s] missing origin tag under parent describing transform from Parent Link to Joint Frame, (using Identity transform).", joint.name.c_str()); +@@ -405,7 +407,7 @@ bool parseJoint(Joint &joint, TiXmlElement* config) + } + + // Get Parent Link +- TiXmlElement *parent_xml = config->FirstChildElement("parent"); ++ XMLElement *parent_xml = config->FirstChildElement("parent"); + if (parent_xml) + { + const char *pname = parent_xml->Attribute("link"); +@@ -420,7 +422,7 @@ bool parseJoint(Joint &joint, TiXmlElement* config) + } + + // Get Child Link +- TiXmlElement *child_xml = config->FirstChildElement("child"); ++ XMLElement *child_xml = config->FirstChildElement("child"); + if (child_xml) + { + const char *pname = child_xml->Attribute("link"); +@@ -465,7 +467,7 @@ bool parseJoint(Joint &joint, TiXmlElement* config) + if (joint.type != Joint::FLOATING && joint.type != Joint::FIXED) + { + // axis +- TiXmlElement *axis_xml = config->FirstChildElement("axis"); ++ XMLElement *axis_xml = config->FirstChildElement("axis"); + if (!axis_xml){ + logDebug("urdfdom: no axis elemement for Joint link [%s], defaulting to (1,0,0) axis", joint.name.c_str()); + joint.axis = Vector3(1.0, 0.0, 0.0); +@@ -485,7 +487,7 @@ bool parseJoint(Joint &joint, TiXmlElement* config) + } + + // Get limit +- TiXmlElement *limit_xml = config->FirstChildElement("limit"); ++ XMLElement *limit_xml = config->FirstChildElement("limit"); + if (limit_xml) + { + joint.limits.reset(new JointLimits()); +@@ -508,7 +510,7 @@ bool parseJoint(Joint &joint, TiXmlElement* config) + } + + // Get safety +- TiXmlElement *safety_xml = config->FirstChildElement("safety_controller"); ++ XMLElement *safety_xml = config->FirstChildElement("safety_controller"); + if (safety_xml) + { + joint.safety.reset(new JointSafety()); +@@ -521,7 +523,7 @@ bool parseJoint(Joint &joint, TiXmlElement* config) + } + + // Get calibration +- TiXmlElement *calibration_xml = config->FirstChildElement("calibration"); ++ XMLElement *calibration_xml = config->FirstChildElement("calibration"); + if (calibration_xml) + { + joint.calibration.reset(new JointCalibration()); +@@ -534,7 +536,7 @@ bool parseJoint(Joint &joint, TiXmlElement* config) + } + + // Get Joint Mimic +- TiXmlElement *mimic_xml = config->FirstChildElement("mimic"); ++ XMLElement *mimic_xml = config->FirstChildElement("mimic"); + if (mimic_xml) + { + joint.mimic.reset(new JointMimic()); +@@ -547,7 +549,7 @@ bool parseJoint(Joint &joint, TiXmlElement* config) + } + + // Get Dynamics +- TiXmlElement *prop_xml = config->FirstChildElement("dynamics"); ++ XMLElement *prop_xml = config->FirstChildElement("dynamics"); + if (prop_xml) + { + joint.dynamics.reset(new JointDynamics()); +@@ -564,71 +566,83 @@ bool parseJoint(Joint &joint, TiXmlElement* config) + + + /* exports */ +-bool exportPose(Pose &pose, TiXmlElement* xml); ++bool exportPose(Pose &pose, XMLElement* xml); + +-bool exportJointDynamics(JointDynamics &jd, TiXmlElement* xml) ++bool exportJointDynamics(JointDynamics &jd, XMLElement* xml) + { +- TiXmlElement *dynamics_xml = new TiXmlElement("dynamics"); +- dynamics_xml->SetAttribute("damping", urdf_export_helpers::values2str(jd.damping) ); +- dynamics_xml->SetAttribute("friction", urdf_export_helpers::values2str(jd.friction) ); +- xml->LinkEndChild(dynamics_xml); ++ XMLDocument *doc = xml->GetDocument(); ++ ++ XMLElement *dynamics_xml = doc->NewElement("dynamics"); ++ dynamics_xml->SetAttribute("damping", urdf_export_helpers::values2str(jd.damping).c_str() ); ++ dynamics_xml->SetAttribute("friction", urdf_export_helpers::values2str(jd.friction).c_str() ); ++ xml->InsertEndChild(dynamics_xml); + return true; + } + +-bool exportJointLimits(JointLimits &jl, TiXmlElement* xml) ++bool exportJointLimits(JointLimits &jl, XMLElement* xml) + { +- TiXmlElement *limit_xml = new TiXmlElement("limit"); +- limit_xml->SetAttribute("effort", urdf_export_helpers::values2str(jl.effort) ); +- limit_xml->SetAttribute("velocity", urdf_export_helpers::values2str(jl.velocity) ); +- limit_xml->SetAttribute("lower", urdf_export_helpers::values2str(jl.lower) ); +- limit_xml->SetAttribute("upper", urdf_export_helpers::values2str(jl.upper) ); +- xml->LinkEndChild(limit_xml); ++ XMLDocument *doc = xml->GetDocument(); ++ ++ XMLElement *limit_xml = doc->NewElement("limit"); ++ limit_xml->SetAttribute("effort", urdf_export_helpers::values2str(jl.effort).c_str() ); ++ limit_xml->SetAttribute("velocity", urdf_export_helpers::values2str(jl.velocity).c_str() ); ++ limit_xml->SetAttribute("lower", urdf_export_helpers::values2str(jl.lower).c_str() ); ++ limit_xml->SetAttribute("upper", urdf_export_helpers::values2str(jl.upper).c_str() ); ++ xml->InsertEndChild(limit_xml); + return true; + } + +-bool exportJointSafety(JointSafety &js, TiXmlElement* xml) ++bool exportJointSafety(JointSafety &js, XMLElement* xml) + { +- TiXmlElement *safety_xml = new TiXmlElement("safety_controller"); +- safety_xml->SetAttribute("k_position", urdf_export_helpers::values2str(js.k_position) ); +- safety_xml->SetAttribute("k_velocity", urdf_export_helpers::values2str(js.k_velocity) ); +- safety_xml->SetAttribute("soft_lower_limit", urdf_export_helpers::values2str(js.soft_lower_limit) ); +- safety_xml->SetAttribute("soft_upper_limit", urdf_export_helpers::values2str(js.soft_upper_limit) ); +- xml->LinkEndChild(safety_xml); ++ XMLDocument *doc = xml->GetDocument(); ++ ++ XMLElement *safety_xml = doc->NewElement("safety_controller"); ++ safety_xml->SetAttribute("k_position", urdf_export_helpers::values2str(js.k_position).c_str() ); ++ safety_xml->SetAttribute("k_velocity", urdf_export_helpers::values2str(js.k_velocity).c_str() ); ++ safety_xml->SetAttribute("soft_lower_limit", urdf_export_helpers::values2str(js.soft_lower_limit).c_str() ); ++ safety_xml->SetAttribute("soft_upper_limit", urdf_export_helpers::values2str(js.soft_upper_limit).c_str() ); ++ xml->InsertEndChild(safety_xml); + return true; + } + +-bool exportJointCalibration(JointCalibration &jc, TiXmlElement* xml) ++bool exportJointCalibration(JointCalibration &jc, XMLElement* xml) + { ++ XMLDocument *doc = xml->GetDocument(); ++ + if (jc.falling || jc.rising) + { +- TiXmlElement *calibration_xml = new TiXmlElement("calibration"); ++ XMLElement *calibration_xml = doc->NewElement("calibration"); + if (jc.falling) +- calibration_xml->SetAttribute("falling", urdf_export_helpers::values2str(*jc.falling) ); ++ calibration_xml->SetAttribute("falling", urdf_export_helpers::values2str(*jc.falling).c_str() ); + if (jc.rising) +- calibration_xml->SetAttribute("rising", urdf_export_helpers::values2str(*jc.rising) ); ++ calibration_xml->SetAttribute("rising", urdf_export_helpers::values2str(*jc.rising).c_str() ); + //calibration_xml->SetAttribute("reference_position", urdf_export_helpers::values2str(jc.reference_position) ); +- xml->LinkEndChild(calibration_xml); ++ xml->InsertEndChild(calibration_xml); + } + return true; + } + +-bool exportJointMimic(JointMimic &jm, TiXmlElement* xml) ++bool exportJointMimic(JointMimic &jm, XMLElement* xml) + { ++ XMLDocument *doc = xml->GetDocument(); ++ + if (!jm.joint_name.empty()) + { +- TiXmlElement *mimic_xml = new TiXmlElement("mimic"); +- mimic_xml->SetAttribute("offset", urdf_export_helpers::values2str(jm.offset) ); +- mimic_xml->SetAttribute("multiplier", urdf_export_helpers::values2str(jm.multiplier) ); +- mimic_xml->SetAttribute("joint", jm.joint_name ); +- xml->LinkEndChild(mimic_xml); ++ XMLElement *mimic_xml = doc->NewElement("mimic"); ++ mimic_xml->SetAttribute("offset", urdf_export_helpers::values2str(jm.offset).c_str() ); ++ mimic_xml->SetAttribute("multiplier", urdf_export_helpers::values2str(jm.multiplier).c_str() ); ++ mimic_xml->SetAttribute("joint", jm.joint_name.c_str() ); ++ xml->InsertEndChild(mimic_xml); + } + return true; + } + +-bool exportJoint(Joint &joint, TiXmlElement* xml) ++bool exportJoint(Joint &joint, XMLElement* xml) + { +- TiXmlElement * joint_xml = new TiXmlElement("joint"); +- joint_xml->SetAttribute("name", joint.name); ++ XMLDocument *doc = xml->GetDocument(); ++ ++ XMLElement * joint_xml = doc->NewElement("joint"); ++ joint_xml->SetAttribute("name", joint.name.c_str()); + if (joint.type == urdf::Joint::PLANAR) + joint_xml->SetAttribute("type", "planar"); + else if (joint.type == urdf::Joint::FLOATING) +@@ -648,19 +662,19 @@ bool exportJoint(Joint &joint, TiXmlElement* xml) + exportPose(joint.parent_to_joint_origin_transform, joint_xml); + + // axis +- TiXmlElement * axis_xml = new TiXmlElement("axis"); +- axis_xml->SetAttribute("xyz", urdf_export_helpers::values2str(joint.axis)); +- joint_xml->LinkEndChild(axis_xml); ++ XMLElement * axis_xml = doc->NewElement("axis"); ++ axis_xml->SetAttribute("xyz", urdf_export_helpers::values2str(joint.axis).c_str()); ++ joint_xml->InsertEndChild(axis_xml); + + // parent +- TiXmlElement * parent_xml = new TiXmlElement("parent"); +- parent_xml->SetAttribute("link", joint.parent_link_name); ++ XMLElement * parent_xml = doc-> NewElement("parent"); ++ parent_xml->SetAttribute("link", joint.parent_link_name.c_str()); + joint_xml->LinkEndChild(parent_xml); + + // child +- TiXmlElement * child_xml = new TiXmlElement("child"); +- child_xml->SetAttribute("link", joint.child_link_name); +- joint_xml->LinkEndChild(child_xml); ++ XMLElement * child_xml = doc->NewElement("child"); ++ child_xml->SetAttribute("link", joint.child_link_name.c_str()); ++ joint_xml->InsertEndChild(child_xml); + + if (joint.dynamics) + exportJointDynamics(*(joint.dynamics), joint_xml); +@@ -673,7 +687,7 @@ bool exportJoint(Joint &joint, TiXmlElement* xml) + if (joint.mimic) + exportJointMimic(*(joint.mimic), joint_xml); + +- xml->LinkEndChild(joint_xml); ++ xml->InsertEndChild(joint_xml); + return true; + } + +diff --git a/urdf_parser/src/link.cpp b/urdf_parser/src/link.cpp +index b1b34b6..c3f9982 100644 +--- a/urdf_parser/src/link.cpp ++++ b/urdf_parser/src/link.cpp +@@ -41,14 +41,16 @@ + #include + #include + #include +-#include ++#include + #include + ++using namespace tinyxml2; ++ + namespace urdf{ + +-bool parsePose(Pose &pose, TiXmlElement* xml); ++bool parsePose(Pose &pose, XMLElement* xml); + +-bool parseMaterial(Material &material, TiXmlElement *config, bool only_name_is_ok) ++bool parseMaterial(Material &material, XMLElement *config, bool only_name_is_ok) + { + bool has_rgb = false; + bool has_filename = false; +@@ -64,7 +66,7 @@ bool parseMaterial(Material &material, TiXmlElement *config, bool only_name_is_o + material.name = config->Attribute("name"); + + // texture +- TiXmlElement *t = config->FirstChildElement("texture"); ++ XMLElement *t = config->FirstChildElement("texture"); + if (t) + { + if (t->Attribute("filename")) +@@ -75,7 +77,7 @@ bool parseMaterial(Material &material, TiXmlElement *config, bool only_name_is_o + } + + // color +- TiXmlElement *c = config->FirstChildElement("color"); ++ XMLElement *c = config->FirstChildElement("color"); + if (c) + { + if (c->Attribute("rgba")) { +@@ -103,7 +105,7 @@ bool parseMaterial(Material &material, TiXmlElement *config, bool only_name_is_o + } + + +-bool parseSphere(Sphere &s, TiXmlElement *c) ++bool parseSphere(Sphere &s, XMLElement *c) + { + s.clear(); + +@@ -129,7 +131,7 @@ bool parseSphere(Sphere &s, TiXmlElement *c) + return true; + } + +-bool parseBox(Box &b, TiXmlElement *c) ++bool parseBox(Box &b, XMLElement *c) + { + b.clear(); + +@@ -152,7 +154,7 @@ bool parseBox(Box &b, TiXmlElement *c) + return true; + } + +-bool parseCylinder(Cylinder &y, TiXmlElement *c) ++bool parseCylinder(Cylinder &y, XMLElement *c) + { + y.clear(); + +@@ -191,7 +193,7 @@ bool parseCylinder(Cylinder &y, TiXmlElement *c) + } + + +-bool parseMesh(Mesh &m, TiXmlElement *c) ++bool parseMesh(Mesh &m, XMLElement *c) + { + m.clear(); + +@@ -220,19 +222,19 @@ bool parseMesh(Mesh &m, TiXmlElement *c) + return true; + } + +-boost::shared_ptr parseGeometry(TiXmlElement *g) ++boost::shared_ptr parseGeometry(XMLElement *g) + { + boost::shared_ptr geom; + if (!g) return geom; + +- TiXmlElement *shape = g->FirstChildElement(); ++ XMLElement *shape = g->FirstChildElement(); + if (!shape) + { + logError("Geometry tag contains no child element."); + return geom; + } + +- std::string type_name = shape->ValueStr(); ++ std::string type_name(shape->Value()); + if (type_name == "sphere") + { + Sphere *s = new Sphere(); +@@ -270,19 +272,19 @@ boost::shared_ptr parseGeometry(TiXmlElement *g) + return boost::shared_ptr(); + } + +-bool parseInertial(Inertial &i, TiXmlElement *config) ++bool parseInertial(Inertial &i, XMLElement *config) + { + i.clear(); + + // Origin +- TiXmlElement *o = config->FirstChildElement("origin"); ++ XMLElement *o = config->FirstChildElement("origin"); + if (o) + { + if (!parsePose(i.origin, o)) + return false; + } + +- TiXmlElement *mass_xml = config->FirstChildElement("mass"); ++ XMLElement *mass_xml = config->FirstChildElement("mass"); + if (!mass_xml) + { + logError("Inertial element must have a mass element"); +@@ -307,7 +309,7 @@ bool parseInertial(Inertial &i, TiXmlElement *config) + return false; + } + +- TiXmlElement *inertia_xml = config->FirstChildElement("inertia"); ++ XMLElement *inertia_xml = config->FirstChildElement("inertia"); + if (!inertia_xml) + { + logError("Inertial element must have inertia element"); +@@ -345,19 +347,19 @@ bool parseInertial(Inertial &i, TiXmlElement *config) + return true; + } + +-bool parseVisual(Visual &vis, TiXmlElement *config) ++bool parseVisual(Visual &vis, XMLElement *config) + { + vis.clear(); + + // Origin +- TiXmlElement *o = config->FirstChildElement("origin"); ++ XMLElement *o = config->FirstChildElement("origin"); + if (o) { + if (!parsePose(vis.origin, o)) + return false; + } + + // Geometry +- TiXmlElement *geom = config->FirstChildElement("geometry"); ++ XMLElement *geom = config->FirstChildElement("geometry"); + vis.geometry = parseGeometry(geom); + if (!vis.geometry) + return false; +@@ -367,7 +369,7 @@ bool parseVisual(Visual &vis, TiXmlElement *config) + vis.name = name_char; + + // Material +- TiXmlElement *mat = config->FirstChildElement("material"); ++ XMLElement *mat = config->FirstChildElement("material"); + if (mat) { + // get material name + if (!mat->Attribute("name")) { +@@ -387,19 +389,19 @@ bool parseVisual(Visual &vis, TiXmlElement *config) + return true; + } + +-bool parseCollision(Collision &col, TiXmlElement* config) ++bool parseCollision(Collision &col, XMLElement* config) + { + col.clear(); + + // Origin +- TiXmlElement *o = config->FirstChildElement("origin"); ++ XMLElement *o = config->FirstChildElement("origin"); + if (o) { + if (!parsePose(col.origin, o)) + return false; + } + + // Geometry +- TiXmlElement *geom = config->FirstChildElement("geometry"); ++ XMLElement *geom = config->FirstChildElement("geometry"); + col.geometry = parseGeometry(geom); + if (!col.geometry) + return false; +@@ -411,7 +413,7 @@ bool parseCollision(Collision &col, TiXmlElement* config) + return true; + } + +-bool parseLink(Link &link, TiXmlElement* config) ++bool parseLink(Link &link, XMLElement* config) + { + + link.clear(); +@@ -425,7 +427,7 @@ bool parseLink(Link &link, TiXmlElement* config) + link.name = std::string(name_char); + + // Inertial (optional) +- TiXmlElement *i = config->FirstChildElement("inertial"); ++ XMLElement *i = config->FirstChildElement("inertial"); + if (i) + { + link.inertial.reset(new Inertial()); +@@ -437,7 +439,7 @@ bool parseLink(Link &link, TiXmlElement* config) + } + + // Multiple Visuals (optional) +- for (TiXmlElement* vis_xml = config->FirstChildElement("visual"); vis_xml; vis_xml = vis_xml->NextSiblingElement("visual")) ++ for (XMLElement* vis_xml = config->FirstChildElement("visual"); vis_xml; vis_xml = vis_xml->NextSiblingElement("visual")) + { + + boost::shared_ptr vis; +@@ -460,7 +462,7 @@ bool parseLink(Link &link, TiXmlElement* config) + link.visual = link.visual_array[0]; + + // Multiple Collisions (optional) +- for (TiXmlElement* col_xml = config->FirstChildElement("collision"); col_xml; col_xml = col_xml->NextSiblingElement("collision")) ++ for (XMLElement* col_xml = config->FirstChildElement("collision"); col_xml; col_xml = col_xml->NextSiblingElement("collision")) + { + boost::shared_ptr col; + col.reset(new Collision()); +@@ -483,67 +485,79 @@ bool parseLink(Link &link, TiXmlElement* config) + } + + /* exports */ +-bool exportPose(Pose &pose, TiXmlElement* xml); ++bool exportPose(Pose &pose, XMLElement* xml); + +-bool exportMaterial(Material &material, TiXmlElement *xml) ++bool exportMaterial(Material &material, XMLElement *xml) + { +- TiXmlElement *material_xml = new TiXmlElement("material"); +- material_xml->SetAttribute("name", material.name); ++ XMLDocument *doc = xml->GetDocument(); ++ ++ XMLElement *material_xml = doc->NewElement("material"); ++ material_xml->SetAttribute("name", material.name.c_str()); + +- TiXmlElement* texture = new TiXmlElement("texture"); ++ XMLElement* texture = doc->NewElement("texture"); + if (!material.texture_filename.empty()) +- texture->SetAttribute("filename", material.texture_filename); +- material_xml->LinkEndChild(texture); ++ texture->SetAttribute("filename", material.texture_filename.c_str()); ++ material_xml->InsertEndChild(texture); + +- TiXmlElement* color = new TiXmlElement("color"); +- color->SetAttribute("rgba", urdf_export_helpers::values2str(material.color)); +- material_xml->LinkEndChild(color); +- xml->LinkEndChild(material_xml); ++ XMLElement* color = doc->NewElement("color"); ++ color->SetAttribute("rgba", urdf_export_helpers::values2str(material.color).c_str()); ++ material_xml->InsertEndChild(color); ++ xml->InsertEndChild(material_xml); + return true; + } + +-bool exportSphere(Sphere &s, TiXmlElement *xml) ++bool exportSphere(Sphere &s, XMLElement *xml) + { ++ XMLDocument *doc = xml->GetDocument(); ++ + // e.g. add +- TiXmlElement *sphere_xml = new TiXmlElement("sphere"); +- sphere_xml->SetAttribute("radius", urdf_export_helpers::values2str(s.radius)); +- xml->LinkEndChild(sphere_xml); ++ XMLElement *sphere_xml = doc->NewElement("sphere"); ++ sphere_xml->SetAttribute("radius", urdf_export_helpers::values2str(s.radius).c_str()); ++ xml->InsertEndChild(sphere_xml); + return true; + } + +-bool exportBox(Box &b, TiXmlElement *xml) ++bool exportBox(Box &b, XMLElement *xml) + { ++ XMLDocument *doc = xml->GetDocument(); ++ + // e.g. add +- TiXmlElement *box_xml = new TiXmlElement("box"); +- box_xml->SetAttribute("size", urdf_export_helpers::values2str(b.dim)); +- xml->LinkEndChild(box_xml); ++ XMLElement *box_xml = doc->NewElement("box"); ++ box_xml->SetAttribute("size", urdf_export_helpers::values2str(b.dim).c_str()); ++ xml->InsertEndChild(box_xml); + return true; + } + +-bool exportCylinder(Cylinder &y, TiXmlElement *xml) ++bool exportCylinder(Cylinder &y, XMLElement *xml) + { ++ XMLDocument *doc = xml->GetDocument(); ++ + // e.g. add +- TiXmlElement *cylinder_xml = new TiXmlElement("cylinder"); +- cylinder_xml->SetAttribute("radius", urdf_export_helpers::values2str(y.radius)); +- cylinder_xml->SetAttribute("length", urdf_export_helpers::values2str(y.length)); +- xml->LinkEndChild(cylinder_xml); ++ XMLElement *cylinder_xml = doc->NewElement("cylinder"); ++ cylinder_xml->SetAttribute("radius", urdf_export_helpers::values2str(y.radius).c_str()); ++ cylinder_xml->SetAttribute("length", urdf_export_helpers::values2str(y.length).c_str()); ++ xml->InsertEndChild(cylinder_xml); + return true; + } + +-bool exportMesh(Mesh &m, TiXmlElement *xml) ++bool exportMesh(Mesh &m, XMLElement *xml) + { ++ XMLDocument *doc = xml->GetDocument(); ++ + // e.g. add +- TiXmlElement *mesh_xml = new TiXmlElement("mesh"); ++ XMLElement *mesh_xml = doc->NewElement("mesh"); + if (!m.filename.empty()) +- mesh_xml->SetAttribute("filename", m.filename); +- mesh_xml->SetAttribute("scale", urdf_export_helpers::values2str(m.scale)); +- xml->LinkEndChild(mesh_xml); ++ mesh_xml->SetAttribute("filename", m.filename.c_str()); ++ mesh_xml->SetAttribute("scale", urdf_export_helpers::values2str(m.scale).c_str()); ++ xml->InsertEndChild(mesh_xml); + return true; + } + +-bool exportGeometry(boost::shared_ptr &geom, TiXmlElement *xml) ++bool exportGeometry(boost::shared_ptr &geom, XMLElement *xml) + { +- TiXmlElement *geometry_xml = new TiXmlElement("geometry"); ++ XMLDocument *doc = xml->GetDocument(); ++ ++ XMLElement *geometry_xml = doc->NewElement("geometry"); + if (boost::dynamic_pointer_cast(geom)) + { + exportSphere((*(boost::dynamic_pointer_cast(geom).get())), geometry_xml); +@@ -569,40 +583,42 @@ bool exportGeometry(boost::shared_ptr &geom, TiXmlElement *xml) + exportSphere((*(boost::dynamic_pointer_cast(geom).get())), geometry_xml); + } + +- xml->LinkEndChild(geometry_xml); ++ xml->InsertEndChild(geometry_xml); + return true; + } + +-bool exportInertial(Inertial &i, TiXmlElement *xml) ++bool exportInertial(Inertial &i, XMLElement *xml) + { + // adds + // + // + // + // +- TiXmlElement *inertial_xml = new TiXmlElement("inertial"); ++ XMLDocument *doc = xml->GetDocument(); ++ ++ XMLElement *inertial_xml = doc->NewElement("inertial"); + +- TiXmlElement *mass_xml = new TiXmlElement("mass"); +- mass_xml->SetAttribute("value", urdf_export_helpers::values2str(i.mass)); +- inertial_xml->LinkEndChild(mass_xml); ++ XMLElement *mass_xml = doc->NewElement("mass"); ++ mass_xml->SetAttribute("value", urdf_export_helpers::values2str(i.mass).c_str()); ++ inertial_xml->InsertEndChild(mass_xml); + + exportPose(i.origin, inertial_xml); + +- TiXmlElement *inertia_xml = new TiXmlElement("inertia"); +- inertia_xml->SetAttribute("ixx", urdf_export_helpers::values2str(i.ixx)); +- inertia_xml->SetAttribute("ixy", urdf_export_helpers::values2str(i.ixy)); +- inertia_xml->SetAttribute("ixz", urdf_export_helpers::values2str(i.ixz)); +- inertia_xml->SetAttribute("iyy", urdf_export_helpers::values2str(i.iyy)); +- inertia_xml->SetAttribute("iyz", urdf_export_helpers::values2str(i.iyz)); +- inertia_xml->SetAttribute("izz", urdf_export_helpers::values2str(i.izz)); +- inertial_xml->LinkEndChild(inertia_xml); ++ XMLElement *inertia_xml = doc->NewElement("inertia"); ++ inertia_xml->SetAttribute("ixx", urdf_export_helpers::values2str(i.ixx).c_str()); ++ inertia_xml->SetAttribute("ixy", urdf_export_helpers::values2str(i.ixy).c_str()); ++ inertia_xml->SetAttribute("ixz", urdf_export_helpers::values2str(i.ixz).c_str()); ++ inertia_xml->SetAttribute("iyy", urdf_export_helpers::values2str(i.iyy).c_str()); ++ inertia_xml->SetAttribute("iyz", urdf_export_helpers::values2str(i.iyz).c_str()); ++ inertia_xml->SetAttribute("izz", urdf_export_helpers::values2str(i.izz).c_str()); ++ inertial_xml->InsertEndChild(inertia_xml); + +- xml->LinkEndChild(inertial_xml); ++ xml->InsertEndChild(inertial_xml); + + return true; + } + +-bool exportVisual(Visual &vis, TiXmlElement *xml) ++bool exportVisual(Visual &vis, XMLElement *xml) + { + // + // +@@ -611,7 +627,9 @@ bool exportVisual(Visual &vis, TiXmlElement *xml) + // + // + // +- TiXmlElement * visual_xml = new TiXmlElement("visual"); ++ XMLDocument * doc = xml->GetDocument(); ++ ++ XMLElement * visual_xml = doc->NewElement("visual"); + + exportPose(vis.origin, visual_xml); + +@@ -620,12 +638,12 @@ bool exportVisual(Visual &vis, TiXmlElement *xml) + if (vis.material) + exportMaterial(*vis.material, visual_xml); + +- xml->LinkEndChild(visual_xml); ++ xml->InsertEndChild(visual_xml); + + return true; + } + +-bool exportCollision(Collision &col, TiXmlElement* xml) ++bool exportCollision(Collision &col, XMLElement* xml) + { + // + // +@@ -634,21 +652,25 @@ bool exportCollision(Collision &col, TiXmlElement* xml) + // + // + // +- TiXmlElement * collision_xml = new TiXmlElement("collision"); ++ XMLDocument * doc = xml->GetDocument(); ++ ++ XMLElement * collision_xml = doc->NewElement("collision"); + + exportPose(col.origin, collision_xml); + + exportGeometry(col.geometry, collision_xml); + +- xml->LinkEndChild(collision_xml); ++ xml->InsertEndChild(collision_xml); + + return true; + } + +-bool exportLink(Link &link, TiXmlElement* xml) ++bool exportLink(Link &link, XMLElement* xml) + { +- TiXmlElement * link_xml = new TiXmlElement("link"); +- link_xml->SetAttribute("name", link.name); ++ XMLDocument * doc = xml->GetDocument(); ++ ++ XMLElement * link_xml = doc->NewElement("link"); ++ link_xml->SetAttribute("name", link.name.c_str()); + + if (link.inertial) + exportInertial(*link.inertial, link_xml); +@@ -657,7 +679,7 @@ bool exportLink(Link &link, TiXmlElement* xml) + for (std::size_t i = 0 ; i < link.collision_array.size() ; ++i) + exportCollision(*link.collision_array[i], link_xml); + +- xml->LinkEndChild(link_xml); ++ xml->InsertEndChild(link_xml); + + return true; + } +diff --git a/urdf_parser/src/model.cpp b/urdf_parser/src/model.cpp +index de2fbf8..8bf8298 100644 +--- a/urdf_parser/src/model.cpp ++++ b/urdf_parser/src/model.cpp +@@ -40,11 +40,13 @@ + #include + #include + ++using namespace tinyxml2; ++ + namespace urdf{ + +-bool parseMaterial(Material &material, TiXmlElement *config, bool only_name_is_ok); +-bool parseLink(Link &link, TiXmlElement *config); +-bool parseJoint(Joint &joint, TiXmlElement *config); ++bool parseMaterial(Material &material, XMLElement *config, bool only_name_is_ok); ++bool parseLink(Link &link, XMLElement *config); ++bool parseJoint(Joint &joint, XMLElement *config); + + boost::shared_ptr parseURDFFile(const std::string &path) + { +@@ -65,17 +67,17 @@ boost::shared_ptr parseURDF(const std::string &xml_string) + boost::shared_ptr model(new ModelInterface); + model->clear(); + +- TiXmlDocument xml_doc; ++ XMLDocument xml_doc; + xml_doc.Parse(xml_string.c_str()); + if (xml_doc.Error()) + { +- logError(xml_doc.ErrorDesc()); +- xml_doc.ClearError(); ++ logError(xml_doc.GetErrorStr1()); ++ xml_doc.Clear(); + model.reset(); + return model; + } + +- TiXmlElement *robot_xml = xml_doc.FirstChildElement("robot"); ++ XMLElement *robot_xml = xml_doc.FirstChildElement("robot"); + if (!robot_xml) + { + logError("Could not find the 'robot' element in the xml file"); +@@ -94,7 +96,7 @@ boost::shared_ptr parseURDF(const std::string &xml_string) + model->name_ = std::string(name); + + // Get all Material elements +- for (TiXmlElement* material_xml = robot_xml->FirstChildElement("material"); material_xml; material_xml = material_xml->NextSiblingElement("material")) ++ for (XMLElement* material_xml = robot_xml->FirstChildElement("material"); material_xml; material_xml = material_xml->NextSiblingElement("material")) + { + boost::shared_ptr material; + material.reset(new Material); +@@ -123,7 +125,7 @@ boost::shared_ptr parseURDF(const std::string &xml_string) + } + + // Get all Link elements +- for (TiXmlElement* link_xml = robot_xml->FirstChildElement("link"); link_xml; link_xml = link_xml->NextSiblingElement("link")) ++ for (XMLElement* link_xml = robot_xml->FirstChildElement("link"); link_xml; link_xml = link_xml->NextSiblingElement("link")) + { + boost::shared_ptr link; + link.reset(new Link); +@@ -183,7 +185,7 @@ boost::shared_ptr parseURDF(const std::string &xml_string) + } + + // Get all Joint elements +- for (TiXmlElement* joint_xml = robot_xml->FirstChildElement("joint"); joint_xml; joint_xml = joint_xml->NextSiblingElement("joint")) ++ for (XMLElement* joint_xml = robot_xml->FirstChildElement("joint"); joint_xml; joint_xml = joint_xml->NextSiblingElement("joint")) + { + boost::shared_ptr joint; + joint.reset(new Joint); +@@ -243,16 +245,15 @@ boost::shared_ptr parseURDF(const std::string &xml_string) + return model; + } + +-bool exportMaterial(Material &material, TiXmlElement *config); +-bool exportLink(Link &link, TiXmlElement *config); +-bool exportJoint(Joint &joint, TiXmlElement *config); +-TiXmlDocument* exportURDF(const ModelInterface &model) ++bool exportMaterial(Material &material, XMLElement *config); ++bool exportLink(Link &link, XMLElement *config); ++bool exportJoint(Joint &joint, XMLElement *config); ++void exportURDF(const ModelInterface &model, XMLDocument &doc) + { +- TiXmlDocument *doc = new TiXmlDocument(); + +- TiXmlElement *robot = new TiXmlElement("robot"); +- robot->SetAttribute("name", model.name_); +- doc->LinkEndChild(robot); ++ XMLElement *robot = doc.NewElement("robot"); ++ robot->SetAttribute("name", model.name_.c_str()); ++ doc.InsertEndChild(robot); + + + for (std::map >::const_iterator m=model.materials_.begin(); m!=model.materials_.end(); m++) +@@ -273,12 +274,11 @@ TiXmlDocument* exportURDF(const ModelInterface &model) + exportJoint(*(j->second), robot); + } + +- return doc; + } + +-TiXmlDocument* exportURDF(boost::shared_ptr &model) ++void exportURDF(boost::shared_ptr &model, XMLDocument &doc) + { +- return exportURDF(*model); ++ exportURDF(*model, doc); + } + + +diff --git a/urdf_parser/src/pose.cpp b/urdf_parser/src/pose.cpp +index 2ef0eea..0d1e23d 100644 +--- a/urdf_parser/src/pose.cpp ++++ b/urdf_parser/src/pose.cpp +@@ -41,9 +41,11 @@ + #include + #include + #include +-#include ++#include + #include + ++using namespace tinyxml2; ++ + namespace urdf_export_helpers { + + std::string values2str(unsigned int count, const double *values, double (*conv)(double)) +@@ -88,7 +90,7 @@ std::string values2str(double d) + + namespace urdf{ + +-bool parsePose(Pose &pose, TiXmlElement* xml) ++bool parsePose(Pose &pose, XMLElement* xml) + { + pose.clear(); + if (xml) +@@ -120,14 +122,15 @@ bool parsePose(Pose &pose, TiXmlElement* xml) + return true; + } + +-bool exportPose(Pose &pose, TiXmlElement* xml) ++bool exportPose(Pose &pose, XMLElement* xml) + { +- TiXmlElement *origin = new TiXmlElement("origin"); ++ XMLDocument *doc = xml->GetDocument(); ++ XMLElement *origin = doc->NewElement("origin"); + std::string pose_xyz_str = urdf_export_helpers::values2str(pose.position); + std::string pose_rpy_str = urdf_export_helpers::values2str(pose.rotation); +- origin->SetAttribute("xyz", pose_xyz_str); +- origin->SetAttribute("rpy", pose_rpy_str); +- xml->LinkEndChild(origin); ++ origin->SetAttribute("xyz", pose_xyz_str.c_str()); ++ origin->SetAttribute("rpy", pose_rpy_str.c_str()); ++ xml->InsertEndChild(origin); + return true; + } + +diff --git a/urdf_parser/src/twist.cpp b/urdf_parser/src/twist.cpp +index 2117825..cc5ec40 100644 +--- a/urdf_parser/src/twist.cpp ++++ b/urdf_parser/src/twist.cpp +@@ -40,12 +40,14 @@ + #include + #include + #include +-#include ++#include + #include + ++using namespace tinyxml2; ++ + namespace urdf{ + +-bool parseTwist(Twist &twist, TiXmlElement* xml) ++bool parseTwist(Twist &twist, XMLElement* xml) + { + twist.clear(); + if (xml) +diff --git a/urdf_parser/src/urdf_model_state.cpp b/urdf_parser/src/urdf_model_state.cpp +index 4cb60f8..ee73901 100644 +--- a/urdf_parser/src/urdf_model_state.cpp ++++ b/urdf_parser/src/urdf_model_state.cpp +@@ -40,12 +40,14 @@ + #include + #include + #include +-#include ++#include + #include + ++using namespace tinyxml2; ++ + namespace urdf{ + +-bool parseModelState(ModelState &ms, TiXmlElement* config) ++bool parseModelState(ModelState &ms, XMLElement* config) + { + ms.clear(); + +@@ -70,7 +72,7 @@ bool parseModelState(ModelState &ms, TiXmlElement* config) + } + } + +- TiXmlElement *joint_state_elem = config->FirstChildElement("joint_state"); ++ XMLElement *joint_state_elem = config->FirstChildElement("joint_state"); + if (joint_state_elem) + { + boost::shared_ptr joint_state; +diff --git a/urdf_parser/src/urdf_sensor.cpp b/urdf_parser/src/urdf_sensor.cpp +index 58db5cd..e0b4021 100644 +--- a/urdf_parser/src/urdf_sensor.cpp ++++ b/urdf_parser/src/urdf_sensor.cpp +@@ -40,19 +40,21 @@ + #include + #include + #include +-#include ++#include + #include + ++using namespace tinyxml2; ++ + namespace urdf{ + +-bool parsePose(Pose &pose, TiXmlElement* xml); ++bool parsePose(Pose &pose, XMLElement* xml); + +-bool parseCamera(Camera &camera, TiXmlElement* config) ++bool parseCamera(Camera &camera, XMLElement* config) + { + camera.clear(); + camera.type = VisualSensor::CAMERA; + +- TiXmlElement *image = config->FirstChildElement("image"); ++ XMLElement *image = config->FirstChildElement("image"); + if (image) + { + const char* width_char = image->Attribute("width"); +@@ -168,12 +170,12 @@ bool parseCamera(Camera &camera, TiXmlElement* config) + return true; + } + +-bool parseRay(Ray &ray, TiXmlElement* config) ++bool parseRay(Ray &ray, XMLElement* config) + { + ray.clear(); + ray.type = VisualSensor::RAY; + +- TiXmlElement *horizontal = config->FirstChildElement("horizontal"); ++ XMLElement *horizontal = config->FirstChildElement("horizontal"); + if (horizontal) + { + const char* samples_char = horizontal->Attribute("samples"); +@@ -233,7 +235,7 @@ bool parseRay(Ray &ray, TiXmlElement* config) + } + } + +- TiXmlElement *vertical = config->FirstChildElement("vertical"); ++ XMLElement *vertical = config->FirstChildElement("vertical"); + if (vertical) + { + const char* samples_char = vertical->Attribute("samples"); +@@ -294,12 +296,12 @@ bool parseRay(Ray &ray, TiXmlElement* config) + } + } + +-boost::shared_ptr parseVisualSensor(TiXmlElement *g) ++boost::shared_ptr parseVisualSensor(XMLElement *g) + { + boost::shared_ptr visual_sensor; + + // get sensor type +- TiXmlElement *sensor_xml; ++ XMLElement *sensor_xml; + if (g->FirstChildElement("camera")) + { + Camera *camera = new Camera(); +@@ -324,7 +326,7 @@ boost::shared_ptr parseVisualSensor(TiXmlElement *g) + } + + +-bool parseSensor(Sensor &sensor, TiXmlElement* config) ++bool parseSensor(Sensor &sensor, XMLElement* config) + { + sensor.clear(); + +@@ -346,7 +348,7 @@ bool parseSensor(Sensor &sensor, TiXmlElement* config) + sensor.parent_link_name = std::string(parent_link_name_char); + + // parse origin +- TiXmlElement *o = config->FirstChildElement("origin"); ++ XMLElement *o = config->FirstChildElement("origin"); + if (o) + { + if (!parsePose(sensor.origin, o)) +diff --git a/urdf_parser/src/world.cpp b/urdf_parser/src/world.cpp +index f858b25..a419eeb 100644 +--- a/urdf_parser/src/world.cpp ++++ b/urdf_parser/src/world.cpp +@@ -42,12 +42,13 @@ + #include + #include + #include +-#include + #include + ++using namespace tinyxml2; ++ + namespace urdf{ + +-bool parseWorld(World &world, TiXmlElement* config) ++bool parseWorld(World &world, XMLElement* config) + { + + // to be implemented +@@ -55,15 +56,16 @@ bool parseWorld(World &world, TiXmlElement* config) + return true; + } + +-bool exportWorld(World &world, TiXmlElement* xml) ++bool exportWorld(World &world, XMLElement* xml) + { +- TiXmlElement * world_xml = new TiXmlElement("world"); +- world_xml->SetAttribute("name", world.name); ++ XMLDocument * doc = xml->GetDocument(); ++ XMLElement * world_xml = doc->NewElement("world"); ++ world_xml->SetAttribute("name", world.name.c_str()); + + // to be implemented + // exportModels(*world.models, world_xml); + +- xml->LinkEndChild(world_xml); ++ xml->InsertEndChild(world_xml); + + return true; + } +-- +2.7.4 + diff --git a/meta-refkit-industrial/recipes-ros/urdfdom/urdfdom_0.3.0.bbappend b/meta-refkit-industrial/recipes-ros/urdfdom/urdfdom_0.3.0.bbappend new file mode 100644 index 0000000000..e597aca5de --- /dev/null +++ b/meta-refkit-industrial/recipes-ros/urdfdom/urdfdom_0.3.0.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_refkit-industrial = "\ + file://0001-Switch-from-TinyXML-to-TinyXML2.patch \ + " +DEPENDS_remove_refkit-industrial = "libtinyxml" +DEPENDS_append_refkit-industrial = " libtinyxml2" diff --git a/meta-refkit/conf/bblayers.conf.sample b/meta-refkit/conf/bblayers.conf.sample index 5a0abfb23f..40bc45d899 100644 --- a/meta-refkit/conf/bblayers.conf.sample +++ b/meta-refkit/conf/bblayers.conf.sample @@ -1,6 +1,6 @@ # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf # changes incompatibly -LCONF_VERSION = "4" +LCONF_VERSION = "5" BBPATH = "${TOPDIR}" BBFILES ?= "" @@ -13,6 +13,7 @@ REFKIT_LAYERS = " \ ##OEROOT##/../meta-refkit \ ##OEROOT##/../meta-refkit-gateway \ ##OEROOT##/../meta-refkit-computervision \ + ##OEROOT##/../meta-refkit-industrial \ ##OEROOT##/../meta-oic \ ##OEROOT##/../meta-iot-web \ ##OEROOT##/../meta-iotqa \ @@ -20,6 +21,7 @@ REFKIT_LAYERS = " \ ##OEROOT##/../meta-security-isafw \ ##OEROOT##/../meta-intel-realsense \ ##OEROOT##/../meta-clang \ + ##OEROOT##/../meta-ros \ " # REFKIT_LAYERS += "##OEROOT##/../meta-openembedded/meta-efl" diff --git a/meta-refkit/conf/conf-notes.txt b/meta-refkit/conf/conf-notes.txt index 4b8b31140d..9ac41ea00e 100644 --- a/meta-refkit/conf/conf-notes.txt +++ b/meta-refkit/conf/conf-notes.txt @@ -9,3 +9,5 @@ Common targets are: refkit-image-gateway (when building an image with tools and configuration for acting as an IoT sensor gateway) + refkit-image-industrial (when building an image with tools and + configuration for industrial use cases) diff --git a/meta-refkit/conf/distro/include/refkit-ci.inc b/meta-refkit/conf/distro/include/refkit-ci.inc index c44b6eba23..f2fd51dc83 100644 --- a/meta-refkit/conf/distro/include/refkit-ci.inc +++ b/meta-refkit/conf/distro/include/refkit-ci.inc @@ -60,9 +60,15 @@ REFKIT_CI_POSTBUILD_SELFTESTS="secureboot refkit_poky refkit_license_check image # Any other symbols would be skipped in parser. # # Following targets would be used to perform default build task. -# When adding new profile images, add them to refkit-installer-image.bb -# and they will get pulled into the build indirectly. -REFKIT_CI_BUILD_TARGETS="refkit-image-minimal refkit-installer-image swtpm-wrappers-native ovmf" +REFKIT_CI_BUILD_TARGETS=" \ + refkit-image-minimal \ + refkit-image-computervision \ + refkit-image-gateway \ + refkit-image-industrial \ + refkit-installer-image \ + swtpm-wrappers-native \ + ovmf \ +" # Following targets would be executed with do_populate_sdk task REFKIT_CI_SDK_TARGETS="" diff --git a/meta-refkit/conf/distro/include/refkit-supported-recipes.txt b/meta-refkit/conf/distro/include/refkit-supported-recipes.txt index 31edb9110a..8b4e67b83a 100644 --- a/meta-refkit/conf/distro/include/refkit-supported-recipes.txt +++ b/meta-refkit/conf/distro/include/refkit-supported-recipes.txt @@ -30,11 +30,17 @@ # $ LC_ALL=C ex +'32,$ !sort -g' -scxa refkit-supported-recipes.txt acl@core +actionlib-msgs@ros-layer +actionlib@ros-layer alsa-lib@core alsa-plugins@core alsa-state@core alsa-utils@core +angles@ros-layer appfw-test-app@iotqa +apr-util@core +apr@core +assimp@ros-layer atop@openembedded-layer attr@core autoconf@core @@ -59,17 +65,25 @@ bzip2@core ca-certificates@core cairo@core cantarell-fonts@core +catkin-runtime@ros-layer chrpath@core clang@clang-layer +class-loader@ros-layer +cmake-modules@ros-layer +cmake@core compiler-rt@clang-layer compositeproto@core connman-conf@core connman@core +console-bridge@ros-layer +control-msgs@ros-layer coreutils@core +cpp-common@ros-layer cracklib@core cryptodev-linux@core cryptsetup@openembedded-layer curl@core +cv-bridge@ros-layer damageproto@core dash@openembedded-layer db@core @@ -81,12 +95,16 @@ dmxproto@core dosfstools@core dri2proto@core dri3proto@core +dynamic-reconfigure@ros-layer e2fsprogs@core efi-combo-trigger@refkit-core efivar@openembedded-layer +eigen-conversions@ros-layer +eigen-stl-containers@ros-layer elfutils@core encodings@core expat@core +fcl@ros-layer file@core findutils@core fixesproto@core @@ -103,6 +121,12 @@ gcc@core gdb@core gdbm@core gdk-pixbuf@core +gencpp@ros-layer +genlisp@ros-layer +genmsg@ros-layer +genpy@ros-layer +geometric-shapes@ros-layer +geometry-msgs@ros-layer gettext@core gflags@openembedded-layer git@core @@ -136,6 +160,12 @@ i2c-minnowmax-board@quark-bsp i2c-quark-board@quark-bsp icu@core iftop@networking-layer +image-transport@ros-layer +industrial-msgs@ros-layer +industrial-robot-client@ros-layer +industrial-robot-simulator@ros-layer +industrial-trajectory-filters@ros-layer +industrial-utils@ros-layer init-ifupdown@core initramfs-framework-refkit-dm-verity-development@refkit-core initramfs-framework-refkit-dm-verity@refkit-core @@ -156,6 +186,8 @@ iso-codes@core json-c@core kbd@core kbproto@core +kdl-conversions@ros-layer +kdl-parser@ros-layer keymaps@core keyutils@security-framework kmod@core @@ -164,6 +196,7 @@ libaio@core libarchive@core libatomic-ops@core libcap@core +libccd@ros-layer libcgroup@core libcheck@core libcxx@clang-layer @@ -205,6 +238,7 @@ libsndfile1@core libsocketcan@openembedded-layer libsoup-2.4@core libtheora@core +libtinyxml2@openembedded-layer libtool@core libunistring@core libunwind@core @@ -242,6 +276,7 @@ libxvmc@core libxxf86dga@core libxxf86misc@core libxxf86vm@core +libyaml@core linux-firmware@core linux-intel-rt@intel linux-intel@intel @@ -249,16 +284,24 @@ linux-libc-headers@core linux-yocto-rt@core linux-yocto@core lms8@intel +log4cxx@ros-layer lowpan-tools@networking-layer lttng-ust@core lvm2@openembedded-layer m4@core make@core mesa@core +message-filters@ros-layer +message-generation@ros-layer +message-runtime@ros-layer mkfontdir@core mkfontscale@core mkl-dnn@refkit-computervision mmap-smack-test@security-smack +moveit-core@ros-layer +moveit-msgs@ros-layer +moveit-ros-perception@ros-layer +moveit-ros-planning@ros-layer mpfr@core mraa-test@iotqa mraa@refkit-core @@ -268,7 +311,10 @@ ncurses@core netbase@core nettle@core nodejs@iotweb +object-recognition-msgs@ros-layer ocl-icd@refkit-computervision +octomap-msgs@ros-layer +octomap@ros-layer oe-swupd-helpers@meta-swupd opencl-headers@refkit-computervision opencv@openembedded-layer @@ -277,6 +323,7 @@ openssh@core openssl@core opkg-utils@core orc@core +orocos-kdl@ros-layer os-release@core ovmf@core packagegroup-.*@refkit.* @@ -285,6 +332,8 @@ pciutils@core perl@core pixman@core pkgconfig@core +pluginlib@ros-layer +poco@openembedded-layer pointercal-xinput@core popt@core ppp@core @@ -298,32 +347,65 @@ python-nose@core python-numpy@core python-pygobject@core python-setuptools@core +python3-catkin-pkg@ros-layer python3-dbus@core +python3-lxml@meta-python +python3-netifaces@ros-layer python3-nose@core python3-numpy@core python3-pygobject@core +python3-pyyaml@meta-python +python3-rosdep@ros-layer +python3-rosdistro@ros-layer +python3-rospkg@ros-layer python3-setuptools@core python3@core python@core +qhull@ros-layer +random-numbers@ros-layer randrproto@core read-map@iotqa readline@core recordproto@core refkit.*image.*@refkit.* renderproto@core +resource-retriever@ros-layer resourceproto@core rgb@core rmc-db@intel rmc@intel +rosclean@ros-layer +rosconsole-bridge@ros-layer +rosconsole@ros-layer +roscpp-serialization@ros-layer +roscpp-traits@ros-layer +roscpp@ros-layer +rosgraph-msgs@ros-layer +rosgraph@ros-layer +roslang@ros-layer +roslaunch@ros-layer +roslib@ros-layer +rosmaster@ros-layer +rosmsg@ros-layer +rosout@ros-layer +rospack@ros-layer +rosparam@ros-layer +rospy@ros-layer +rosservice@ros-layer +rostime@ros-layer +rosunit@ros-layer rsync@core run-postinsts@core sbc@core scrnsaverproto@core sed@core +sensor-msgs@ros-layer shadow-securetty@core shadow@core +shape-msgs@ros-layer shared-mime-info@core shm-util@iotqa +simple-message@ros-layer smack-userspace@security-smack soletta@soletta speex@core @@ -331,6 +413,8 @@ speexdsp@core spi-minnowmax-board@quark-bsp spi-quark-board@quark-bsp sqlite3@core +srdfdom@ros-layer +std-msgs@ros-layer strace@core swig@core swupd-client@meta-swupd @@ -341,10 +425,17 @@ systemd@core taglib@core tbb@openembedded-layer tcp-smack-test@security-smack +tf-conversions@ros-layer +tf2-msgs@ros-layer +tf2-py@ros-layer +tf2-ros@ros-layer +tf2@ros-layer +tf@ros-layer thermald@intel thin-provisioning-tools@openembedded-layer tiff@core tpm-tools@security +trajectory-msgs@ros-layer tremor@core trousers@security twm@openembedded-layer @@ -354,6 +445,11 @@ udp-smack-test@security-smack update-rc.d@core upm-test@iotqa upm@refkit-core +urdf-parser-plugin@ros-layer +urdf@ros-layer +urdfdom-headers@ros-layer +urdfdom-py@ros-layer +urdfdom@ros-layer util-linux@core util-macros@core v4l-utils@openembedded-layer @@ -362,6 +458,7 @@ valgrind@core videoproto@core viennacl@refkit-computervision vim@openembedded-layer +visualization-msgs@ros-layer volatile-binds@core wayland-protocols@core wayland@core @@ -393,6 +490,7 @@ xinput-calibrator@core xinput@core xkbcomp@core xkeyboard-config@core +xmlrpcpp@ros-layer xmodmap@core xproto@core xrandr@core diff --git a/meta-refkit/conf/distro/refkit.conf b/meta-refkit/conf/distro/refkit.conf index a0662ac69c..0740da816b 100644 --- a/meta-refkit/conf/distro/refkit.conf +++ b/meta-refkit/conf/distro/refkit.conf @@ -194,3 +194,6 @@ PACKAGE_ARCH_pn-rhino = "${TUNE_PKGARCH}" # re-use uninative shim released by Yocto Project / OE require conf/distro/include/yocto-uninative.inc INHERIT += "uninative" + +# Make ROS use python3 to run its core scripts +ROS_USE_PYTHON3 = "yes" diff --git a/meta-refkit/conf/layer.conf b/meta-refkit/conf/layer.conf index 9ba5d9ecda..cfc17a617b 100644 --- a/meta-refkit/conf/layer.conf +++ b/meta-refkit/conf/layer.conf @@ -33,7 +33,7 @@ REFKIT_LOCALCONF_VERSION = "3" LOCALCONF_VERSION = "${REFKIT_LOCALCONF_VERSION}" # Same for LCONF_VERSION in bblayer.conf.sample. -REFKIT_LAYER_CONF_VERSION = "4" +REFKIT_LAYER_CONF_VERSION = "5" LAYER_CONF_VERSION = "${REFKIT_LAYER_CONF_VERSION}" # The default error messages use shell meta* wildcards to find the @@ -50,6 +50,7 @@ LAYERDEPENDS_refkit = " \ intel \ refkit-gateway \ refkit-computervision \ + refkit-industrial \ oic \ iotweb \ iotqa \ diff --git a/meta-ros b/meta-ros new file mode 160000 index 0000000000..88ce15453a --- /dev/null +++ b/meta-ros @@ -0,0 +1 @@ +Subproject commit 88ce15453a140c9c80e7793563ac558635afc956