Hi,
I would like to collect the position data from the crazy flie. Is there a way to capture and save the LPS position data to a file.
Regards
hyperglider
collecting the position data from LPS
-
- Beginner
- Posts: 16
- Joined: Tue Mar 15, 2016 10:12 pm
Re: collecting the position data from LPS
Hi,
I good way is to collect the data in a rosbag (see http://wiki.ros.org/rosbag/Commandline). If you need it in a text file, you can write a small script to convert the rosbag to whatever file format you like (see http://wiki.ros.org/rosbag/Code%20API).
Best,
Wolfgang
I good way is to collect the data in a rosbag (see http://wiki.ros.org/rosbag/Commandline). If you need it in a text file, you can write a small script to convert the rosbag to whatever file format you like (see http://wiki.ros.org/rosbag/Code%20API).
Best,
Wolfgang
-
- Beginner
- Posts: 16
- Joined: Tue Mar 15, 2016 10:12 pm
Re: collecting the position data from LPS
Hi,
I have tried rosbag to collect the position data and all it give me is below. I can not see / find where it is storing / using the log_ranges, crazyflie_position data.
Help please.
j@dualboot:~/bagfiles$ rosbag info 2016-08-23-20-58-34.bag
path: 2016-08-23-20-58-34.bag
version: 2.0
duration: 23.7s
start: Aug 23 2016 20:58:34.77 (1471949914.77)
end: Aug 23 2016 20:58:58.49 (1471949938.49)
size: 853.0 KB
messages: 6044
compression: none [1/1 chunks]
types: bitcraze_lps_estimator/RangeArray [6eea5c2b2055cd08369bcbebe9f0032b]
crazyflie_driver/GenericLogData [bfa79f36371fee74e53d96afde61049b]
diagnostic_msgs/DiagnosticArray [60810da900de1dd6ddd437c3503511da]
geometry_msgs/Point [4a842b65f413084dc2b10fb484ea7f17]
geometry_msgs/PoseStamped [d3812c3cbc69362b77dc0b19b345f8f5]
geometry_msgs/Twist [9f195f881246fdfa2798d1d3eebca84a]
rosgraph_msgs/Log [acffd30cd6b6de30f120938c17c593fb]
tf/tfMessage [94810edda583a504dfda3829e70d7eec]
tf2_msgs/TFMessage [94810edda583a504dfda3829e70d7eec]
visualization_msgs/Marker [18326976df9d29249efc939e00342cde]
visualization_msgs/MarkerArray [90da67007c26525f655c1c269094e39f]
topics: /anchors_markers 1 msg : visualization_msgs/MarkerArray
/crazyflie/cmd_vel 1176 msgs : geometry_msgs/Twist
/crazyflie/goal 706 msgs : geometry_msgs/PoseStamped
/crazyflie/log_ranges 787 msgs : crazyflie_driver/GenericLogData
/crazyflie_marker 771 msgs : visualization_msgs/Marker
/crazyflie_position 770 msgs : geometry_msgs/Point
/diagnostics 24 msgs : diagnostic_msgs/DiagnosticArray
/ranging 787 msgs : bitcraze_lps_estimator/RangeArray
/rosout 16 msgs : rosgraph_msgs/Log (5 connections)
/tf 1006 msgs : tf/tfMessage (2 connections)
I have tried rosbag to collect the position data and all it give me is below. I can not see / find where it is storing / using the log_ranges, crazyflie_position data.
Help please.
j@dualboot:~/bagfiles$ rosbag info 2016-08-23-20-58-34.bag
path: 2016-08-23-20-58-34.bag
version: 2.0
duration: 23.7s
start: Aug 23 2016 20:58:34.77 (1471949914.77)
end: Aug 23 2016 20:58:58.49 (1471949938.49)
size: 853.0 KB
messages: 6044
compression: none [1/1 chunks]
types: bitcraze_lps_estimator/RangeArray [6eea5c2b2055cd08369bcbebe9f0032b]
crazyflie_driver/GenericLogData [bfa79f36371fee74e53d96afde61049b]
diagnostic_msgs/DiagnosticArray [60810da900de1dd6ddd437c3503511da]
geometry_msgs/Point [4a842b65f413084dc2b10fb484ea7f17]
geometry_msgs/PoseStamped [d3812c3cbc69362b77dc0b19b345f8f5]
geometry_msgs/Twist [9f195f881246fdfa2798d1d3eebca84a]
rosgraph_msgs/Log [acffd30cd6b6de30f120938c17c593fb]
tf/tfMessage [94810edda583a504dfda3829e70d7eec]
tf2_msgs/TFMessage [94810edda583a504dfda3829e70d7eec]
visualization_msgs/Marker [18326976df9d29249efc939e00342cde]
visualization_msgs/MarkerArray [90da67007c26525f655c1c269094e39f]
topics: /anchors_markers 1 msg : visualization_msgs/MarkerArray
/crazyflie/cmd_vel 1176 msgs : geometry_msgs/Twist
/crazyflie/goal 706 msgs : geometry_msgs/PoseStamped
/crazyflie/log_ranges 787 msgs : crazyflie_driver/GenericLogData
/crazyflie_marker 771 msgs : visualization_msgs/Marker
/crazyflie_position 770 msgs : geometry_msgs/Point
/diagnostics 24 msgs : diagnostic_msgs/DiagnosticArray
/ranging 787 msgs : bitcraze_lps_estimator/RangeArray
/rosout 16 msgs : rosgraph_msgs/Log (5 connections)
/tf 1006 msgs : tf/tfMessage (2 connections)
Re: collecting the position data from LPS
Hi,
You can use the rosbag code API to print out the actual messages. One example is at the very bottom of this page: http://wiki.ros.org/rosbag/Code%20API. Just replace the filename (test.bag) with yours and the topic names with "crazyflie/log_ranges" to get the actual anchor distances.
Hope that helps,
Wolfgang
You can use the rosbag code API to print out the actual messages. One example is at the very bottom of this page: http://wiki.ros.org/rosbag/Code%20API. Just replace the filename (test.bag) with yours and the topic names with "crazyflie/log_ranges" to get the actual anchor distances.
Hope that helps,
Wolfgang
-
- Beginner
- Posts: 16
- Joined: Tue Mar 15, 2016 10:12 pm
Re: collecting the position data from LPS
Wolfgang,
Thanks for that I now have access to data I am after.
regards
Hyperglider
Thanks for that I now have access to data I am after.
regards
Hyperglider