jsk-ros-pkg / jsk_3rdparty

42 stars 60 forks source link

[respeaker_ros] use catkin_virtualenv for respeaker_ros #410

Closed knorth55 closed 1 year ago

knorth55 commented 1 year ago

this PR changes to use catkin_virtualenv for respeaker_ros. this PR fixes the issue reported in https://github.com/jsk-ros-pkg/jsk_3rdparty/issues/409

this PR fixes SpeechRecognition version to 3.8.1, in order to avoid error caused by python2.7 support drops.

k-okada commented 1 year ago

just to be clear, how do you use respeaker_ros on PR2, whcih uses indigo?

knorth55 commented 1 year ago

i didn't check if this pr works on indigo. we use respeaker_ros for microhpone and speech_to_text

knorth55 commented 1 year ago

I checked this PR with PR2 (indigo), and it works.

k-okada commented 1 year ago

if so, can we run respeaker_ros in indogo? revert https://github.com/jsk-ros-pkg/jsk_3rdparty/pull/410/files#diff-33cc4c925f7fd36575f5e5b61d1e9c942fea5189e2c67d09720d714e19151404R23 ?

knorth55 commented 1 year ago

if so, can we run respeaker_ros in indogo?

Yes. We can run respeaker_ros in indigo. What do you mean?

knorth55 commented 1 year ago

I disabled indigo test because of catkin_virtualenv pip error. I don't know why it happens in GA and it does not happen in PR2.

2022-12-06T08:44:24.2556628Z [respeaker_ros:make]   Running setup.py (path:/github/home/ros/ws_jsk_3rdparty/build/respeaker_ros/venv/build/pip/setup.py) egg_info for package pip
2022-12-06T08:44:24.2556922Z 
2022-12-06T08:44:24.2556927Z 
2022-12-06T08:44:24.2557039Z                                                                                 
2022-12-06T08:44:24.2557300Z [respeaker_ros:make]     Traceback (most recent call last):
2022-12-06T08:44:24.2557621Z 
2022-12-06T08:44:24.2557626Z 
2022-12-06T08:44:24.2557810Z                                                                                 
2022-12-06T08:44:24.2558352Z [respeaker_ros:make]       File "<string>", line 17, in <module>
2022-12-06T08:44:24.2558759Z 
2022-12-06T08:44:24.2558763Z 
2022-12-06T08:44:24.2558868Z                                                                                 
2022-12-06T08:44:24.2559186Z [respeaker_ros:make]       File "/github/home/ros/ws_jsk_3rdparty/build/respeaker_ros/venv/build/pip/setup.py", line 7
2022-12-06T08:44:24.2559559Z 
2022-12-06T08:44:24.2559564Z 
2022-12-06T08:44:24.2559672Z                                                                                 
2022-12-06T08:44:24.2560022Z [respeaker_ros:make]         def read(rel_path: str) -> str:
2022-12-06T08:44:24.2560361Z 
2022-12-06T08:44:24.2560365Z 
2022-12-06T08:44:24.2560473Z                                                                                 
2022-12-06T08:44:24.2560700Z [respeaker_ros:make]                          ^
2022-12-06T08:44:24.2560843Z 
2022-12-06T08:44:24.2560848Z 
2022-12-06T08:44:24.2561167Z                                                                                 
2022-12-06T08:44:24.2561443Z [respeaker_ros:make]     SyntaxError: invalid syntax
knorth55 commented 1 year ago

In indigo, catkin_virtualenv 0.1.14 is used, and in that version pip will automatically updated to the latest version.

https://github.com/locusrobotics/catkin_virtualenv/blob/6b26183720535762ecc91e12d67430aa01567e5a/catkin_virtualenv/src/dh_virtualenv/deployment.py#L172-L175

However, PR1040 install catkin_virtualenv from source`.

https://github.com/jsk-ros-pkg/jsk_robot/blob/b4291aa5038a136b1a956d4c9dc5bf4ebac4fa71/jsk_pr2_robot/jsk_pr2_startup/jsk_pr2.rosinstall#L126-L129

And the pip version is fixed to 19.3.1 in catkin_virtualenv 0.5.2.

https://github.com/locusrobotics/catkin_virtualenv/blob/c2dc8ed995356130465dfffc6689066a5a7c9b5f/catkin_virtualenv/scripts/build_venv#L92

That's the reason why we can avoid the error in PR1040.