-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Can I draw a line when I run the UE4 #1393
Comments
I need to display the global path in UE, how can I make it? |
Your question seems pretty vague. If you want to view a planned trajectory you could just run the simulation with the clock significantly sped up? As far as I know there is no way to visualise a planned trajectory without running the game as the simulator will start when the game runs, and the simulator is what estimates the state of the vehicles (simulator code here) |
thank you! it will be extremely useful! I believe it is the exactly API I want. |
I have it in my fork: https://github.com/DavidLSmyth/AirSim/
Examples can be found in takeoff.py, new methods are showPlannedWaypoints and simShowDebugLines. It's slightly messy at the moment as I had some trouble figuring out how to use Vector3r with RPC but I will fix that soon. |
I got an error... |
|
Where is this file "drawdebughelpers.h" from?UE4?So how do you compile airsim? |
@ZWYDeveloper I am on a business trip, sadly, I didn't figure it out yet.. |
I realised that include isn't necessary, just updated my fork to remove it. I have ubuntu on another partition so can have a look if there are more problems |
@DavidLSmyth Yes, I succeeded, I send this file before compilation airsim commented out, put the compiled plug-in ue4 compilation in the scene and then opens, the effect of this is I compiled, is nice, but I want to optimize the trajectory of the lines, I need to take a look at you to modify the API, thank you for your open source share, thank you! |
The changes were pretty straightforward, they are all contained in one commit. Happy to help! |
Internal VSTF 7413. |
@DavidLSmyth Thank you for sharing your addition to path plotting. I had an error with |
I made some changes recently that may have broken some things, I'll have a look and get back to you when I've figured out what's gone wrong. If you don't need some of the latest functionality you could use one of the older commits (try 129596f) |
Thanks @DavidLSmyth I look forward to that. Regarding the commit that you referenced, it does not seem related. It's an update to the simGetPositionWRTOrigin method. |
Hi @AloshkaD , I still cannot figure out how to draw the line of the trajectory of multirotor, could you kindly explain more how you complete this ? |
@DavidLSmyth I am encountering an error that "rpclib: server could not find function 'simShowDebugLines' with argument count 0" when I try to use your fork. Strangely, the function is defined in your .hpp and .cpp files with the appropriate number of arguments. Would you be able to help with this issue? Thanks! |
I'll see if I can find the time to submit this as a clean pull request. Haven't done any maintenance on this fork for years... |
Thanks, @DavidLSmyth! In case you are unable to make the fix, do you know if there has been a similar capability developed within AirSim? Essentially, I want to indicate a connection between two or more multirotors for the purposes of visualization. |
I don't think so (you can turn on debug lines showing where the drone has flown, that's the closest thing I'm aware of) but you could put this together using a blueprint rather than making a change to the API (if you've seen images of other people doing this I'd guess they've just used a blueprint). I got pretty frustrated with blueprints in the end so I'd recommend to do this from the API if possible! |
Was just going through it there, maybe simPlotLineList is what you want? I wasn't aware this had been added! |
It is! By coincidence, I found that utility earlier this week, as well. Ideally, I would plot the lines throughout the simulation, but it suffices to use it between movements, which seems to be the only way to do so. If I become more proficient with AirSim, I will consider implementing something closer to what I have in mind. Thank you again for your help, @DavidLSmyth! |
As the picture shows...
The text was updated successfully, but these errors were encountered: