JetBot
Inherits from: WheeledRobot
JetBot
JetBot(ip, locomotion_port, camera_port)
Initialize a JetBot robot instance.
IP address of the JetBot.
locomotion_port (str), optional
defaults to “8040”.
Port number for locomotion control. Defaults to “8040”.
camera_port (str), optional
defaults to “8050”.
Port number for camera access. Defaults to “8050”.
getPosition
getPosition is not implemented for JetBot
getOrientation
getOrientation is not implemented for JetBot
getImage
JetBot.getImage(camera_name: Union[str, None], image_type: Union[str, None])
Return the image of camera. JetBot only has one camera so the arguments are ignored.
camera_name (optional, Union[str, None])
unused, jetbot only has one camera
image_type (optional, Union[str, None])
unused, jetbot only has rgb images
Image
requested image and it capture parameters
setMotors
JetBot.setMotors(left_speed: float, right_speed: float)
Sets the speed of the motors for the JetBot. These values should be [-1.0, 1.0]
Speed of the left motor [-1, 1]
Speed of the right motor [-1, 1]
stop
Stops the motors of the JetBot
setCarControls
JetBot.setCarControls(steering: float, throttle: float, brake: float)
Control the JetBot using ackermann steering. Does not adjust speed, only steering
throttle (float), optional
setCarTargetSpeed
JetBot.setCarTargetSpeed(velocity: float, scaling_factor: float)
Set the speed of the JetBot for Ackermann control. Does not adjust steering
scaling_factor (float), optional
Reduce the speed of the jetbot since 1.0
for jetbot is considerably faster than AirGenCar
rotate
JetBot.rotate(rate: float, duration: Union[float, None], scaling_factor: float)
Rotate the JetBot in place
Throttle rate to apply during rotation. Positive rotates right, negative rotates left
duration (optional, Union[float, None])
How long to rotate in seconds
scaling_factor (float), optional
defaults to 8.
Scaling factor for the rate to make it behave similar to simulation. Defaults to 8.0
moveByVelocity (inherited)
JetBot.moveByVelocity(linear_velocity: Velocity, angular_velocity: Velocity, duration: float | None)
Move the robot by setting linear and angular velocity.
linear_velocity (Velocity)
Velocity
Linear velocity object containing x_vel component
angular_velocity (Velocity)
Velocity
Angular velocity object containing z_vel component
duration (float | None), optional
defaults to None.
Optional duration in seconds to move for before stopping. Defaults to None.