필터 지우기
필터 지우기

TImeseries construction of Rosbag messages in Matlab fails!

조회 수: 1 (최근 30일)
Ahmad Drak
Ahmad Drak 2016년 5월 12일
댓글: Sebastian Castro 2016년 5월 12일
Hey all,
Reading messages from rosbags in matlab works fine. However when doing a timeseries of that data (ts=timeseries(msgs);) i get an error saying that there is no property for that message!
Here are the commands:
bag = rosbag('./bagfiles/b-it-bots_2016_04_14_16-39.bag')
bag1 = select(bag, 'Topic','/joint_states')
msgs = readMessages(bag1)
ts = timeseries(msgs, 'Position')
The last command throws the following error:
Error using timeseries/init (line 88)
A specified property has no corresponding value.
Error in timeseries (line 324)
this = init(this,vara
Anyone has any idea what is causing this?
Cheers
  댓글 수: 1
Sebastian Castro
Sebastian Castro 2016년 5월 12일
If you do
>> rostopic info joint_states
and look at the message type (which normally should be sensor_msgs/JointState), you can then do
>> rosmsg info sensor_msgs/JointState
This should tell you the structure of the data and what is available to pick from those messages.
If for some reason your /joint_states topic is using a different message type, that may be why the timeseries is unable to find a Position field?
- Sebastian

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 ROS 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