Run Linux Terminal Command on my External ROS Device

2 ビュー (過去 30 日間)
Andrew Poissant
Andrew Poissant 2019 年 10 月 15 日
回答済み: Philippe Lebel 2019 年 11 月 20 日
I am able to connect to an external ROS master on my Odroid XU4. After starting the ROS master on my Odroid, I am able to execute the following code in the Odroid's terminal: 'rosrun mavros mavsys mode -c MANUAL'. Now, I want to run the same command from matalb. I try using the system() command but keep getting an error saying that the rosrun command is not found? Why am I getting this error and how do I fix it?
Error: Error executing command "env LC_ALL=C bash -c 'rosrun mavros offb_node'". Details:
STDERR: bash: rosrun: command not found
STDOUT:
Code:
d = rosdevice('172.16.0.192', 'odroid', 'odroid');
system(d, 'rosrun mavros mavsys mode -c MANUAL')

回答 (1 件)

Philippe Lebel
Philippe Lebel 2019 年 11 月 20 日
look at wonwon0 (me) answers in the following link:
it should provide you with all that you need to do.

カテゴリ

Help Center および File ExchangePublishers and Subscribers についてさらに検索

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by