rviz config file for android sensors
Hi,
I'm pretty new to all the ROS ecosystem so please excuse my question if not adequate (and I feel I miss many pieces for the moment...).
I'm wondering; is there a config file for ROS Sensors Driver ( http://wiki.ros.org/android_sensors_d... ) to use with $ rosrun rviz riv -d <config_file>
in order to plot (on a 2D graph e.g.) sensors' data from an Android device (smartphone)?
The "ROS Sensors Driver" was installed and is successfully connected to ROS master on the laptop running roscore.
I can also successfully print out variation from the IMU chips with $ rostopic echo /android/imu
for instance:
header:
seq: 384095
stamp:
secs: 1551421044
nsecs: 381000000
frame_id: "/imu"
orientation:
x: -0.0177525561303
y: -0.00952073466033
z: -0.892899274826
w: 0.449805617332
orientation_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
angular_velocity:
x: -0.000991821289062
y: 0.00173950195312
z: -0.00140380859375
angular_velocity_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
linear_acceleration:
x: 0.445648193359
y: -0.0185089111328
z: 9.7029876709
linear_acceleration_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---
In RViz, I got this warning:
No tf data. Actual error: Fixed Frame [map] does not exist
And if I run this command in parallel: $ rosrun tf static_transform_publisher 0 0 0 0 0 0 1 map my_frame 10
I have this error:
For frame [/imu]: Frame [/imu] does not exist
I'm running ros melodic 1.14.3 on Ubuntu 18.04 64 bits.
And the "ROS Sensors Driver" app on the Android 6.0.1 smartphone is coming from the playstore.
Thanks.
* Edit: *
Thanks gvdhoorn for the hint. Explanations here under.
I have tried two other things in the meantime:
1) the imu plugin for rviz: http://wiki.ros.org/rviz_imu_plugin : worked like a charm, I'm receiving the /android/imu
messages from the $ rosbag play <my_bag_file>
command I launched in the same time (I'm now searching how to visualize the device motion relative to the map frame instead of it's own frame, which is giving it a "static look" except for rotations which are fine.
2) rqt_bag: http://wiki.ros.org/rqt_bag : it seems also to work correctly to me but hasn't a graph visualization mode;
Then, I tried your python script to fix the bag file itself in two ways, none of them is working;
a) $ python rosbag_fixer/fix_bag_msg_def.py --use-local-defs -c "/android/imu" "bagfiles/2019-03-01-11-53-15.bag" "bagfiles/2019-03-01-11-53-15_FIX.bag"
which printed:
No topics found for callerid '/android/imu'. Make sure it is correct.
b) $ python rosbag_fixer/fix_bag_msg_def.py --use-local-defs "bagfiles/2019-03-01-11-53-15.bag" "bagfiles/2019-03-01-11-53-15_FIX.bag"
which printed:
Writing out fixed bag ..
bagfiles/2019-03-01-11-53-15_FIX.bag 100% 687.3 KB 00:00
done
The new bag probably needs to be re-indexed. Use 'rosbag reindex bagfiles/2019-03-01-11-53-15_FIX.bag' for that.
So I ran the proposed reindex
command to fix it ...
If you want to see the transform properly, what you need is a transform between
map
andimu
. Try runningrosrun tf static_transform_publisher 0 0 0 0 0 0 1 /map /imu 10
instead.Your answer wasn't an answer, so I appended it to your original question text.