furushchev / respeaker_ros

A ROS Package for Respeaker Mic Array
Apache License 2.0
71 stars 60 forks source link

ROS Noetic, Python 3 Updates #31

Open zacharykratochvil opened 2 years ago

zacharykratochvil commented 2 years ago

After installing on RaspberryPi 4B, Ubuntu Impish, ROS 1 Noetic, Python 3.9.7, the Respeaker array would not initialize. It required two additional dependencies not listed in package.xml and had old python 2 syntax and function calls in respeaker_node.py. After these corrections it initializes and runs well. I believe these changes are necessary for anyone running newer versions of python and ROS so others might benefit from this branch being publicly available. Not sure about their backwards compatibility though, so it may be best to leave them in a separate branch.

zacharykratochvil commented 2 years ago

Hello! I was looking for someone who made respeaker_ros work in python3 and found this PR. I did a quick review and asked some questions and I am sorry if they are unclear or sound rude, I find this PR very helpful and just want to contribute! Mirko

Hi, glad I could help! Apologies it seems I forgot to clean up my code before making the PR. There are also some changes specific to my use case in here that I forgot to make a new branch for. I just reset the branch to before that commit and also removed some of the debugging lines. Still have to test. I'll respond to your comments directly as well. Let me know if you have any more questions!

JohannaPrinz commented 2 years ago

Hey, thanks for debugging the code, so it works with ROS Noetic and Python3 I have applied all changes, but still get the following error messages:

  1. File "/opt/ros/noetic/lib/python3/dist-packages/tf2_py/init.py", line 38, in from ._tf2 import * ImportError: dynamic module does not define init function (init_tf2)

  2. File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_base.py", line 167 (eerrno, msg, *) = e.args ^ SyntaxError: invalid syntax

Can you may help me fixing this?! Thanks so much Best regards

zacharykratochvil commented 2 years ago

Hi,

Happy to help but the lines you listed don't exist in the respeaker_ros code. Either the errors are with your ros installation or you haven't given the relevant lines from the error messages.

Best, Zach

On Fri, Sep 2, 2022, 6:06 AM JohannaPrinz @.***> wrote:

Hey, thanks for debugging the code, so it works with ROS Noetic and Python3 I have applied all changes, but still get the following error messages:

1.

from ._tf2 import * ImportError: dynamic module does not define init function (init_tf2)

1.

(eerrno, msg, *) = e.args ^ SyntaxError: invalid syntax

Can you may help me fixing this?! Thanks so much Best regards

— Reply to this email directly, view it on GitHub https://github.com/furushchev/respeaker_ros/pull/31#issuecomment-1235314775, or unsubscribe https://github.com/notifications/unsubscribe-auth/APSFFUDGB4QIQY7SIWEGE7TV4HGS3ANCNFSM5USORCZQ . You are receiving this because you authored the thread.Message ID: @.***>

zacharykratochvil commented 2 years ago

All correct, thank you!

On Thu, Sep 8, 2022, 4:15 AM Severin Fichtl @.***> wrote:

@.**** commented on this pull request.

In scripts/respeaker_node.py https://github.com/furushchev/respeaker_ros/pull/31#discussion_r965646663 :

@@ -7,6 +7,7 @@ import usb.core import usb.util import pyaudio +import wave

this should be removed again as well, right? that was for the wav file you used for debugging?

— Reply to this email directly, view it on GitHub https://github.com/furushchev/respeaker_ros/pull/31#pullrequestreview-1100293648, or unsubscribe https://github.com/notifications/unsubscribe-auth/APSFFUFUCUHKRVNBZD2NWBDV5GOC5ANCNFSM5USORCZQ . You are receiving this because you authored the thread.Message ID: @.***>

hello-binit commented 1 year ago

Hi @zacharykratochvil, thank you for creating this PR! I gave it a try and it needed a few fixes to get past catkin_virtualenv related build errors. I've open a PR towards your fork to fix these build errors, address the feedback left by @S-Fichtl in this PR, and add a few additional tweaks. Let me know what you think!