├── .github └── workflows │ ├── kinetic_xenial.yml │ ├── melodic_bionic.yml │ ├── noetic_focal.yml │ └── ros.yml ├── .gitignore ├── CHANGELOG.rst ├── CMakeLists.txt ├── CMakeLists_catkin.txt ├── LICENSE ├── README.md ├── app ├── alrosbridge.pml ├── manifest.xml └── run.sh ├── doc ├── Doxyfile └── source │ ├── ToggleDirective.py │ ├── api.rst │ ├── conf.py │ ├── index.rst │ ├── install.rst │ ├── next.rst │ ├── other.rst │ ├── start.rst │ ├── topics.rst │ └── trouble.rst ├── include └── naoqi_driver │ ├── converter │ └── converter.hpp │ ├── event │ └── event.hpp │ ├── message_actions.h │ ├── naoqi_driver.hpp │ ├── publisher │ └── publisher.hpp │ ├── recorder │ ├── globalrecorder.hpp │ └── recorder.hpp │ ├── service │ └── service.hpp │ ├── subscriber │ └── subscriber.hpp │ └── tools.hpp ├── launch └── naoqi_driver.launch ├── msg └── README ├── package.xml ├── qiproject.xml ├── share ├── boot_config.json ├── nao.rviz ├── pepper.rviz └── urdf │ ├── nao.urdf │ ├── pepper.urdf │ └── romeo.urdf └── src ├── autoload_registration.cpp ├── converters ├── audio.cpp ├── audio.hpp ├── camera.cpp ├── camera.hpp ├── camera_info_definitions.hpp ├── converter_base.hpp ├── diagnostics.cpp ├── diagnostics.hpp ├── imu.cpp ├── imu.hpp ├── info.cpp ├── info.hpp ├── joint_state.cpp ├── joint_state.hpp ├── laser.cpp ├── laser.hpp ├── log.cpp ├── log.hpp ├── memory │ ├── bool.cpp │ ├── bool.hpp │ ├── float.cpp │ ├── float.hpp │ ├── int.cpp │ ├── int.hpp │ ├── string.cpp │ └── string.hpp ├── memory_list.cpp ├── memory_list.hpp ├── nao_footprint.hpp ├── odom.cpp ├── odom.hpp ├── sonar.cpp ├── sonar.hpp ├── touch.cpp └── touch.hpp ├── driver_authenticator.hpp ├── event ├── audio.cpp ├── audio.hpp ├── basic.hpp ├── basic.hxx ├── touch.cpp └── touch.hpp ├── external_registration.cpp ├── helpers ├── driver_helpers.cpp ├── driver_helpers.hpp ├── filesystem_helpers.hpp ├── naoqi_helpers.hpp ├── recorder_helpers.hpp └── transform_helpers.hpp ├── naoqi_driver.cpp ├── naoqi_env.hpp ├── publishers ├── basic.hpp ├── camera.cpp ├── camera.hpp ├── info.cpp ├── info.hpp ├── joint_state.cpp ├── joint_state.hpp ├── log.cpp ├── log.hpp ├── memory │ ├── bool.cpp │ ├── bool.hpp │ ├── float.cpp │ ├── float.hpp │ ├── int.cpp │ ├── int.hpp │ ├── string.cpp │ └── string.hpp ├── sonar.cpp └── sonar.hpp ├── recorder ├── basic.hpp ├── basic_event.hpp ├── camera.cpp ├── camera.hpp ├── diagnostics.cpp ├── diagnostics.hpp ├── globalrecorder.cpp ├── joint_state.cpp ├── joint_state.hpp ├── log.cpp ├── log.hpp ├── sonar.cpp └── sonar.hpp ├── ros_env.hpp ├── services ├── get_language.cpp ├── get_language.hpp ├── robot_config.cpp ├── robot_config.hpp ├── set_language.cpp └── set_language.hpp ├── subscribers ├── moveto.cpp ├── moveto.hpp ├── speech.cpp ├── speech.hpp ├── subscriber_base.hpp ├── teleop.cpp └── teleop.hpp └── tools ├── alvisiondefinitions.h ├── from_any_value.cpp ├── from_any_value.hpp ├── naoqi_image.hpp ├── robot_description.cpp └── robot_description.hpp /.github/workflows/kinetic_xenial.yml: -------------------------------------------------------------------------------- 1 | name: ros-kinetic-xenial 2 | 3 | on: 4 | push 5 | 6 | jobs: 7 | ros_kinetic_xenial_ci: 8 | name: kinetic (xenial) 9 | uses: ./.github/workflows/ros.yml 10 | with: 11 | ROS_DISTRO: kinetic 12 | ROS_REPO: testing 13 | OS_NAME: ubuntu 14 | OS_CODE_NAME: xenial 15 | ALLOW_FAIL: false -------------------------------------------------------------------------------- /.github/workflows/melodic_bionic.yml: -------------------------------------------------------------------------------- 1 | name: ros-melodic-bionic 2 | 3 | on: 4 | push 5 | 6 | jobs: 7 | ros_melodic_bionic_ci: 8 | name: melodic (bionic) 9 | uses: ./.github/workflows/ros.yml 10 | with: 11 | ROS_DISTRO: melodic 12 | ROS_REPO: testing 13 | OS_NAME: ubuntu 14 | OS_CODE_NAME: bionic 15 | ALLOW_FAIL: false -------------------------------------------------------------------------------- /.github/workflows/noetic_focal.yml: -------------------------------------------------------------------------------- 1 | name: ros-noetic-focal 2 | 3 | on: 4 | push 5 | 6 | jobs: 7 | ros_noetic_focal_ci: 8 | name: noetic (focal) 9 | uses: ./.github/workflows/ros.yml 10 | with: 11 | ROS_DISTRO: noetic 12 | ROS_REPO: testing 13 | OS_NAME: ubuntu 14 | OS_CODE_NAME: focal 15 | ALLOW_FAIL: false -------------------------------------------------------------------------------- /.github/workflows/ros.yml: -------------------------------------------------------------------------------- 1 | name: ros 2 | 3 | on: 4 | workflow_call: 5 | inputs: 6 | ROS_DISTRO: 7 | required: true 8 | type: string 9 | ROS_REPO: 10 | required: true 11 | type: string 12 | OS_NAME: 13 | required: true 14 | type: string 15 | OS_CODE_NAME: 16 | required: true 17 | type: string 18 | ALLOW_FAIL: 19 | required: true 20 | type: boolean 21 | 22 | jobs: 23 | ros_ci: 24 | name: ROS 25 | runs-on: ubuntu-latest 26 | continue-on-error: ${{ inputs.ALLOW_FAIL }} 27 | env: 28 | CCACHE_DIR: "${{ github.workspace }}/.ccache" 29 | steps: 30 | - name: Check out the naoqi_driver repo 31 | uses: actions/checkout@v2 32 | - name: Fetch/store directory used by ccache 33 | uses: actions/cache@v2 34 | with: 35 | path: ${{ env.CCACHE_DIR }} 36 | key: ccache-${{ inputs.ROS_DISTRO }}-${{ inputs.ROS_REPO }}-${{github.run_id}} 37 | restore-keys: | 38 | ccache-${{ inputs.ROS_DISTRO }}-${{ inputs.ROS_REPO }}- 39 | - name: Run industrial CI 40 | uses: 'ros-industrial/industrial_ci@master' 41 | env: ${{ inputs }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build* 2 | doc/* 3 | !doc/source/* 4 | !doc/Doxyfile 5 | *.pro 6 | *.pro.user 7 | .vscode/ -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(naoqi_driver) 2 | cmake_minimum_required(VERSION 3.0.2) 3 | 4 | # define source files that can be used by qibuild or catkin 5 | set( 6 | CONVERTERS_SRC 7 | src/converters/audio.cpp 8 | src/converters/touch.cpp 9 | src/converters/camera.cpp 10 | src/converters/diagnostics.cpp 11 | src/converters/imu.cpp 12 | src/converters/info.cpp 13 | src/converters/joint_state.cpp 14 | src/converters/laser.cpp 15 | src/converters/memory_list.cpp 16 | src/converters/memory/bool.cpp 17 | src/converters/memory/int.cpp 18 | src/converters/memory/float.cpp 19 | src/converters/memory/string.cpp 20 | src/converters/sonar.cpp 21 | src/converters/log.cpp 22 | src/converters/odom.cpp 23 | ) 24 | set( 25 | TOOLS_SRC 26 | src/tools/robot_description.cpp 27 | src/tools/from_any_value.cpp 28 | ) 29 | 30 | set( 31 | PUBLISHER_SRC 32 | src/publishers/camera.cpp 33 | src/publishers/info.cpp 34 | src/publishers/joint_state.cpp 35 | src/publishers/log.cpp 36 | src/publishers/sonar.cpp 37 | ) 38 | 39 | set( 40 | SUBSCRIBER_SRC 41 | src/subscribers/teleop.cpp 42 | src/subscribers/moveto.cpp 43 | src/subscribers/speech.cpp 44 | ) 45 | 46 | set( 47 | SERVICES_SRC 48 | src/services/robot_config.cpp 49 | src/services/set_language.cpp 50 | src/services/get_language.cpp 51 | ) 52 | 53 | set( 54 | RECORDER_SRC 55 | src/recorder/camera.cpp 56 | src/recorder/diagnostics.cpp 57 | src/recorder/joint_state.cpp 58 | src/recorder/log.cpp 59 | src/recorder/sonar.cpp 60 | ) 61 | 62 | set( 63 | DRIVER_SRC 64 | src/naoqi_driver.cpp 65 | src/helpers/driver_helpers.cpp 66 | src/recorder/globalrecorder.cpp 67 | src/event/basic.hxx 68 | src/event/basic.hpp 69 | src/event/audio.cpp 70 | src/event/touch.cpp 71 | ) 72 | 73 | # use catkin if qibuild is not found 74 | if(DEFINED qibuild_DIR) 75 | find_package(qibuild QUIET) 76 | else() 77 | find_package(catkin QUIET) 78 | include(CMakeLists_catkin.txt) 79 | return() 80 | endif() 81 | 82 | find_package(qimodule) 83 | 84 | include_directories( include ) 85 | 86 | qi_create_module( 87 | naoqi_driver_module 88 | src/autoload_registration.cpp 89 | SHARED 90 | ) 91 | qi_stage_lib( naoqi_driver_module ) 92 | 93 | qi_create_lib( 94 | naoqi_driver 95 | SHARED 96 | ${DRIVER_SRC} 97 | ${CONVERTERS_SRC} 98 | ${PUBLISHER_SRC} 99 | ${SUBSCRIBER_SRC} 100 | ${SERVICES_SRC} 101 | ${RECORDER_SRC} 102 | ${TOOLS_SRC} 103 | ) 104 | qi_use_lib( naoqi_driver QICORE QI ROS ) 105 | qi_stage_lib( naoqi_driver ) 106 | 107 | target_link_libraries( 108 | naoqi_driver_module 109 | naoqi_driver 110 | ) 111 | 112 | qi_create_bin( naoqi_driver_node src/external_registration.cpp) 113 | target_link_libraries( 114 | naoqi_driver_node 115 | naoqi_driver 116 | ) 117 | 118 | # install the urdf for runtime loading 119 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/share/" DESTINATION "${QI_SDK_DIR}/${QI_SDK_SHARE}/") 120 | qi_install_data( share/) 121 | -------------------------------------------------------------------------------- /CMakeLists_catkin.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | # Add pre-processor compile flag indicating catkin 3 | add_definitions( -DCATKIN_BUILD ) 4 | 5 | # CMake file that uses catkin 6 | find_package(catkin COMPONENTS 7 | cv_bridge 8 | diagnostic_msgs 9 | diagnostic_updater 10 | geometry_msgs 11 | image_transport 12 | kdl_parser 13 | naoqi_bridge_msgs 14 | naoqi_libqi 15 | naoqi_libqicore 16 | robot_state_publisher 17 | rosbag_storage 18 | rosconsole 19 | rosgraph_msgs 20 | sensor_msgs 21 | tf2_geometry_msgs 22 | tf2_msgs 23 | tf2_ros 24 | ) 25 | find_package(OpenCV) 26 | find_package(orocos_kdl) 27 | 28 | add_definitions(-DLIBQI_VERSION=${naoqi_libqi_VERSION_MAJOR}${naoqi_libqi_VERSION_MINOR}) 29 | 30 | catkin_package(LIBRARIES naoqi_driver_module naoqi_driver) 31 | 32 | include_directories( include ${catkin_INCLUDE_DIRS}) 33 | 34 | # create the different libraries 35 | add_library( 36 | naoqi_driver_module 37 | SHARED 38 | src/autoload_registration.cpp 39 | ) 40 | target_link_libraries(naoqi_driver_module ${naoqi_libqi_LIBRARIES}) 41 | install(TARGETS naoqi_driver_module DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}) 42 | 43 | add_library( 44 | naoqi_driver 45 | SHARED 46 | ${DRIVER_SRC} 47 | ${CONVERTERS_SRC} 48 | ${PUBLISHER_SRC} 49 | ${SUBSCRIBER_SRC} 50 | ${SERVICES_SRC} 51 | ${RECORDER_SRC} 52 | ${TOOLS_SRC} 53 | ) 54 | target_link_libraries( 55 | naoqi_driver 56 | ${catkin_LIBRARIES} 57 | ${OpenCV_LIBRARIES} 58 | ${orocos_kdl_LIBRARIES} 59 | ) 60 | add_dependencies(naoqi_driver ${catkin_EXPORTED_TARGETS}) 61 | install(TARGETS naoqi_driver DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}) 62 | 63 | target_link_libraries( 64 | naoqi_driver_module 65 | naoqi_driver 66 | ) 67 | 68 | # create the binary of the bridge 69 | add_executable( naoqi_driver_node src/external_registration.cpp) 70 | target_link_libraries( 71 | naoqi_driver_node 72 | naoqi_driver 73 | ${catkin_LIBRARIES} 74 | ) 75 | install(TARGETS naoqi_driver_node DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) 76 | 77 | # install the urdf for runtime loading 78 | file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/share" DESTINATION "${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/") 79 | install(DIRECTORY share DESTINATION "${CATKIN_PACKAGE_SHARE_DESTINATION}") 80 | 81 | # install the launch files 82 | install(DIRECTORY launch DESTINATION "${CATKIN_PACKAGE_SHARE_DESTINATION}") 83 | 84 | # make sure there is a file describing a naoqi module 85 | file(WRITE ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/qi/module/naoqi_driver_module.mod "cpp") 86 | install(FILES ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/qi/module/naoqi_driver_module.mod DESTINATION ${CATKIN_GLOBAL_SHARE_DESTINATION}/qi/module/) 87 | -------------------------------------------------------------------------------- /app/alrosbridge.pml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/run.sh: -------------------------------------------------------------------------------- 1 | touch .catkin 2 | source setup.bash 3 | exec bin/naoqi_driver_node &>> naoqi_driver_node.log 4 | -------------------------------------------------------------------------------- /doc/source/ToggleDirective.py: -------------------------------------------------------------------------------- 1 | # Directive that shows a toggle link between sections. 2 | # Those sections cannot contain titles 3 | # The first one is initially showed. Here is the syntax: 4 | # .. toggle_table:: 5 | # :arg1: text in button 1 6 | # :arg2: text in button 2 7 | # 8 | # .. toggle:: text in button 1 9 | # 10 | # some RST text 11 | # 12 | #.. toggle:: text in button 2 13 | # 14 | # some more RST text 15 | import docutils 16 | from docutils import nodes 17 | from docutils.parsers.rst import directives, roles, states 18 | 19 | def setup(app): 20 | app.add_directive('toggle', ToggleDirective) 21 | app.add_directive('toggle_table', ToggleTableDirective) 22 | 23 | class ToggleDirective(docutils.parsers.rst.Directive): 24 | """ 25 | Base class that will be used by the two toggle directives 26 | """ 27 | required_arguments = 1 28 | optional_arguments = 0 29 | final_argument_whitespace = True 30 | option_spec = {} 31 | has_content = True 32 | node_class = nodes.container 33 | 34 | def run(self): 35 | self.assert_has_content() 36 | text = '\n'.join(self.content) 37 | # Create the node, to be populated by `nested_parse`. 38 | node = self.node_class(rawsource=text) 39 | label = self.arguments[0] 40 | label_strip = label.replace(' ', '') 41 | node += nodes.raw(self.arguments[0], '
' % label_strip, format="html") 42 | 43 | # Parse the directive contents. 44 | self.state.nested_parse(self.content, self.content_offset, node) 45 | node += nodes.raw(self.arguments[0], '
', format="html") 46 | return [node] 47 | 48 | class ToggleTableDirective(docutils.parsers.rst.Directive): 49 | """ 50 | Class used to create a set of buttons to toggle different sections 51 | """ 52 | required_arguments = 0 53 | optional_arguments = 10 54 | final_argument_whitespace = True 55 | option_spec = {} 56 | for i in xrange(0, 100): 57 | option_spec['arg' + str(i)] = str 58 | has_content = True 59 | node_class = nodes.container 60 | 61 | def run(self): 62 | js_toggle = """ 63 | function toggle(label) { 64 | $('.toggleable_button').css({border: '2px outset', 'border-radius': '4px'}); 65 | $('.toggleable_button.label_' + label).css({border: '2px inset', 'border-radius': '4px'}); 66 | $('.toggleable_div').css('display', 'none'); 67 | $('.toggleable_div.label_' + label).css('display', 'block'); 68 | }; 69 | """ 70 | 71 | js_ready = """ 72 | 83 | """ % js_toggle 84 | 85 | # Create the node, to be populated by `nested_parse`. 86 | node = self.node_class() 87 | for key in self.options.keys(): 88 | if key not in self.option_spec: 89 | raise RuntimeError(key + ' not in the contructor of ToggleTableDirective, use arg0 to arg99') 90 | label = self.options[key] 91 | label_strip = label.replace(' ', '') 92 | str1 = '