sim3d.person.Bicyclist
Description
Use the sim3d.person.Bicyclist object to create a bicyclist that follows
ground in the 3D environment. After you create a sim3d.person.Bicyclist object, you
can modify aspects of the bicyclist actor by setting property values.
Creation
Description
creates a
default bicyclist object in the 3D environment.person = sim3d.person.Bicyclist()
specifies options using one or more name-value arguments. For example, to create a
bicyclist at the position [1 2 0], set person = sim3d.person.Bicyclist(Name=Value)Translation to [1 2 0;
0 0 0; 0 0 0].
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: person = sim3d.person.Bicyclist(ActorName="Bicyclist",Translation=[2
0 0; 0 0 0; 0 0 0],Rotation=[0 0 0; 0 0 0; 0 0 pi/2])
Name of actor, specified as a character array or string. If you do not specify an actor name,
then the software assigns the actor an autogenerated name. Use
this argument to set the name of the
sim3d.person.Bicyclist object.
Note
If you specify the same name as an actor that already exists, then the software appends actor name you specify with a unique identifier.
Semantic segmentation map of object class identifiers, specified as real positive scalar. For a complete list of actor IDs and their corresponding object descriptions, see Labels.
Since R2025a
Coordinate system that the actor uses for translation and rotation in the 3D environment, specified as one of these listed values:
'Default'– World coordinate system'MATLAB'– MATLAB® coordinate system'ISO8855'– ISO 8855 standard coordinate system'AERO'– SAE coordinate system'VRML'– X3D ISO standard coordinate system'SAE'– SAE coordinate system
For more details on the different coordinate systems, see Coordinate Systems in Simulink 3D Animation.
Data Types: string
Relative translation of bicycle and wheels, specified as real
3-by-3 array, in m. Use this argument to set the initial translation of the bicyclist. The
CoordinateSystem value specifies how Translation
is applied.
Translation(1,1),Translation(1,2), andTranslation(1,3)— Bicycle translation relative to its parent actor about the X-, Y-, and Z- axes. When you add an actor to the 3D environment, the default parent actor is theScene Originat(0,0,0).Translation(...,1),Translation(...,2), andTranslation(...,3)— Wheel translation relative to bicycle, about the X-, Y-, and Z- axes.
The signal contains translation information according to the bicycle and wheel locations.
| Translation | Array Element | Translation Axis |
|---|---|---|
Bicycle, XB | Translation(1,1) | X-axis |
Bicycle, YB | Translation(1,2) | Y-axis |
Bicycle, ZB | Translation(1,3) | Z-axis |
Front wheel, XF | Translation(2,1) | X-axis |
Front wheel, YF | Translation(2,2) | Y-axis |
Front wheel, ZF | Translation(2,3) | Z-axis |
Rear wheel, XR | Translation(3,1) | X-axis |
Rear wheel, YR | Translation(3,2) | Y-axis |
Rear wheel, ZR | Translation(3,3) | Z-axis |
Note
The sim3d.person.Bicyclist object implements an actor that follows the ground. Use
X, Y, and Yaw properties
to move the actor in the 3D environment. The actor object then determines the corresponding
elevation, pitch, and roll by sensing the ground terrain.
Data Types: double
Relative rotation of bicycle and wheels, specified as real
3-by-3 array, in rad. Use this argument to set the initial rotation of the bicyclist. The
CoordinateSystem value specifies how Rotation is applied.
Rotation(1,1),Rotation(1,2), andRotation(1,3)— Bicycle rotation relative to its parent actor about the X-, Y-, and Z- axes.Rotation(...,1),Rotation(...,2), andRotation(...,3)— Wheel rotation relative to bicycle, about the X-, Y-, and Z- axes.
The signal contains rotation information according to the bicycle and wheel locations.
| Rotation | Array Element | Rotation Axis |
|---|---|---|
Bicycle, RollB | Rotation(1,1) | X-axis |
Bicycle, PitchB | Rotation(1,2) | Y-axis |
Bicycle, YawB | Rotation(1,3) | Z-axis |
Front wheel, RollF | Rotation(2,1) | X-axis |
Front wheel, PitchF | Rotation(2,2) | Y-axis |
Front wheel, YawF | Rotation(2,3) | Z-axis |
Rear wheel, RollR | Rotation(3,1) | X-axis |
Rear wheel, PitchR | Rotation(3,2) | Y-axis |
Rear wheel, YawR | Rotation(3,3) | Z-axis |
Note
The sim3d.person.Bicyclist object implements an actor that follows the ground. Use
X, Y, and Yaw properties
to move the actor in the 3D environment. The actor object then determines the corresponding
elevation, pitch, and roll by sensing the ground terrain.
Data Types: double
Output Arguments
Actor object, returned as a sim3d.person.Bicyclist object.
Properties
All the properties are run-time configurable.
Parent of actor, specified as a handle to the parent actor object. After you add an actor to
the sim3d.World object, the default parent actor is the
Scene Origin at (0,0,0). Use this property to
set any actor in the 3D environment as the parent actor of a
sim3d.person.Bicyclist object.
This property is read-only.
Children of actor, specified as a structure.
Each field of the structure contains a handle to
the child of a sim3d.person.Bicyclist
object.
Parent world, specified as a handle to the parent sim3d.World
object. You can use this property only if the sim3d.person.Bicyclist object is
added to the parent sim3d.World object.
Since R2025a
Coordinate system that the actor uses for translation and rotation in the 3D environment, specified as one of these listed values:
'Default'– World coordinate system'MATLAB'– MATLAB coordinate system'ISO8855'– ISO 8855 standard coordinate system'AERO'– SAE coordinate system'VRML'– X3D ISO standard coordinate system'SAE'– SAE coordinate system
For more details on the different coordinate systems, see Coordinate Systems in Simulink 3D Animation.
Data Types: string
Longitudinal position of the actor along the X-axis of the scene,
specified as scalar, in m. Use this property to move the actor along the
X-axis of the scene. The CoordinateSystem
value specifies how X is applied.
Lateral position of the actor along the Y-axis of the scene, specified as
scalar, in m. Use this property to move the actor along the Y-axis
of the scene. The CoordinateSystem value specifies how
Y is applied.
Yaw orientation angle of the actor along the Z-axis of the scene,
specified as scalar, in rad. Use this property to rotate the actor along the
Z-axis of the scene. The CoordinateSystem
value specifies how Yaw is applied.
Examples
Since R2025a
Create a bicyclist in a 3D environment using the sim3d.person.Bicyclist object.
Create a 3D environment and set up communication with the Unreal Engine simulation environment using the output function OutputImpl. The sim3d.World object can send data about the 3D environment to the Unreal Engine at each simulation step using output function. Before the Unreal Engine simulates, MATLAB calls the output function and sends data to the Unreal Engine. Then, the Unreal Engine executes at each time step and sends data to MATLAB.
If the scene is not available, install the scene as described in the Scene name parameter of the Simulation 3D Scene Configuration block and then set the Scene argument.
world = sim3d.World(Scene="Straight road",Output=@OutputImpl);Create a bicyclist using sim3d.person.Bicyclist object and add the bicyclist to the world.
person = sim3d.person.Bicyclist( ... ActorName="Bicyclist",Translation=[0 3 0; 0 0 0; 0 0 0]); add(world,person);
Run the co-simulation.
sampletime = 0.02; stoptime = 10; run(world,sampletime,stoptime);
Output Function
The output function sends data about the actor to the Unreal Engine environment at each simulation step. For this example, the function moves the Bicyclist along X-axis by updating the X property of the Bicyclist at each simulation step.
function OutputImpl(world) world.Actors.Bicyclist.X = world.Actors.Bicyclist.X + 0.005; end
Version History
Introduced in R2024bSet the CoordinateSystem argument and
property of the sim3d.person.Bicyclist object to represent the coordinate system for actor
transformation in the 3D environment.
See Also
Simulation 3D
Bicyclist | sim3d.World | sim3d.Actor | add | run
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)