how to run rosinit in Matlab

조회 수: 42 (최근 30일)
Van Chuong Nguyen
Van Chuong Nguyen 2021년 1월 28일
댓글: Van Chuong Nguyen 2021년 1월 31일
Hi,
I just installed the ROS toolbox in Matlab, and type rosinit in the command window
But it shows that:
Launching ROS Core...
Invalid Python executable: ''. Use pyenv function to set the path to the Python executable and retry the command.
Could anyone help me on figuring out this issue?
Thank you so much

채택된 답변

Josh Chen
Josh Chen 2021년 1월 28일
Hello Van,
Based on the error message, it looks like MATLAB cannot find an available python executable on your computer. rosinit requires you to install and setup Python2.7. Once you installed Python2.7 and run
>> pyenv('Version','2.7')
you should now be able to do rosinit if there is no other issues.
In case there is any, this doc page shows all ROS System Requirements that might be helpful.
Hope this helps.
Josh
  댓글 수: 1
Van Chuong Nguyen
Van Chuong Nguyen 2021년 1월 31일
Thanks Josh, it worked perfectly

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by