Блок кода |
---|
language | bash |
---|
title | Get information about topic |
---|
| rostopic info /<topic name> |
Блок кода |
---|
language | bash |
---|
title | Get topic data |
---|
| rostopic echo /<topic name> |
Блок кода |
---|
language | bash |
---|
title | Publish data using topic |
---|
| rostopic pub /<topic name> ... |
Touch sensor sens:The topic displays information about triggering of the capacitive sensor in head and palms of the robot. You can imitate touch using this topic. Topic data: Блок кода |
---|
| rostopic echo /sens
# received data
left_hand: False # capacitive sensor in the left palm
right_hand: False # capacitive sensor in the right palm
head_left: False # capacitive sensor in the left ear
head_right: False # capacitive sensor in the right ear
head_center: False # capacitive sensor in the center of the head |
Информация |
---|
When right_hand or left_hand triggered, robot starts to bend fingers of right or left hand respectively. When head_left or head_right or head_center triggered, robot's ears light up yellow. |
Publishing data to the topic: Блок кода |
---|
| rostopic pub /sens promobot_msgs/TouchSens "{left_hand: false, right_hand: false, head_left: false, head_right: false, head_center: false}" -1
# passing true to any key will imitate touch |
Speech recognition asr:The topic displays the following information: - the robot's readiness to recognize speech
- the recognition process
- what was recognized
You can send a replica to the robot for recognition using this topic. Topic data: Блок кода |
---|
| rostopic echo /asr
# received data
data: True # if robot is not pronouncing the text at this moment and is ready to listen to the person
---
data: False # if robot is pronouncing the text at this moment and can't listen to the person
---
rostopic echo /asr/result
# received data
header:
seq: 127 # number of recognition iterations since launch
stamp: # publication time
secs: 1617172367
nsecs: 814594122
frame_id: "asr" # asr id
source: 0 # sound source
uuid: "7d607d83-a98d-42cf-8e83-f0bcce857c91" # unique identificator
text: "hello" # recognized text
final: 1 # recognition status (1 - done, 0 - in progress)
conf: 0.899999976158 # data from google, recognition confidence coefficient
---
|
Publishing data to the topic: Блок кода |
---|
| rostopic pub /asr std_msgs/Bool "data: true" -1 # launch speech recognition
rostopic pub /asr std_msgs/Bool "data: false" -1 # stop speech recognition
rostopic pub /asr/result promobot_msgs/ASRResult "header:
seq: 0
stamp: {secs: 0, nsecs: 0}
frame_id: ''
source: 0
uuid: 'cb2726de-91f2-11eb-a8b3-0242ac130003' # you can generate it here: https://www.uuidgenerator.net/version1
text: 'test' # text for recognititon
final: 1 # inform the service that the replica is complete
conf: 1.0" # specify the coefficient
|
Pronouncing the text tts: The topic displays information about the replica which robot is pronouncing. You can send a replica to robot to pronounce using this topic. Topic data: Блок кода |
---|
| rostopic echo /tts/process
# received data
status: True # replica is being pronounced now
uuid: "{460467e7-bdee-4b28-804b-fe35dbf296a1}" # replica unique identifier
---
status: False # replica pronunciation is completed
uuid: "{460467e7-bdee-4b28-804b-fe35dbf296a1}" # replica unique identifier
---
rostopic echo /tts/start
# received data
text: "My name is Promobot" # text which is being pronounced by robot
terminate: True # whether the replica can be aborted or not
uuid: "{9597cd61-8eb5-4dfc-a5c9-994492f5355a}" # replica unique identifier
ignore_saving: False # this logic is used in microphone array
|
Publishing data to the topic: Блок кода |
---|
| rostopic pub /tts/cancel std_msgs/Empty "{}" -1 # cancels the pronunciation of the replica
rostopic pub /tts/start promobot_msgs/TTSCommand "text: 'test phrase' # sending the replica to pronunciation
terminate: false
uuid: ''
ignore_saving: false" |
Volume level:The topic displays information about the speaker volume level. You can set volume level using this topic. Topic data: Блок кода |
---|
| rostopic echo /volume
# received data
data: 81 # volume level
---
|
Changing the volume level: Блок кода |
---|
| pactl set-sink-volume $PROMOBOT_SINK_DEFAULT 30% # set volume level 30% |
Microphone sensitivity mic: The topic displays information about the sensitivity of the microphone. You can set the value of the microphone sensitivity using this topic. Topic data: Блок кода |
---|
| rostopic echo /mic
# received data
data: 81 # microphone sensitivity level
---
|
Changing microphone sensitivity: Блок кода |
---|
| pactl set-source-volume $PROMOBOT_SOURCE_DEFAULT 30% # set the microphone sensitivity level to 30% |
Drive mode:The topic displays the following information: - drive mode
- pause
- radius of movement
You can send the robot to the charging station using this topic. Topic data: Блок кода |
---|
| rostopic echo /drive/mode
# received data
data: 0 # controller mode
---
data: 1 # auto mode
---
rostopic echo /drive/radius
# received data
data: 5 # radius in meters
---
rostopic echo /drive/pause
# received data
data: False # robot is about to go / is going
---
data: True # robot is on pause
---
rostopic echo /drive/station
# received data
data: True # robot is driving to the charging station
---
data: False # robot is not trying to drive to the charging station
---
rostopic echo /drive/status
# received data
data: X
---
X - statuses:
0 - waiting
1 - start of movement
2 - end of movement
3 - cancel
4 - obstacle
5 - robot cannot turn
6 - robot is out of range (movement radius)
7 - module timed out
8 - module exited with an error
9 - module completed its work successfully |
Publishing data to the topic: Блок кода |
---|
| rostopic pub /drive/mode std_msgs/UInt16 "data: 0" -1 # activate controller mode
rostopic pub /drive/mode std_msgs/UInt16 "data: 1" -1 # activate auto mode
rostopic pub /drive/mode/switch std_msgs/Empty "{}" -1 # switch mode
rostopic pub /drive/radius std_msgs/UInt8 "data: X" -1 # set radius (meters)
rostopic pub /drive/station std_msgs/Bool "data: true" -1 # activate algorithm of searching charging station
rostopic pub /drive/station std_msgs/Bool "data: false" -1 # cancel the execution of algorithm of searching charging station
rostopic pub /drive/pause std_msgs/Bool "data: false" -1 # cancel robot's pause
rostopic pub /drive/pause std_msgs/Bool "data: true" -1 # pause the robot
rostopic pub /drive/point std_msgs/UInt16 "data: X" -1 # set robot to the map point X (int) (used in navigation) |
Charge status:The topic displays the following information: You can send the robot to the charging station using this topic. Topic data: Блок кода |
---|
| rostopic echo /charge/cur
# received data
data: x # charge current (float)
---
rostopic echo /charge/state
# received data
data: True # robot is charging
---
data: False # robot is not charging
---
rostopic echo /charge/type
# received data
data: 0 # not charging
---
data: 1 # charging via cable
---
data: 2 # charging via charging station
---
|
Publishing data to the topic: Блок кода |
---|
| rostopic pub /charge/runApplication std_msgs/Empty "{}" -1 # launch the application of sending to the charging station |
Checking the firmware version from the control boards of the robot's nodes:The topic displays information about the firmware version: - all motor control boards
- power board
- face board
- ears board
Блок кода |
---|
| rosparam get /main_controller/firmwares
# received data
['Servo 31: 56', 'Servo 32: 56', 'Servo 33: 56', 'Servo 34: 56', 'Servo 35: 56', 'Servo
36: 13', 'Servo 21: 56', 'Servo 22: 56', 'Servo 23: 56', 'Servo 24: 56', 'Servo
25: 56', 'Servo 26: 13', 'Servo 11: 56', 'Servo 12: 56', 'Servo 13: 56', 'Servo
41: 56', 'Servo 42: 56', 'Power_board: 229', 'Ear_left: 7', 'Ear_right: 7', 'Face_board:
10001']
'Servo XX: XX' - firmware version of the robot motor control boards
'Power_board: XXX' - firmware version of the robot power board
'Ear_left: X' - the firmware version of the robot's ear board
'Face_board: XXXXX' - robot face firmware version |
Calibration statuses:The topic displays information about the current status of the calibration. Topic data: Блок кода |
---|
| rostopic echo /promobot_servos/calibration_step
# received data
data: X
---
X - statuses:
0 - reset the current position to 0
1 - activation of the motor power on the servos
2 - start of movement of all nodes until the Hall sensor is triggered (motion limiter)
3 - return servos to calibration state
4 - reset the current position to 0
5 - deactivate Hall sensors
6 - activation of the motor power on the servos
|
Wheel data:The topic displays information about data from the wheels of the robot. Topic data: Блок кода |
---|
| rostopic echo /wheel/left/sensors/core # left wheel
rostopic echo /wheel/right/sensors/core # right wheel
# received data
header:
seq: 40816 # number of polling iterations since launch
stamp: # current time
secs: 1619435012
nsecs: 708189702
frame_id: '' # topic identifier (none)
state:
voltage_input: 28.1
temperature_pcb: 0.0 # wheel control board temperature
current_motor: 0.0
current_input: 0.0 # current on the wheel control board
speed: 0.0
duty_cycle: 0.0 # wheel control board parameter
charge_drawn: 10.0 # wheel control board parameter
charge_regen: 0.0 # wheel control board parameter
energy_drawn: 299.0 # wheel control board parameter
energy_regen: 0.0 # wheel control board parameter
displacement: 1814.0 # offset relative to the place where the robot was turned on
distance_traveled: 4745.0
fault_code: 0 # error code
---
|
The topic displays information about active servos. Topic data: Блок кода |
---|
| rostopic echo /promobot_servos/core
# received data (example for one of the nodes, all active servos are published in states)
states:
-
id: X # servo id
name: "X_joint" # joint name
command: X # servo control command
torque: False # servo motor power status
setPoint: -41 # given position
fault_code: 0 # error number
fault_code_str: "[]" # error description
encoderValue: 4293 # current encoder position
position: -40 # actual position
velocity: 0
motorCurrent: 2
sensors: # Hall sensor data
leftSensor: False
rightSensor: False
-
|
Distance sensors ranges:The topic displays information about the distance between the travelling platform of the robot and the obstacle. Topic data: Блок кода |
---|
| rostopic echo /rangesUS
rostopic echo /rangesTOF
# received data from sensors 1 - 16
---
s_1: 255
s_2: 255
s_3: 255
s_4: 255
s_5: 255
s_6: 255
s_7: 255
s_8: 255
s_9: 255
s_10: 255
s_11: 255
s_12: 255
s_13: 255
s_14: 255
s_15: 255
s_16: 255
s_66: 0 # sensor v3 (not up-to-date) |
Emotions animation publishing:Publishing data to the topic: Блок кода |
---|
| rostopic pub /animation/file std_msgs/String "data: 'X'" # X - gif-files name. Available gif-files are located in /opt/promobot/share/promobot_face_manager/images |
Блок кода |
---|
| rostopic echo /main_board/voltages
# received data
values:
-
name: "PC_win"
value: 15.7399997711
-
name: "PC_linux"
value: 15.7259998322
-
name: "router"
value: 28.202999115
-
name: "printer_photo"
value: 24.1870002747
-
name: "display"
value: 11.9259996414
-
name: "printer_cheque"
value: 24.1149997711
-
name: "servos"
value: 0.0 # voltage value is zero
---
rostopic echo /wheel/left/sensors/core # nothing is published in wheel topics |
Statuses and errors of the receipt printer:The topic displays information about the status and errors of the receipt printer. Блок кода |
---|
| rostopic echo /printer_thermal/status
# received data
data: X
---
X - statuses:
0 - Waiting for printing
1 - In the process of printing
2 - Printer error
3 - Printer not connected
rostopic echo /printer_thermal/error
# received data
code: X
description: "X"
---
X - error code + description:
NOT_ERROR = 0,
NO_PAPER = 1,
LOW_PAPER = 2,
PAPER_JAM = 3,
HEAD_OVERHEATED = 4,
POWER_SUPPLY = 5,
CUTTER_ERROR = 6,
RAM_ERROR = 7,
NOT_CONNECTED = 100
|
Power_board topics:The topic displays information about the line voltages of the power board. Блок кода |
---|
| rostopic echo /power_board/voltages
# received data
values:
-
name: "reserve_battery"
value: 4.04500007629
-
name: "internal"
value: 4.84899997711
-
name: "USB_HUB"
value: 5.20100021362
-
name: "ranger_sensor"
value: 9.10999965668
-
name: "16V"
value: 18.716999054
-
name: "33V_TPS"
value: 29.4580001831
-
name: "33V_divider"
value: 28.5520000458
|
The topic displays the current values of the main lines of the power board. Блок кода |
---|
| rostopic echo /power_board/currents
# received data
values:
-
name: "charge"
value: 0.0
-
name: "PC"
value: 1.36699998379
-
name: "mainboard"
value: 0.234999999404
-
name: "wheels"
value: 0.0
|
The topic is responsible for managing the power supply of devices, which is supplied through the power board. Блок кода |
---|
| rostopic pub -1 /power_board/power/hub std_msgs/ Bool "data: false" or "data: true"
rostopic pub -1 /power_board/power/pc Bool "data: false" or "data: true"
rostopic pub -1 /power_board/power/mainboard Bool "data: false" or "data: true"
rostopic pub -1 /power_board/power/rangers Bool "data: false" or "data: true"
|
Main_board topics:The topic displays information about the line voltages of the main board. Блок кода |
---|
| rostopic echo /main_board/voltages
# received data
values:
-
name: "PC_win"
value: 0.00999999977648
-
name: "PC_linux"
value: 17.5669994354
-
name: "router"
value: 0.0
-
name: "printer_photo"
value: 24.1060009003
-
name: "display"
value: 11.7620000839
-
name: "printer_cheque"
value: 24.0349998474
-
name: "servos"
value: 29.1930007935
|
The topic displays the current values of the main lines of the main board. Блок кода |
---|
| rostopic echo /main_board/currents
# received data
values:
-
name: "PC_win"
value: 0.0
-
name: "PC_linux"
value: 0.0
-
name: "router"
value: 0.00079999997979
-
name: "printer_photo"
value: 0.0
-
name: "display"
value: 0.439399987459
-
name: "printer_cheque"
value: 0.0
-
name: "servos_hand_left"
value: 0.0960000008345
-
name: "servos_head"
value: 0.0299999993294
-
name: "servos_torso"
value: 0.0299999993294
-
name: "servos_hand_right"
value: 0.109999999404
|
|