Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Tlog plugin #41

Closed
vooon opened this issue Jul 10, 2014 · 18 comments
Closed

Tlog plugin #41

vooon opened this issue Jul 10, 2014 · 18 comments

Comments

@vooon
Copy link
Member

vooon commented Jul 10, 2014

Plugin to write fcu message logs.

@vooon vooon added this to the Versoin 0.6.0 milestone Jul 10, 2014
@vooon vooon added enhancement and removed PX4 labels Jul 10, 2014
@vooon vooon modified the milestones: Versoin 0.7.0, Versoin 0.6.0 Jul 14, 2014
@TSC21
Copy link
Member

TSC21 commented Aug 5, 2014

I totally recommend a bridge to FlightPlot: http://pixhawk.org/dev/flightplot and pymavlink: http://pixhawk.org/dev/pymavlink

@vooon
Copy link
Member Author

vooon commented Aug 5, 2014

Ok, i'll see this. Log plugin not highly required (because FCU also has it's log, and GCS too), maybe easies way it use rosbag on /mavlink/from.

@TSC21
Copy link
Member

TSC21 commented Aug 5, 2014

The importance of this bridge is the possibility of direct access to .bin files on the sdcard and get them to FlightPlot or pymavlink, which are already prepared to read the .bin log files.
Doing the same thing to rqt_plot would be awesome though :D

@TSC21
Copy link
Member

TSC21 commented Aug 5, 2014

A good tool to plot trajectories: https://code.google.com/p/streamvis/

@TSC21
Copy link
Member

TSC21 commented Aug 5, 2014

I also may give a try to rosmatlab bridge (https://github.com/tu-darmstadt-ros-pkg/rosmatlab) and see if I can get the pose plotted in 3D like this: https://dl.dropboxusercontent.com/u/12446150/SE3_TRJ_Plotting.zip

Related:

@TSC21
Copy link
Member

TSC21 commented Aug 6, 2014

One more thing: to have access to the log files: http://www.qgroundcontrol.org/mavlink/ftp, which means a FTP protocol communication on mavros side.

@vooon
Copy link
Member Author

vooon commented Aug 6, 2014

FTP now not very stable, currently better use QGC for it.

@TSC21
Copy link
Member

TSC21 commented Aug 6, 2014

QGC uses the FTP to download the log files. Something on ROS side I believe it's possible to do also.

@vooon vooon removed this from the Version 0.7.0 milestone Aug 6, 2014
@TSC21
Copy link
Member

TSC21 commented Aug 15, 2014

@vooon I really would like to give a try at this, but you have to help me regarding the FTP side. It's already merged onto PX4 master and working with GCS.

This could be great to download the .bin/.tlog/.log files from the SD card and use them to check out logs on FlightPlot, pymavlink or even rqt_plot (we just need to find a way to get this kind of files read by rqt_plot).

Another good thing to do is printing the .bin/.tlog/.log in the terminal using rosconsole.

It will require some days of work but I think we can manage to get something good of this.

Note: the related msg is FILE_TRANSFER_PROTOCOL. And here's the QGC side: https://github.com/mavlink/qgroundcontrol/pull/658/files.

@vooon
Copy link
Member Author

vooon commented Aug 16, 2014

Wait some time. Current implementation use ENCAPSULATED_DATA message. I think FILE_TRANSFER_PROTOCOL incomplete: they can extract message header from data filed.

@TSC21
Copy link
Member

TSC21 commented Aug 16, 2014

Where have you found that info? Probably ENCAPSULATED_DATA is the msg to be used.

@vooon
Copy link
Member Author

vooon commented Aug 16, 2014

It you look into the code, you found that every FTP message contain header, that can be moved to mavlink message.

In addition, I do not like that the FTP interferes with image streaming.

@TSC21
Copy link
Member

TSC21 commented Aug 16, 2014

So what's the best option? That interference with the image streaming may be normal so it can get better download speeds.

@TSC21
Copy link
Member

TSC21 commented Aug 16, 2014

Regarding reading (or writing) from files: http://answers.ros.org/question/128891/how-to-read-and-writing-ros-message-efficient-into-files-c/. This way we can publish the content into rosconsole or into a topic with several fields that can that can be subscribed by rqt_plot (custom msg required).

Since you say to wait for FTP to be more stable, we can start by creating a srv to read log files and get them showed on terminal or published in a topic.
Something like:
rosrun mavros log read </path/to/file> to_terminal
rosrun mavros log read </path/to/file> to_topic

@vooon
Copy link
Member Author

vooon commented Aug 30, 2014

I decide just use rosbag.

Example launch:

<launch>
    <!-- vim: ft=xml -->
    <include file="$(find mavros)/launch/apm2_radio.launch">
        <arg name="gcs_url" value="tcp-l://" />
    </include>

    <!-- log all data for now -->
    <node pkg="rosbag" type="record" name="rosbag" args="-a" />
</launch>

@vooon vooon closed this as completed Aug 30, 2014
@TSC21
Copy link
Member

TSC21 commented Aug 30, 2014

@vooon you are making a confusion between the current logs and the logs that come from sdlog2, which are stored in SD card as .bin. If one doesn't have a telemetry radio, can't log files that way (in my case for example my 3DR module broke down after a crash :/ )

@vooon
Copy link
Member Author

vooon commented Aug 30, 2014

I use APM 2.6 on bixler, so it hasn't sd card, only DataFlash 4MB chip.
So i can get logs from FCU using MissionPlanner.
Additional i write telemetry logs on ground by GCS and mavros.

Initional this issue about writing logs by mavros on ground computer, and i solve it using rosbag.
Gcs tools don't know bag format, but i can play telemetry stream via gcs_bridge.

@TSC21
Copy link
Member

TSC21 commented Aug 30, 2014

OK then. So I think we can move to #138, which is prety much the same but tends to get log data to terminal.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants