Skip to content
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

Detecting Pedestrians #295

Open
akhilsimha7 opened this issue Jun 28, 2023 · 1 comment
Open

Detecting Pedestrians #295

akhilsimha7 opened this issue Jun 28, 2023 · 1 comment

Comments

@akhilsimha7
Copy link

Dear @vandit86,

adding pedestrians to Artery should be feasible without too much effort. I have not worked on this yet, however.
Detection of pedestrians would be possible as soon as "SUMO persons" are added to the GlobalEnvironmentModel.
For the communication part, BasicNodeManager would need to create OMNeT++ module instances for pedestrians similar to how it handles vehicles at the moment.

Originally posted by @riebl in #145 (comment)

Was anyone able to get this working? I just want the pedestrians to be detected by the sensors.

@riebl
Copy link
Owner

riebl commented Jul 2, 2023

You will need to add persons in the GlobalEnvironmentModel similar to vehicles. The relevant code section is this:

void GlobalEnvironmentModel::receiveSignal(cComponent*, simsignal_t signal, const char* id, cObject* obj)
{
if (signal == traciNodeAddSignal) {
cModule* module = dynamic_cast<cModule*>(obj);
if (module) {
auto controller = getVehicleController(module);
if (controller) {
addVehicle(controller);
}
}
} else if (signal == traciNodeRemoveSignal) {
removeVehicle(id);
}
}

As you can see, it currently only adds and removes vehicles. You will need to add EnvironmentalModelObject instances for each SUMO person.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants