Skip to content

Commit

Permalink
package px4 with sitl_gazebo for jenkins ROS tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lamping7 committed Apr 30, 2018
1 parent 8404889 commit de255a3
Show file tree
Hide file tree
Showing 2 changed files with 172 additions and 57 deletions.
148 changes: 94 additions & 54 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,28 @@ pipeline {
builds["eagle (linux)"] = createBuildNodeDockerLogin(docker_snapdragon, 'docker_hub_dagar', 'posix_eagle_default')
builds["eagle (qurt)"] = createBuildNodeDockerLogin(docker_snapdragon, 'docker_hub_dagar', 'qurt_eagle_default')

// posix_sitl_default with package
builds["sitl"] = {
node {
stage("Build Test sitl") {
docker.image(docker_ros).inside('-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE') {
stage("sitl") {
checkout scm
sh "export"
sh "make distclean"
sh "ccache -z"
sh "make posix_sitl_default"
sh "ccache -s"
sh "make posix_sitl_default sitl_gazebo"
sh "make posix_sitl_default package"
stash name: "px4_sitl_package", includes: "build/posix_sitl_default/*.zip"
sh "make distclean"
}
}
}
}
}

// MAC OS posix_sitl_default
builds["sitl (OSX)"] = {
node("mac") {
Expand Down Expand Up @@ -250,15 +272,17 @@ pipeline {
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=standard_vtol'
sh './Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
unstash 'px4_sitl_package'
sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip'
sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/'
sh 'chmod +x px4-posix_sitl_default*/share/px4/px4'
sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py'
sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=standard_vtol'
sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
}
post {
always {
sh './Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.pdf'
archiveArtifacts '.ros/**/*.csv'
sh 'make distclean'
Expand All @@ -281,15 +305,17 @@ pipeline {
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=tailsitter'
sh './Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
unstash 'px4_sitl_package'
sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip'
sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/'
sh 'chmod +x px4-posix_sitl_default*/share/px4/px4'
sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py'
sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=tailsitter'
sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
}
post {
always {
sh './Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.pdf'
archiveArtifacts '.ros/**/*.csv'
sh 'make distclean'
Expand All @@ -312,15 +338,17 @@ pipeline {
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=tiltrotor'
sh './Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
unstash 'px4_sitl_package'
sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip'
sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/'
sh 'chmod +x px4-posix_sitl_default*/share/px4/px4'
sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py'
sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=tiltrotor'
sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
}
post {
always {
sh './Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.pdf'
archiveArtifacts '.ros/**/*.csv'
sh 'make distclean'
Expand All @@ -343,15 +371,17 @@ pipeline {
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_2 vehicle:=standard_vtol'
sh './Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
unstash 'px4_sitl_package'
sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip'
sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/'
sh 'chmod +x px4-posix_sitl_default*/share/px4/px4'
sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py'
sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_2 vehicle:=standard_vtol'
sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
}
post {
always {
sh './Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.pdf'
archiveArtifacts '.ros/**/*.csv'
sh 'make distclean'
Expand All @@ -374,15 +404,17 @@ pipeline {
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_1 vehicle:=standard_vtol'
sh './Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
unstash 'px4_sitl_package'
sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip'
sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/'
sh 'chmod +x px4-posix_sitl_default*/share/px4/px4'
sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py'
sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_1 vehicle:=standard_vtol'
sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
}
post {
always {
sh './Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.pdf'
archiveArtifacts '.ros/**/*.csv'
sh 'make distclean'
Expand All @@ -405,15 +437,17 @@ pipeline {
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_2 vehicle:=standard_vtol'
sh './Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
unstash 'px4_sitl_package'
sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip'
sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/'
sh 'chmod +x px4-posix_sitl_default*/share/px4/px4'
sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py'
sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_old_2 vehicle:=standard_vtol'
sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
}
post {
always {
sh './Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.pdf'
archiveArtifacts '.ros/**/*.csv'
sh 'make distclean'
Expand All @@ -436,15 +470,17 @@ pipeline {
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=multirotor_box vehicle:=iris'
sh './Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
unstash 'px4_sitl_package'
sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip'
sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/'
sh 'chmod +x px4-posix_sitl_default*/share/px4/px4'
sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mission_test.py'
sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=multirotor_box vehicle:=iris'
sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
}
post {
always {
sh './Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.pdf'
archiveArtifacts '.ros/**/*.csv'
sh 'make distclean'
Expand All @@ -467,15 +503,17 @@ pipeline {
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test'
sh './Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
unstash 'px4_sitl_package'
sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip'
sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/'
sh 'chmod +x px4-posix_sitl_default*/share/px4/px4'
sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mavros_offboard_attctl_test.py'
sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test'
sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
}
post {
always {
sh './Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.pdf'
archiveArtifacts '.ros/**/*.csv'
sh 'make distclean'
Expand All @@ -498,15 +536,17 @@ pipeline {
steps {
sh 'export'
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
sh 'git fetch --tags'
sh 'make posix_sitl_default'
sh 'make posix_sitl_default sitl_gazebo'
sh './test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test'
sh './Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
unstash 'px4_sitl_package'
sh 'unzip build/posix_sitl_default/px4-posix_sitl_default*.zip'
sh 'mv px4-posix_sitl_default*/bin/px4 px4-posix_sitl_default*/share/px4/'
sh 'chmod +x px4-posix_sitl_default*/share/px4/px4'
sh 'chmod +x px4-posix_sitl_default*/share/px4/integrationtests/python_src/px4_it/mavros/mavros_offboard_posctl_test.py'
sh 'bash px4-posix_sitl_default*/share/px4/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test'
sh 'python px4-posix_sitl_default*/share/px4/Tools/ecl_ekf/process_logdata_ekf.py `find . -name *.ulg -print -quit`'
}
post {
always {
sh './Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
sh 'python px4-posix_sitl_default*/share/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/rootfs/fs/microsd/log/*/*.ulg'
archiveArtifacts '.ros/**/*.pdf'
archiveArtifacts '.ros/**/*.csv'
sh 'make distclean'
Expand Down
81 changes: 78 additions & 3 deletions platforms/posix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,81 @@ endif()
# install
#

install(TARGETS px4 DESTINATION ${CMAKE_INSTALL_BINDIR})
install(DIRECTORY ${PROJECT_SOURCE_DIR}/ROMFS DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
install(DIRECTORY ${PROJECT_SOURCE_DIR}/posix-configs DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME})
# px4 app
install(
TARGETS
px4
DESTINATION
${CMAKE_INSTALL_BINDIR}
)

# px4 dirs
install(
DIRECTORY
${PROJECT_SOURCE_DIR}/integrationtests
${PROJECT_SOURCE_DIR}/launch
${PROJECT_SOURCE_DIR}/posix-configs
${PROJECT_SOURCE_DIR}/ROMFS
${PROJECT_SOURCE_DIR}/test
DESTINATION
${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}
)

# px4 files
install(
FILES
${PROJECT_SOURCE_DIR}/CMakeLists.txt
${PROJECT_SOURCE_DIR}/package.xml
DESTINATION
${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}
)

# px4 Tools dirs
install(
DIRECTORY
${PROJECT_SOURCE_DIR}/Tools/ecl_ekf
DESTINATION
${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/Tools
)

# px4 Tools files
install(
DIRECTORY
${PROJECT_SOURCE_DIR}/Tools
DESTINATION
${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}
FILES_MATCHING
PATTERN "setup_gazebo.bash"
PATTERN "upload_log.py"
)

# sitl_gazebo built plugins
install(
DIRECTORY
${PROJECT_SOURCE_DIR}/build/posix_sitl_default/build_gazebo
DESTINATION
${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/build/posix_sitl_default
FILES_MATCHING
PATTERN "CMakeFiles" EXCLUDE
PATTERN "*.so"
)

# sitl_gazebo dirs
install(
DIRECTORY
${PROJECT_SOURCE_DIR}/Tools/sitl_gazebo/models
${PROJECT_SOURCE_DIR}/Tools/sitl_gazebo/worlds
DESTINATION
${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/Tools/sitl_gazebo
)

# sitl_gazebo files
install(
DIRECTORY
${PROJECT_SOURCE_DIR}/Tools/sitl_gazebo
DESTINATION
${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/Tools
FILES_MATCHING
PATTERN "CMakeLists.txt"
PATTERN "package.xml"
)

0 comments on commit de255a3

Please sign in to comment.