Matlab ROS : rosbag record from Matlab computer on Turtlebot

2 ビュー (過去 30 日間)
Vincent Talon
Vincent Talon 2017 年 8 月 12 日
回答済み: Vincent Talon 2017 年 8 月 16 日
It is possible to execute the command line to record a rosbag from Matlab to the turtlebot. . I try with
if true
% code
rosdevice('MyIP','Username','Password')
system(d,'rosbag record --duration=10 -o NameFile /odom')
end
but I have an error: STDERR : bash : rosbag: command not found . I'm able to do this with the command -> openShell(d). And type in shell directly : rosbag record --duration=10 -o NameFile /odom. After upload on my Matlab coomputer : getfile(d,'path/name');
But if it is possible to do all this directly in Matlab without 'openShell', that will be great ! Thank you in advance for your help

採用された回答

Shashank
Shashank 2017 年 8 月 16 日
Hi Vincent,
Have you assigned the rosdevice object to d ?
I don't see it in your code.
Try this:
d = rosdevice('MyIP','Username','Password')
system(d,'rosbag record --duration=10 -o NameFile /odom')
This will execute any system command on your rosdevice which is supported. Please check if you have set the ROS environment variables properly.
- Shashank
  1 件のコメント
Vincent Talon
Vincent Talon 2017 年 8 月 16 日
Hi, Yes I well assigned rosdevice. Yesterday evening I find the issue... it is my ssh install that failed on my Intel UP board… I re-install all… and now all works. Thank you for your time I should close the question

サインインしてコメントする。

その他の回答 (1 件)

Vincent Talon
Vincent Talon 2017 年 8 月 16 日
Make sure your ssh works perfectly on the intel up board before try to upload Matlab code on it

カテゴリ

Help Center および File ExchangeROS Log Files and Transformations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by