Hi, Thanks for the quick answer. I've made a mistake in my previous message, I meant that even if I chose an angle (for exemple 40°), Sumo will adapt the orientation of the car according to the edge, I would like Sumo to not do that, here is how I create a car :
mSumoClient.vehicle.add(vID, string("route0"), vType); mSumoClient.vehicle.moveToXY(vID, string(""), 0, pos.x, pos.y, 135.0, 2); mSumoClient.mySetLaneChangeMode(vID, 0); mSumoClient.mySetSpeedMode(vID, 0); mSumoClient.vehicle.setSpeed(vID, 0); (vID, vType are strings and pos is a Position type, mSumoClient comes from the TraCIAPI class, as for the functions mySet... they weren't implemented in the C++ version so I wrote them by referring to the Python implementation of TraCIAPI) The map used is two roads of 1 km (one is horizontal, the other vertical) crossing themselves at the center of the map but not recognizing themselves (There is no node representing the intersection). When I create a car, if it's outside the road network, the car has the orientation expected (135°) but if it's in an edge, it will be orientated according to the lane direction (so for the vertical edge : 0° or 180°). I would like to prevent this. regards, Timothee Corsini 2018-07-11 13:19 GMT+02:00 Jakob Erdmann <namdre.s...@gmail.com>: > Hello, > - you can set the angle argument for moveToXY to the TraciConstant > INVALID_DOUBLE_VALUE and then sumo will calculate an appropriate angle > - if you call moveToXY for the remote-controlled vehicles in every > simulation step, then sumo will not teleport/remove them but still > recognize them as obstacles. > > regards, > Jakob > > 2018-07-11 13:05 GMT+02:00 Timothée Corsini via sumo-user < > sumo-user@lists.sourceforge.net>: > >> Hi ! >> >> I am currently using SUMO with another software by using the TraCIAPI in >> C++. I managed to represent SUMO vehicles in the other software but now I >> would like to represent the vehicles from the software in SUMO. >> >> However, I do not want these vehicles to move or change their orientation >> unless I ask them to. So I changed their speed, their speedMode and >> laneChangeMode to 0, and I am moving them by using the moveToXY function. >> Still, SUMO does not change their angle in order to adpat them to the >> edges, I would like to avoid that, is it possible ? >> >> In fact I would like to control some vehicles without SUMO trying to >> teleport/move/remove them. (but still being recognized as obstacles by the >> others vehicles) Is that possible ? >> >> Else, can I simply put obstacles of the shape I want on the road (for >> exemple representing a car accident) or do I have to close the lanes >> manually in order to stop the traffic ? >> >> Sorry for the butchered langage. >> >> Regards, >> Timothee Corsini >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> sumo-user mailing list >> sumo-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/sumo-user >> _______________________________________________ >> sumo-user mailing list >> sumo-u...@eclipse.org >> To change your delivery options, retrieve your password, or unsubscribe >> from this list, visit >> https://dev.eclipse.org/mailman/listinfo/sumo-user >> > > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ sumo-user mailing list sumo-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sumo-user