open-simulation-interface icon indicating copy to clipboard operation
open-simulation-interface copied to clipboard

How is speed limit in LogicalLane related to <speed> tag in OpenDRIVE?

Open xuanyuxin opened this issue 1 year ago • 1 comments

I tried to define speed limit both for lane and road in an OpenDRIVE file:

<road name="cubic_road" length="1.4644343507055999e+03" id="0" junction="-1">
        <link>
        </link>
		<speed max="80.0" unit="km/h"/>
...
<lane id="-7" type="border" level= "false">
                        <speed sOffset="0.0" max="80.0" unit="km/h"/>
...

However, I am not able to get the speed limit properly in OSI trace, i.e. the following Python code prints nothing:

self.msg = GroundTruth()
...
for m in self.msg.logical_lane:
    print('      lane speed limit:', m.traffic_rule.speed_limit.speed_limit_value.value)
for m in self.msg.road_marking:
    print('      road speed limit:', m.road_marking.value.value)

I see in the proto file (osi_logicallane.proto and osi_trafficsign.proto), the speed_limit_value and its value is optional, am I accessing it correct or is there another way to examine whether the speed limit actually exists or not?

message SpeedLimit {
    optional TrafficSignValue speed_limit_value = 1;
}
...
message TrafficSignValue
{
    optional double value = 1;
}

Thank you very much!

xuanyuxin avatar Jun 19 '24 09:06 xuanyuxin

@xuanyuxin You seem to be using some software to read an OpenDRIVE map and convert it to OSI. Without knowing which software you use, I'm afraid we won't be able to help you.

tbleher avatar Oct 29 '25 10:10 tbleher