From 799e2fb7de956177e162d04253c6acba423586b7 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Wed, 9 Jan 2019 14:58:47 +0000 Subject: [PATCH 1/6] fix wrongly commited in #61 --- test/test-geneus.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test-geneus.test b/test/test-geneus.test index 2b91437..08e7a12 100644 --- a/test/test-geneus.test +++ b/test/test-geneus.test @@ -1,5 +1,5 @@ - - + + From 73de4ec119eb17062af70f5c3f37b7767a0b2b7a Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Thu, 10 Jan 2019 01:30:52 +0000 Subject: [PATCH 2/6] fix https://github.com/jsk-ros-pkg/geneus/pull/61/commits/ef9868e4e621297449e5931453fbe4582a542ca4 --- src/geneus/generate.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/geneus/generate.py b/src/geneus/generate.py index 605511f..443dfd3 100644 --- a/src/geneus/generate.py +++ b/src/geneus/generate.py @@ -307,12 +307,13 @@ def write_accessors(s, spec): s.write('(:%s'%field.name) var = '_%s'%field.name with Indent(s, inc=1): - if field.is_builtin and field.type == "bool": - s.write('(&optional _%s)'%var) - s.write('(if _%s (setq %s _%s)) %s)'%(var,var,var,var)) - elif field.type == "bool": - s.write('(&optional (_%s :null))'%var) - s.write('(if (not (eq _%s :null)) (setq %s _%s)) %s)'%(var,var,var,var)) + if field.is_builtin: + if field.type == "bool": + s.write('(&optional (_%s :null))'%var) + s.write('(if (not (eq _%s :null)) (setq %s _%s)) %s)'%(var,var,var,var)) + else: + s.write('(&optional _%s)'%var) + s.write('(if _%s (setq %s _%s)) %s)'%(var,var,var,var)) else: s.write('(&rest _%s)'%var) s.write('(if (keywordp (car _%s))'%var) From c4effd80618a4db380cb42d47109e1078bd73f78 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Sat, 12 Jan 2019 08:05:44 +0000 Subject: [PATCH 3/6] .travis.sh: add comments --- .travis.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.sh b/.travis.sh index 54a8ad9..10a47fc 100644 --- a/.travis.sh +++ b/.travis.sh @@ -24,6 +24,9 @@ sudo apt-get update -qq sudo apt-get install -qq -y python-catkin-pkg python-rosdep python-wstool python-catkin-tools ros-$ROS_DISTRO-catkin sudo rosdep init rosdep update; while [ $? != 0 ]; do sleep 1; rosdep update; done +### +### theck if ${BUILDER} works for common messages +### mkdir -p ~/ros/ws_$REPOSITORY_NAME/src cd ~/ros/ws_$REPOSITORY_NAME/src ln -s $CI_SOURCE_PATH . # Link the repo we are testing to the new workspace @@ -45,12 +48,17 @@ ${BUILDER} $ROS_PARALLEL_JOBS ## test for roseus sudo apt-get install -qq -y ros-${ROS_DISTRO}-roseus sudo dpkg -r --force-depends ros-${ROS_DISTRO}-geneus +### +### theck if ${BUILDER} works with test code +### ## need to use latest test codes rm -fr devel build src/* cd src +# clone only roseus package git clone http://github.com/jsk-ros-pkg/jsk_roseus /tmp/jsk_roseus (cd /tmp/jsk_roseus; git checkout `git describe --abbrev=0 --tags`) cp -r /tmp/jsk_roseus/roseus ./ +# copy geneus package ##- sudo wget https://raw.githubusercontent.com/k-okada/jsk_roseus/fix_generate_all/roseus/scripts/generate-all-msg-srv.sh -O /opt/ros/hydro/share/roseus/scripts/generate-all-msg-srv.sh ln -s $CI_SOURCE_PATH . # Link the repo we are testing to the new workspace cd .. From 5aa8389d646dca581ace2a83a741d8a39496621c Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Sat, 12 Jan 2019 08:07:41 +0000 Subject: [PATCH 4/6] copy std_msgs repository for geneus test codes --- .travis.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.sh b/.travis.sh index 10a47fc..7efdbaf 100644 --- a/.travis.sh +++ b/.travis.sh @@ -58,6 +58,8 @@ cd src git clone http://github.com/jsk-ros-pkg/jsk_roseus /tmp/jsk_roseus (cd /tmp/jsk_roseus; git checkout `git describe --abbrev=0 --tags`) cp -r /tmp/jsk_roseus/roseus ./ +# clone std_msgs which is required by test codes +git clone https://github.com/ros-gbp/std_msgs-release.git std_msgs -b release/${ROS_DISTRO}/std_msgs # copy geneus package ##- sudo wget https://raw.githubusercontent.com/k-okada/jsk_roseus/fix_generate_all/roseus/scripts/generate-all-msg-srv.sh -O /opt/ros/hydro/share/roseus/scripts/generate-all-msg-srv.sh ln -s $CI_SOURCE_PATH . # Link the repo we are testing to the new workspace From f069340df17e2a9f5cccba3bcbbf2f2910f87874 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Sat, 12 Jan 2019 09:05:59 +0000 Subject: [PATCH 5/6] =?UTF-8?q?.travis.sh:=20fix=20script=20errors=20with?= =?UTF-8?q?=20=C2=A5=20=3D=3D=20->=20=C2=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.sh b/.travis.sh index 7efdbaf..b6ec248 100644 --- a/.travis.sh +++ b/.travis.sh @@ -43,7 +43,7 @@ rosdep install -q -n --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y # script: source /opt/ros/$ROS_DISTRO/setup.bash ## on indigo we have to compile geneus before other packages.. -if [ ${BUILDER} == "catkin_make" ]; then ${BUILDER} geneus $ROS_PARALLEL_JOBS; rm -fr build; source devel/setup.bash; fi +if [ "${BUILDER}" == "catkin_make" ]; then ${BUILDER} geneus $ROS_PARALLEL_JOBS; rm -fr build; source devel/setup.bash; fi ${BUILDER} $ROS_PARALLEL_JOBS ## test for roseus sudo apt-get install -qq -y ros-${ROS_DISTRO}-roseus @@ -67,14 +67,14 @@ cd .. ## check roseus source /opt/ros/$ROS_DISTRO/setup.bash rm -fr build devel # need to clean up to check #42 case -if [ ${BUILDER} == "catkin_make" ]; then ${BUILDER} --only-pkg-with-deps geneus $ROS_PARALLEL_JOBS; rm -fr build; source devel/setup.bash; fi +if [ "${BUILDER}" == "catkin_make" ]; then ${BUILDER} --only-pkg-with-deps geneus $ROS_PARALLEL_JOBS; rm -fr build; source devel/setup.bash; fi ${BUILDER} source devel*/setup.bash -if [ ${BUILDER} == "catkin_make_isolated" ] ; then cat devel_isolated/roseus/share/roseus/ros/roseus/manifest.l; fi -if [ ${BUILDER} != "catkin_make_isolated" ] ; then cat devel/share/roseus/ros/roseus/manifest.l; fi +if [ "${BUILDER}" == "catkin_make_isolated" ] ; then cat devel_isolated/roseus/share/roseus/ros/roseus/manifest.l; fi +if [ "${BUILDER}" != "catkin_make_isolated" ] ; then cat devel/share/roseus/ros/roseus/manifest.l; fi ## check https://github.com/jsk-ros-pkg/geneus/pull/42 -if [ ${BUILDER} == "catkin_make_isolated" ] ; then [ `grep -c -e "/opt/ros/${ROS_DISTRO}/share/roseus/package.xml" devel_isolated/roseus/share/roseus/ros/roseus/manifest.l` != 1 ]; fi -if [ ${BUILDER} != "catkin_make_isolated" ] ; then [ `grep -c -e "/opt/ros/${ROS_DISTRO}/share/roseus/package.xml" devel/share/roseus/ros/roseus/manifest.l` != 1 ]; fi +if [ "${BUILDER}" == "catkin_make_isolated" ] ; then [ `grep -c -e "/opt/ros/${ROS_DISTRO}/share/roseus/package.xml" devel_isolated/roseus/share/roseus/ros/roseus/manifest.l` != 1 ]; fi +if [ "${BUILDER}" != "catkin_make_isolated" ] ; then [ `grep -c -e "/opt/ros/${ROS_DISTRO}/share/roseus/package.xml" devel/share/roseus/ros/roseus/manifest.l` != 1 ]; fi rostest geneus test-geneus.test rostest roseus test-genmsg.catkin.test rostest roseus test-genmsg-oneworkspace.catkin.launch @@ -86,7 +86,7 @@ rosdep install -q -r -n --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y sudo dpkg -r --force-depends ros-${ROS_DISTRO}-geneus rm -fr build devel install logs .catkin* source /opt/ros/$ROS_DISTRO/setup.bash -if [ ${BUILDER} == "catkin_make" ]; then ${BUILDER} --only-pkg-with-deps geneus $ROS_PARALLEL_JOBS; rm -fr build; source devel/setup.bash; fi +if [ "${BUILDER}" == "catkin_make" ]; then ${BUILDER} --only-pkg-with-deps geneus $ROS_PARALLEL_JOBS; rm -fr build; source devel/setup.bash; fi ${BUILDER} source devel*/setup.bash rostest pr2eus default-ri-test.test From 18879360a6ff6a4f129e53f1168f6792aaaf20fe Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Sat, 12 Jan 2019 09:09:24 +0000 Subject: [PATCH 6/6] .travis: catkin build needs to run with geneus first, befor compiling std_msgs --- .travis.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.sh b/.travis.sh index b6ec248..319ddad 100644 --- a/.travis.sh +++ b/.travis.sh @@ -68,6 +68,7 @@ cd .. source /opt/ros/$ROS_DISTRO/setup.bash rm -fr build devel # need to clean up to check #42 case if [ "${BUILDER}" == "catkin_make" ]; then ${BUILDER} --only-pkg-with-deps geneus $ROS_PARALLEL_JOBS; rm -fr build; source devel/setup.bash; fi +if [ "${BUILDER}" == "catkin build" ]; then ${BUILDER} geneus $ROS_PARALLEL_JOBS; source devel/setup.bash; fi ${BUILDER} source devel*/setup.bash if [ "${BUILDER}" == "catkin_make_isolated" ] ; then cat devel_isolated/roseus/share/roseus/ros/roseus/manifest.l; fi @@ -87,6 +88,7 @@ sudo dpkg -r --force-depends ros-${ROS_DISTRO}-geneus rm -fr build devel install logs .catkin* source /opt/ros/$ROS_DISTRO/setup.bash if [ "${BUILDER}" == "catkin_make" ]; then ${BUILDER} --only-pkg-with-deps geneus $ROS_PARALLEL_JOBS; rm -fr build; source devel/setup.bash; fi +if [ "${BUILDER}" == "catkin build" ]; then ${BUILDER} geneus $ROS_PARALLEL_JOBS; source devel/setup.bash; fi ${BUILDER} source devel*/setup.bash rostest pr2eus default-ri-test.test