delta3d
 Forum Index >  > delta3d Support New Topic Post Reply
 dtDIS coordinates and dead reckoning.
Prev Topic Next Topic
   
jdkimball
 11/02/2010 06:36PM (Read 1136 times)  

Newbie

Status: offline
Forum User

Registered: 07/17/2008
Posts: 8
I'm developing a DIS Delta3D application, starting with the testDIS example. The following line sets the incoming coordinate type.

disConfig->GetCoordinateConverter().SetIncomingCoordinateType(dtUtil::IncomingCoordinateType::GEODETIC);

The Entity Location works correctly, but the Entity Orientation acts as if it is still using Euler angles as in the DIS spec. Is this correct? Is there an easy way to send HPR or similar local angles in the PDU?

Also, dead reckoning doesn't work, and I get the following message:
Warn:19:24:54:dtGame::GameActorProxy::ApplyActorUpdate:508>Property "Velocity Vector" was not found on actor type "dtcore.Game.Actors.Game Mesh Actor"

My actormap.xml file calls for dtcore.Game.Actors

I also found a post recommending SimCore.Actors.Platform actors, but substituting this in my actormap.xml file resulted in the following error message:

Warn: 19:31:10:dtDIS::ESPduProcessor::CreateRemoteActor:153>Don't know the ActorType to create for:1.1.222.2.2.3.0

Any help would be greatly appreciated.

 
Profile Email
 Quote
ErikJohnson
 11/03/2010 12:55PM  

Moderator

Status: offline
Forum User

Registered: 11/08/2004
Posts: 2851
Hi,

I'm not exactly sure, but I think the dtDIS doesn't handle the orientation of the EntityStatePDU according to the DIS specs. I think it's just assuming the incoming packet contains HPR values (in degrees).

Dead Reckoning doesn't just happen out of the box. You will need to enable the dead reckoning components in your application. Also, you will need to tell dtDIS to use an actor that has the ability to be dead reckoned. The "Velocity Vector not found on actor" is an indication that dtDIS is trying to apply the incoming velocity to an actor type that doesn't have that property.

You should be able to tell dtDIS to use a SimCore actor by changing the ActorTypemap.xml file. Note, you will have to list the exact Name and Category of the actor, plus have that actor library loaded into your application.

Hope this gives you some ideas,
Erik
 
Profile Email
 Quote
jdkimball
 11/07/2010 12:44AM  

Newbie

Status: offline
Forum User

Registered: 07/17/2008
Posts: 8

Erik;

Thanks for the advice. I've attempted to implement it, but am stuck on the "have that actor library loaded into your application" piece. Excerpts of my actormap.xml file, Config() routine, and resulting error message are shown below. Comments or tips on other things to try would be greatly appreciated.


Here's the relevant section of my actormap.xml:


1
1
222
2
2
3
0




Platform
SimCore.Actors.Platform


StaticMeshes:ScanEagle.3ds
dunno




My Code:

void TestDISApp::Config()

//setup scene here
dtABC::Application::Config();

// Set up the initial camera location and orientation
dtCore::Transform tx = dtCore::Transform(lat, lon, alt, h, p, r);
GetCamera()->SetTransform(tx);

// Set up a motion model so we can move the camera
mMotion = new dtCore::FlyMotionModel(GetKeyboard(), GetMouse());
mMotion->SetMaximumFlySpeed(1200.0f);
mMotion->SetTarget(GetCamera());

mGameManager = new dtGame::GameManager(*this->GetScene());

//need to set a ProjectContext so the ResouceActorProperty can find the StaticMesh resources
const std::string context = dtUtil::FindFileInPathList("LVCMaps");
dtDAL:roject::GetInstance().SetContext(context);
mGameManager->ChangeMap("MyMap"); //just for something to see
mGameManager->LoadActorRegistry("SimCore");

dtDIS::SharedState* disConfig = NULL;
disConfig = new dtDIS::SharedState(mConnectionXml, mActorTypeMapping);

//Assuming that incoming positions are lat/lon and the local terrain is
//centered around 0,0,0. Note, this doesn't conform to DIS specs.
disConfig->GetCoordinateConverter().SetIncomingCoordinateType(dtUtil::IncomingCoordinateType::GEODETIC);
disConfig->GetCoordinateConverter().SetLocalCoordinateType(dtUtil::LocalCoordinateType::CARTESIAN_FLAT_EARTH);
disConfig->GetCoordinateConverter().SetFlatEarthOrigin(osg::Vec2(0.0f, 0.0f));

mDISComponent = new dtDIS::MasterComponent(disConfig);
mMessageProc = new dtGame:efaultMessageProcessor(); //need this to get messages routed around

//need this to get messages send out to the DIS component, for sending to the network
mNetworkingRouter = new dtGame:efaultNetworkPublishingComponent();

mGameManager->AddComponent(*mDISComponent);
mGameManager->AddComponent(*mMessageProc, dtGame::GameManager::ComponentPriority::HIGHEST);
mGameManager->AddComponent(*mNetworkingRouter);

}

The following message appears in the console after the call to new dtDIS::SharedState(mConnectionXml, mActorTypeMapping);

Error: 19:21:43:Actor Type with name, Platform, was not found in the GameManager.
Warn: 19:21:45:No packet adapter for Message of type 'Actor Create'
 
Profile Email
 Quote
ErikJohnson
 11/10/2010 12:00AM  

Moderator

Status: offline
Forum User

Registered: 11/08/2004
Posts: 2851
Hmm...not sure what's going wrong. Are you sure the SimCore actor library is being loaded into the GameManager? Double-check to ensure the SimCore actors are actually available from the GM (e.g., you should be able to manually create a SimCore actor).

After that, ensure "Platform SimCore.Actors.Platform" is the valid name of the Actor in SimCore. Temoporarily load the SimCore actor library in STAGE and you can see it as a type of actor to create.


The
PHP Formatted Code
Warn: 19:21:45:No packet adapter for Message of type 'Actor Create'
warning can be ignored. It's just saying that an Actor Create message was received, but there's no dtDIS package mapped to it.

-Erik
 
Profile Email
 Quote
Content generated in: 0.59 seconds New Topic Post Reply
 All times are UTC. The time is now 08:29 AM.
Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 

About delta3d

delta3d is a game and simulation engine appropriate for a wide variety of simulation and entertainment applications. delta3d uses best-of-breed open source technologies to create a fully integrated game engine and with content creation tools.MORE

Twitter

User Functions





Don't have an account yet? Sign up as a New User!

Lost your password?