Skip to content

RaccoonBot ​

Instance declaration ​

When you add a RaccoonBot block to the workspace, the following instance declaration is automatically inserted into the Python code:

python
raccoon = RaccoonBot(0)
# When there are multiple instances
raccoon_1 = RaccoonBot(1)

Parameters ​

NameKindDescriptionRange / TypeDefault
indexDropdown optionInstance number (starting from 0)Integer 0 or greater0

Turn joint motor control on / off ​

Decides whether to release or keep the control applied to each joint motor.
If you do not set it, all joints start with motor control turned on.

motor

Parameters ​

NameKindDescriptionRange / TypeDefault
unitDropdown optionJoint numberall (-1), 1 (1), 2 (2), 3 (3), 4 (4)-1
onCheckboxMotor control ON / OFFTRUE / FALSETRUE

Python ​

python
raccoon = RaccoonBot(0)

# All joints, motor control off
raccoon.motor(-1, False)

# Joint no. 1, motor control on
raccoon.motor(1, True)

Set joint speed ​

Sets the speed of the selected joint.

speed_joint

Parameters ​

NameKindDescriptionRange / TypeDefault
jointDropdown optionJoint numberall (-1), 1 (1), 2 (2), 3 (3), 4 (4)-
dataInput (block)Joint speedInteger -100 to 100-

Python ​

python
raccoon = RaccoonBot(0)

raccoon.set_speed_joint(1, 100)

Change joint speed ​

Changes the speed of the selected joint.

change_speed_joint

Parameters ​

NameKindDescriptionRange / TypeDefault
jointDropdown optionJoint numberall (-1), 1 (1), 2 (2), 3 (3), 4 (4)-
dataInput (block)Amount of speed changeInteger -200 to 200-

Python ​

python
raccoon = RaccoonBot(0)

raccoon.change_speed_joint(1, 50)

Set all joint speeds at once ​

Sets the speed of all four joints at once.

speed_joints

Parameters ​

NameKindDescriptionRange / TypeDefault
dataInput (array)Array of the four joint speeds[joint1, joint2, joint3, joint4], each -100 to 100-

Python ​

python
raccoon = RaccoonBot(0)

# Literal array [10, 20, 30, 40]
raccoon.set_speed_joints(10, 20, 30, 40)

# Array in a variable
raccoon.set_speed_joints(*arr)

Set the speed of joint angle control ​

Sets the speed at which joints are controlled in angle control mode.

angle_speed

Parameters ​

NameKindDescriptionRange / TypeDefault
dataInput (block)Maximum speed of angle controlInteger 0 to 100-

Python ​

python
raccoon = RaccoonBot(0)

raccoon.angle_max_speed(100)

Set joint angle ​

Sets the angle of the selected joint.

jointminmax
1-120120
2-9030
3-1500
4-105105
angle_joint

Parameters ​

NameKindDescriptionRange / TypeDefault
jointDropdown optionJoint numberall (-1), 1 (1), 2 (2), 3 (3), 4 (4)-
dataInput (block)Joint angle (degrees)See the table above (clamped automatically)-
waitCheckboxWhether to wait for completionTRUE / FALSETRUE

Python ​

python
raccoon = RaccoonBot(0)

raccoon.set_angle_joint(1, 90, wait=True)

Change joint angle ​

Changes the angle of the selected joint.

change_angle_joint

Parameters ​

NameKindDescriptionRange / TypeDefault
jointDropdown optionJoint numberall (-1), 1 (1), 2 (2), 3 (3), 4 (4)-
dataInput (block)Amount of angle change (degrees)See the table above (clamped automatically)-
waitCheckboxWhether to wait for completionTRUE / FALSETRUE

Python ​

python
raccoon = RaccoonBot(0)

raccoon.change_angle_joint(1, 10, wait=True)

Set all joint angles at once ​

Sets the angle of all four joints at once.

angle_joints

Parameters ​

NameKindDescriptionRange / TypeDefault
dataInput (array)Array of the four joint angles, or a posture name[j1, j2, j3, j4] array-
waitCheckboxWhether to wait for completionTRUE / FALSETRUE

Python ​

python
raccoon = RaccoonBot(0)

# Explicit array
raccoon.set_angle_joints(0, 0, 0, 0, wait=True)

Initialize the joint state ​

Sets the angle of all four joints to a predefined posture ('zero', 'park', 'home').

default_angle_joints

Parameters ​

NameKindDescriptionRange / TypeDefault
dataDropdownPosture name'zero' / 'park' / 'home'-
waitCheckboxWhether to wait for completionTRUE / FALSETRUE

Posture presets:

  • 'zero' → [0, 0, 0, 0]
  • 'park' → [0, 25, -145, -60]
  • 'home' → [0, -10, -140, 60]

Python ​

python
raccoon = RaccoonBot(0)

# Posture preset
raccoon.set_angle_joints('home', wait=True)

Save the joint angles ​

Saves the current encoder values to a variable of your choice.

save_encoder

Parameters ​

NameKindDescriptionRange / TypeDefault
encoderVariableName of the variable to save toVariable-
dataInput (array)Initial array to saveA 4-element array or an empty array-

Python ​

python
raccoon = RaccoonBot(0)
encoder = None

encoder = raccoon.save_encoder([3, -6, -73, 60])

Set a particular coordinate value ​

Moves the robot arm by setting a particular coordinate value.
The range of each coordinate is as follows.
Relative to the wrist => x: -20.0 cm to 20.0 cm, y: -10.0 cm to 20.0 cm, z: -2.0 mm to 28.0 cm
Relative to the gripper => the range can differ depending on the device you connect.
The direction of the gripper is fixed either horizontal or vertical to the ground.
If you enter a coordinate that cannot be reached, the command is skipped.

set_coordinate

Parameters ​

NameKindDescriptionRange / TypeDefault
originDropdown optionOriginwrist, end effector (end_effector)-
posDropdown optionAxisx, y, z-
dataInput (block)Coordinate valuex: -20 to 20 cm, y: -10 to 20 cm, z: -2 to 28 cm-
unitDropdown optionUnitcm, mm, inchcm
waitCheckboxWhether to wait for completionTRUE / FALSETRUE

Python ​

python
raccoon = RaccoonBot(0)

# Set the x coordinate to 10 cm
raccoon.set_coordinate('wrist', 'x', 10, 'cm', wait=True)

# The z coordinate relative to end_effector
raccoon.set_coordinate('end_effector', 'z', 15, 'cm', wait=True)

Change a particular coordinate value ​

Moves the robot arm by changing a particular coordinate value relative to the current position.
The range of each coordinate is as follows.
Relative to the wrist => x: -20.0 cm to 20.0 cm, y: -10.0 cm to 20.0 cm, z: -2.0 mm to 28.0 cm
Relative to the gripper => the range can differ depending on the device you connect.
The direction of the gripper is fixed either horizontal or vertical to the ground.
If you enter a coordinate that cannot be reached, the command is skipped.

change_coordinate

Parameters ​

NameKindDescriptionRange / TypeDefault
originDropdown optionOriginwrist, end effector (end_effector)-
posDropdown optionAxisx, y, z-
dataInput (block)Amount of coordinate changeReal number-
unitDropdown optionUnitcm, mm, inchcm
waitCheckboxWhether to wait for completionTRUE / FALSETRUE

Python ​

python
raccoon = RaccoonBot(0)

raccoon.change_coordinate('wrist', 'y', 5, 'cm', wait=True)

Move to xyz coordinates ​

Sets the x, y, and z coordinates to the specified values all at once.

set_coordinates

Parameters ​

NameKindDescriptionRange / TypeDefault
originDropdown optionOriginwrist, end effector (end_effector)-
xInput (block)x coordinateReal number-
yInput (block)y coordinateReal number-
zInput (block)z coordinateReal number-
unitDropdown optionUnitcm, mm, inchcm
waitCheckboxWhether to wait for completionTRUE / FALSETRUE

Python ​

python
raccoon = RaccoonBot(0)

raccoon.set_coordinates('wrist', 0, 15, 20, 'cm', wait=True)

Set the end effector lock ​

Sets the direction in which the gripper is locked. Once the option is set to horizontal or vertical, you can no longer control the speed or angle of joint 4.

lock

Parameters ​

NameKindDescriptionRange / TypeDefault
modeDropdown optionLock directionnone, horizontal, vertical-

Python ​

python
raccoon = RaccoonBot(0)

raccoon.lock('horizontal')

Pick / place an object with the end effector ​

Picks up or places an object with the end effector.
Depending on the unit dropdown value, one of two methods is called.

end_effector

Parameters ​

NameKindDescriptionRange / TypeDefault
unitDropdown optionActionpick (close), place (open)-

Python ​

python
raccoon = RaccoonBot(0)

# unit = "pick"
raccoon.pick()
# unit = "place"
raccoon.place()

End effector device ​

The number of the gripper currently connected
(1, 3, 4: tong gripper, 2: vacuum gripper)

end_effector_device

Parameters ​

(none)

Python ​

python
raccoon = RaccoonBot(0)

raccoon.end_effector_device()

End effector status ​

Whether the gripper is holding an object
(0: released, 1: holding)

end_effector_status

Parameters ​

(none)

Python ​

python
raccoon = RaccoonBot(0)

raccoon.end_effector_status()

Play a note ​

RaccoonBot plays the specified note.

sound_note

Parameters ​

NameKindDescriptionRange / TypeDefault
noteDropdown optionNoteDo (C), Do# (C#), Re (D), Re# (D#), Mi (E), Fa (F), Fa# (F#), Sol (G), Sol# (G#), La (A), La# (A#), Si (B)-
octaveDropdown optionOctave1, 2, 3, 4, 5, 6, 74

Python ​

python
raccoon = RaccoonBot(0)

raccoon.sound_note('D', 5)

Play a sound clip ​

RaccoonBot plays a particular sound clip.

sound_clip

Parameters ​

NameKindDescriptionRange / TypeDefault
clipDropdown optionSound clip name'mute', 'beep', 'siren', 'robot', 'connect', 'wake_up', 'start', 'bye', and so on-
waitCheckboxWhether to wait for completionTRUE / FALSETRUE

Python ​

python
raccoon = RaccoonBot(0)

raccoon.sound_clip('siren', wait=True)

Sound off ​

Turns off the sound of RaccoonBot.

sound_off

Parameters ​

(none)

Python ​

python
raccoon = RaccoonBot(0)

raccoon.sound_off()

Encoder value ​

The encoder value of the selected joint

encoder

Parameters ​

NameKindDescriptionRange / TypeDefault
jointDropdown optionJoint number (or all joints)1, 2, 3, 4, all (-1)-1

Python ​

python
raccoon = RaccoonBot(0)

# joint = 1
raccoon.encoder(1)

# All joints
raccoon.encoder(-1)

Coordinate of the selected element ​

Returns the current xyz coordinates of the reference point.
If you omit pos, it returns the whole [x, y, z] array; if you specify it, it returns only that axis value.

coordinate

Parameters ​

NameKindDescriptionRange / TypeDefault
originDropdown optionOriginwrist, end effector (end_effector)wrist
posDropdown optionAxis (or all)x, y, z, xyz (omit to return the whole array)None (all)

Python ​

python
raccoon = RaccoonBot(0)

# A particular axis
raccoon.get_coordinates('wrist', 'x')

# All (a 3-element array)
raccoon.get_coordinates('wrist')

Signal strength value ​

The signal strength

signal_strength

Parameters ​

(none)

Python ​

python
raccoon = RaccoonBot(0)

raccoon.signal_strength()

Battery voltage ​

The battery voltage

battery

Parameters ​

(none)

Python ​

python
raccoon = RaccoonBot(0)

raccoon.battery()

Is the button pressed? ​

Whether the selected button is pressed or a click event has occurred

button

Parameters ​

NameKindDescriptionRange / TypeDefault
unitDropdown optionButton nameteach, play, power, delete, any-
eventDropdown optionKind of eventpressed, click, long click (long_click)-

Python ​

python
raccoon = RaccoonBot(0)

raccoon.button('teach', 'pressed')

Set the conveyor speed ​

Sets the speed of the conveyor belt. The speed ranges from -100 to 100.

conveyor_speed

Parameters ​

NameKindDescriptionRange / TypeDefault
dataInput (block)Conveyor speedInteger -100 to 100-

Python ​

python
raccoon = RaccoonBot(0)

raccoon.set_conveyor_speed(100)

Set the conveyor travel distance ​

Moves the conveyor a certain distance.

conveyor_distance

Parameters ​

NameKindDescriptionRange / TypeDefault
dataInput (block)Distance to moveReal number 0 or greater-
unitDropdown optionDistance unitcm, mm, inchcm
waitCheckboxWhether to wait for completionTRUE / FALSETRUE

Python ​

python
raccoon = RaccoonBot(0)

raccoon.conveyor_move(50, 'cm', wait=True)

Change the conveyor speed ​

Changes the speed of the conveyor belt.

change_conveyor_speed

Parameters ​

NameKindDescriptionRange / TypeDefault
dataInput (block)Amount of speed changeInteger -200 to 200-

Python ​

python
raccoon = RaccoonBot(0)

raccoon.change_conveyor_speed(10)

Stop the conveyor ​

Stops the conveyor.

stop_conveyor

Parameters ​

(none)

Python ​

python
raccoon = RaccoonBot(0)

raccoon.stop_conveyor()

Is the conveyor running? ​

Whether the conveyor belt is running

conveyor_running

Parameters ​

(none)

Python ​

python
raccoon = RaccoonBot(0)

raccoon.conveyor_running()

Is the conveyor button pressed? ​

Whether the button on the conveyor is pressed or a click event has occurred

conveyor_button

Parameters ​

NameKindDescriptionRange / TypeDefault
eventDropdown optionKind of eventpressed, click, long click (long_click)-

Python ​

python
raccoon = RaccoonBot(0)

raccoon.conveyor_button('pressed')