Adding Road bumps to the Road Scenario
조회 수: 17 (최근 30일)
이전 댓글 표시
Hello
I just working on driving scenario designer and I want to add some bumps on the road to check the ability of Active suspension. But i cannot find any things about bumps there.
Is there any way to add road bumps to test the active suspension system?
Best Regards,
Yousif
댓글 수: 0
답변 (1개)
Pratheek
2023년 5월 26일
Hello Yousif,
I understand that you want to add road bumps to your scenario, it is possible to add road bumps to a driving scenario in the MATLAB driving scenario designer to test an active suspension system.
One approach is to add a `roadMarking` object to the road segment and use it to define a series of small bumps. You can adjust the height and width of the bumps to match your requirements. Here's an example code snippet that adds a series of bumps to a straight road segment:
% Create a straight road segment
roadsegment = roadSegment('Segment1','SegmentLength',50);
% Define road markings to create bumps
bumpWidth = 1; % m
bumpHeight = 0.05; % m
numBumps = 10;
markings = cell(numBumps,1);
for i = 1:numBumps
xPosition = (i-1)*(roadsegment.SegmentLength/numBumps) + bumpWidth/2;
yPosition = bumpHeight/2;
markings{i} = roadMarking('Bumps','Width',bumpWidth,'Height',bumpHeight,...
'Color',[250 128 114]/255,'XPosition',xPosition,...
'YPosition',yPosition);
end
roadsegment.Markings = [roadsegment.Markings; markings];
This code creates a straight road segment of length 50 m and adds 10 road markings with bumpWidth of 1 m and bumpHeight of 0.05 m. The bumps are positioned at equal intervals along the segment, and are shaded in a reddish color ([250 128 114]/255).
You can modify this code to add bumps to any road segment in your driving scenario, and adjust the bump size and position as needed to test the active suspension system.
댓글 수: 2
kerem
2023년 11월 28일
hello pratheek
I want to detect these bumps with a camera or lidar and use them as input in the suspension system. Is this possible? Can a camera or lidar give me this information? Do you know?
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!