Re: [sumo-user] Fully Controlled Vehicle

2018-07-11 Thread Jakob Erdmann
SUMO assumes control of vehicles as soon as they are no longer controlled
remotely. This also resets their angle to the road angle. If you call
simulationStep with a 1000ms increment but the simulation runs at 10ms then
the angle will definitely be reset because the vehicle is under SUMO
control for 99 steps out of 100.

2018-07-11 16:47 GMT+02:00 Timothée Corsini :

> I might not use everytime the moveToXY function.
> SimulationStep is called with the argument time which is incremented each
> time by 1000 ms, it should be reduced later, we didn't want to send too
> much messages per second.
> I have set the --step-length option to 0.01 (10 ms) in order to see a more
> continuous circulation of the vehicles in SUMO-GUI.
>
> Does that mean that for every step (even the ones I do not communicate
> with) I should send a moveToXY command ?
>
> I am currently looking for errors, I might have done some mistakes in the
> communications.
>
> 2018-07-11 16:17 GMT+02:00 Jakob Erdmann :
>
>> This is working as expected at least in our tests.
>>
>> do you call moveToXY in every simulation step?
>> did you set the --step-length option for sumo?
>> are you using any arguments for when calling simulationStep()?
>>
>> 2018-07-11 14:46 GMT+02:00 Timothée Corsini :
>>
>>> 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 :
>>>
 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-u...@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-u...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sumo-user
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/sumo-user
>


>>>
>>
>
__

Re: [sumo-user] Fully Controlled Vehicle

2018-07-11 Thread Jakob Erdmann
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-u...@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-u...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sumo-user
> ___
> sumo-user mailing list
> sumo-user@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/sumo-user
>
___
sumo-user mailing list
sumo-user@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user


[sumo-user] Fully Controlled Vehicle

2018-07-11 Thread Timothée Corsini via sumo-user
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-u...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sumo-user
___
sumo-user mailing list
sumo-user@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user