Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mic remake #59

Merged
merged 10 commits into from
Jan 8, 2024
Prev Previous commit
Next Next commit
Removing lame dependency
danilo-pejovic committed Dec 29, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 95ffca16765484dc8eea5b74786a0a2ec507fd0a
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ RUN cd .$WS/src && git clone https://github.com/BrettRD/ros-gst-bridge && \
git checkout 23980326ce8c0fefc0d5d590c2bfc9d308f35a73 # Pin latest master version at the time.
RUN cd ${WS}/src && git clone --branch dai_ros_py https://github.com/luxonis/depthai-ros.git
RUN cd .$WS/ && rosdep install --from-paths src --ignore-src -y --skip-keys depthai --skip-keys depthai_bridge --skip-keys depthai_ros_driver --skip-keys audio_msgs --skip-keys laserscan_kinect --skip-keys ira_laser_tools
RUN cd .$WS/ && . /opt/ros/${ROS_DISTRO}/setup.sh && . /sai_ros/spectacularai_ros2/install/setup.sh && colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
RUN cd .$WS/ && . /opt/ros/${ROS_DISTRO}/setup.sh && . /sai_ros/spectacularai_ros2/install/setup.sh && MAKEFLAGS="-j1 -l1" colcon build --executor sequential --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
danilo-pejovic marked this conversation as resolved.
Show resolved Hide resolved
RUN echo "if [ -f ${WS}/install/setup.bash ]; then source ${WS}/install/setup.bash; fi" >> $HOME/.bashrc
RUN echo "if [ -f ${WS}/install/setup.zsh ]; then source ${WS}/install/setup.zsh; fi" >> $HOME/.zshrc
RUN chmod +x /ws/src/rae-ros/entrypoint.sh
14 changes: 4 additions & 10 deletions rae_hw/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -24,9 +24,7 @@ endif()
find_package(PkgConfig REQUIRED)
pkg_check_modules(MPG123 REQUIRED libmpg123)

# Find LAME library
find_path(LAME_INCLUDE_DIR lame/lame.h)
find_library(LAME_LIBRARY NAMES mp3lame)


# Find SNDFILE library
find_path(SNDFILE_INCLUDE_DIR sndfile.h)
@@ -36,7 +34,7 @@ find_library(SNDFILE_LIBRARY NAMES sndfile)
pkg_check_modules(GST REQUIRED gstreamer-1.0)
danilo-pejovic marked this conversation as resolved.
Show resolved Hide resolved


include_directories(include ${GST_INCLUDE_DIRS} ${MPG123_INCLUDE_DIRS} ${LAME_INCLUDE_DIR} ${SNDFILE_INCLUDE_DIR})
include_directories(include ${GST_INCLUDE_DIRS} ${MPG123_INCLUDE_DIRS} ${SNDFILE_INCLUDE_DIR})

ament_auto_add_library(
${PROJECT_NAME}
@@ -47,7 +45,6 @@ ament_auto_add_library(
src/peripherals/lcd.cpp
src/peripherals/led.cpp
src/peripherals/mic.cpp
src/audio_recorder_node.cpp
)

ament_target_dependencies(${PROJECT_NAME} ${DEPENDENCIES} ALSA std_srvs)
@@ -56,7 +53,6 @@ target_link_libraries(
${PROJECT_NAME}
${MPG123_LIBRARIES}
${GPIOD_LIBRARY}
${LAME_LIBRARY}
${SNDFILE_LIBRARY}
)

@@ -88,9 +84,7 @@ add_executable(speakers_node src/speakers_node.cpp)
ament_target_dependencies(speakers_node rclcpp audio_msgs)
target_link_libraries(speakers_node ${PROJECT_NAME})

add_executable(audio_recorder_node src/audio_recorder_node.cpp)
ament_target_dependencies(audio_recorder_node rclcpp audio_msgs)
target_link_libraries(audio_recorder_node ${PROJECT_NAME})

danilo-pejovic marked this conversation as resolved.
Show resolved Hide resolved



@@ -111,7 +105,7 @@ ament_target_dependencies(test_speed rclcpp geometry_msgs)

install(TARGETS

test_motors test_encoders test_max_speed test_speed mic_node speakers_node audio_recorder_node
test_motors test_encoders test_max_speed test_speed mic_node speakers_node

DESTINATION lib/${PROJECT_NAME})

1 change: 0 additions & 1 deletion rae_hw/package.xml
Original file line number Diff line number Diff line change
@@ -32,7 +32,6 @@

<depend>libasound2-dev</depend>
<depend>libmpg123-dev</depend>
<depend>libmp3lame-dev</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>