-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add playback event recorder #633
Conversation
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
…layback_event_recorder
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
…staging area and rock fall event, comment out other event types Signed-off-by: Ian Chen <ichen@osrfoundation.org>
…layback_event_recorder
more changes in 49cf846. Camera placement is now automatically based on event type. Static cameras for detector and rock fall events, while robot follow mode in marsupial vehicle detach evets. |
…layback_event_recorder
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
…layback_event_recorder
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Build finished. No test results found. |
Hi Ian, I'm experimenting with this recorder - thanks very much, it looks really useful. However, I'm having problems with the commit that added feedback from the recorder stats. It seems that on my system, nothing publishes them. Does it need some custom build of any other libraries? I'm using a dockerfile modified from cloudsim_sim image, but which checks out this branch. So it should use Ignition Citadel and all the correct versions of everything (if they're correctly declared). Thanks for help! |
And I have a few remarks possibly worth considering:
--- a/subt_ign/scripts/playback_event_recorder/record_playback_events.bash (revision 4cc98ea08cf993f56e11387db21d0eaa885b7852)
+++ b/subt_ign/scripts/playback_event_recorder/record_playback_events.bash (date 1603567761213)
@@ -24,7 +24,7 @@
fi
scriptDir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-tmpDir="$scriptDir/tmp_record"
+tmpDir="tmp_record"
echo "Creating tmp dir for recording: $tmpDir"
@@ -38,7 +38,7 @@
export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=$LD_LIBRARY_PATH
sdfName="playback_event_recorder"
-ign gazebo -v 4 $sdfName.sdf
+ign gazebo -v 4 "${scriptDir}/${sdfName}.sdf"
echo "Video recording ended. Shutting down playback" |
And here are my additions to path_tracer (also a very useful one, probably even more than the event recorder): Bug fixes: Features:
And here's a script I use to launch the path_tracer to automatically create a video: https://gist.github.com/peci1/501ad6decba37e1f72eeb31898fc3aad . It automatically records a video, autoconfigures the top-view camera to view exactly the explored space, zooms out several levels in the end to show the whole world, and repeats the last frames of the video a few times for easier inspection of what the state was in the very end. Feel free to cherry-pick any of my changes ;) |
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Build finished. No test results found. |
yeah forgot to add the related branches in this PR description. I just updated to say it depends on gazebosim/gz-sim#419 and gazebosim/gz-common#105. The changes in these PR ensure that we can generate videos of higher quality (by setting bitrate) and also correct timing. Make sure to add the necessary fields in
hmm we are generating videos based on a filtered list of events, i.e. modified events.yml, so one workaround is to modify the events.yml and remove the ones associated with
yep done. df35512 |
thanks! I believe @nkoenig is reworking the path tracer video generation script. I'll let him decide how to best incorporate these suggested changes. |
If it makes sense, this filtering can be added to the launch script.
At least like that... But I don't see the reason why this recording is there. All robots will have a detect event from the tile right next to the staging area, and the recording goes back about a minute, so each robot will have a recording of it leaving the staging area. But it won't have the static camera pointed at all robots together, which I can imagine could be a reason to make the staging area recording... Also, when the lockstepping is finished, do you consider adding an option to run the event playback super-realtime? |
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Build finished. No test results found. |
the staging event is now recorded at the end As for event filtering, that's done externally and given to us to generate the videos. Similarly, the staging area video recording and camera pose is a specific request that came directly from the organizers :) |
Once the first video recording starts, there are around 15 real time seconds in between the subsequent recordings (with sim mostly paused) to wait for models and levels to properly load on the gui side so I try not to speed that up in case we're doing video recording on less powerful machines. |
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Build finished. No test results found. |
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Build finished. No test results found. |
Signed-off-by: Nate Koenig <nate@openrobotics.org>
Signed-off-by: Nate Koenig <nate@openrobotics.org>
This now contains all the code used to create Cave Circuit videos. |
Build finished. No test results found. |
1 similar comment
Build finished. No test results found. |
I've updated edifice branch to build with the current status of Ignition libraries - targeted sdformat11 and transport10, and the subt workspace built successfully. However, if I run path_tracer from the edifice branch, it gets stuck at the very beginning - pausing the simulation to catch up with the video recorder. The problem is that the video recorder stops publishing any updates on the stats topic as soon as the simulation gets paused. And that's a deadlock because the path tracer waits for the recorder stats to arrive with better information. I guess this did not happen earlier, so what could be the reason for this behavior? I've even built ign-common3 from source to get the HW-accelerated video encoding, but it still suffers from this problem. It seems to me that the video recorder publishes the stats wrongly and is faster than it says on the stats topic. The simulation always stops at sim time 69 with the video recorder telling that it has encoded 43 seconds of video. But that's weird because I think the encoder should be faster than the simulation (at least earlier it was for 8 Mbps FullHD). |
Depends on gazebosim/gz-sim#419 and gazebosim/gz-common#105
The playback event recorder creates videos for events that are stored in the events.yml log file in the state log directory.
Usage:
The script launches ign gazebo in playback mode and creates videos using the gui camera video recording feature. For each event, it seeks playback to some time before the event, moves the camera to the desired location (either in follow mode or moves to a static pose), and starts recording until some time after the event. After recording all events, ign -gazebo will exit on its own and you can find the recorded videos in a timestamped directory inside the directory where the bash script is run
You can configure the gui camera behavior. To use static gui camera pose during recording, setPlaybackEventRecorder
system's<camera_follow>
sdf param tofalse
. Currently it defaults totrue
, which means it'll follow the robot when playing back the event.Here are the events being recorded and associated the camera placement: