Slide 1

Slide 1 text

ۙ౻ ๛ ɹ໺࡚ ߞฏɹ֎ؙ හ޺ɹଜ੉ ࿨౎ɹ೔୆ ݈Ұɹࣉా ߞࢤ גࣜձࣾPreferred Robotics https://www.pfrobotics.jp Ոఉ༻ࣗ཯ҠಈϩϘοτ ʮΧνϟΧʯͷ։ൃऀAPIެ։ͱ ROS 2ΠϯλʔϑΣΠε࣮૷

Slide 2

Slide 2 text

@youtalk ۙ౻ ๛ • 2021/11~ Preferred Robotics PjM / ΤϯδχΞ • 2019/8 #ROS2Ͱ͸͡ΊΑ͏ ग़൛ • 2018/5~ Preferred Networks ΤϯδχΞ • 2018~ ROSCon JP ࣮ߦҕһ • 2013/4~ ΧϫμϩϘςΟΫε ओ೚ • 2013/3 ಸྑઌ୺େ Ph.D 2

Slide 3

Slide 3 text

• 2021/11 Preferred Networks ΑΓ෼ࣾԽ • ࣗ཯ҠಈϩϘοτͷ੡඼Խɾ ࣄۀԽʹ஫ྗ • B2C / B2B྆ࣄۀͷಉ࣌ਐߦ 3 @pfrobotics

Slide 4

Slide 4 text

CEATEC Japan 2018 ͢΂ͯͷਓʹϩϘοτΛ

Slide 5

Slide 5 text

https://youtu.be/VGj3daiFNdM

Slide 6

Slide 6 text

https://kachaka.life εϚʔτϑΝχνϟʔϓϥοτϑΥʔϜ ΧνϟΧ

Slide 7

Slide 7 text

https://youtu.be/SdVglHOJgiA

Slide 8

Slide 8 text

@kachaka_jp • Ոఉ༻ࣗ཯ҠಈϩϘοτ • Ո۩ͷࣗಈӡൖΛ௨ͯ͡෺ͷҠಈɺ ย෇͚ɺश׳ԽͳͲΛαϙʔτ • ຊମɿ228,000ԁ • ΧνϟΧγΣϧϑɿ23,800ԁʙ • αϒεΫϦϓγϣϯɿ980ԁ/݄ 8

Slide 9

Slide 9 text

https://www.instagram.com/youtalk/reels/ 9

Slide 10

Slide 10 text

ROSCon JP 2023 ͢΂ͯͷҠಈϩϘοτ։ൃऀʹ ΧνϟΧAPIΛ

Slide 11

Slide 11 text

ΧνϟΧAPI • εϚϑΥΞϓϦ૬౰ͷAPIΛ֎෦։ൃऀʹެ։ • gRPCͷ.protoϑΝΠϧɺPythonΫϥΠΞϯτ ϥΠϒϥϦɺROS 2ϒϦοδͷఏڙ • ROS 2ϒϦοδ͸֎෦PC࣮ߦ • Apache License 2.0 https://github.com/pf-robotics/ kachaka-api 11

Slide 12

Slide 12 text

ΧνϟΧAPI • Pythonϓϩάϥϛϯά͸ΧνϟΧ ମ಺ͷJupyterLabͰ࣮ߦՄೳ • ΧνϟΧAPIͷ։ൃʹඞཁͳ΋ͷ͸ ϒϥ΢β͚ͩ 12

Slide 13

Slide 13 text

60ഒ଎

Slide 14

Slide 14 text

ΧνϟΧAPIఏڙػೳ • Ո۩ӡൖɺ໨త஍Ҡಈ • ೚ҙͷҐஔ࢟੎Ҡಈ • ଎౓ࢦྩ • ൃ࿩ • Ո۩Ұཡऔಘɺ໨త஍Ұཡऔಘ • ίϚϯυ࣮ߦཤྺҰཡऔಘ • ࣗಈॆిɺखಈૢ࡞ͷઃఆ • ΦυϝτϦʢࣗݾҐஔͱݱࡏ଎౓ʣऔಘ • IMUσʔλऔಘ • LiDAR఺܈σʔλऔಘ • લΧϝϥը૾औಘ • ෺ମೝࣝ݁ՌʢਓɺՈ۩ɺॆిثɺ൶ʣऔಘ • ΧνϟΧϚοϓऔಘ ίϚϯυ࣮ߦ ηϯαग़ྗ 14

Slide 15

Slide 15 text

ROS 2ϒϦοδఏڙػೳ $ ros2 service list | grep -v parameter /kachaka/auto_homing/set_enabled /kachaka/manual_control/set_enabled $ ros2 action list /kachaka/kachaka_command/execute $ ros2 interface list | grep kachaka .../msg/KachakaCommand .../msg/Location .../msg/LocationList .../msg/ObjectDetection .../msg/ObjectDetectionListStamped .../msg/Shelf .../msg/ShelfList .../msg/ShelfSize .../action/ExecKachakaCommand $ ros2 topic list | grep kachaka /kachaka/front_camera/camera_info /kachaka/front_camera/image_raw /kachaka/front_camera/image_raw/compressed /kachaka/imu/imu /kachaka/layout/locations/list /kachaka/layout/shelves/list /kachaka/lidar/scan /kachaka/manual_control/cmd_vel /kachaka/mapping/map /kachaka/object_detection/result /kachaka/odometry/odometry /kachaka/robot_info/version /kachaka_description/joint_states /kachaka_description/robot_description 15

Slide 16

Slide 16 text

ΧνϟΧ gRPC ίϯςφ gRPC UIαʔό εϚʔτϑΥϯ ΧνϟΧ ΞϓϦ gRPC APIαʔό Playground ίϯςφ JupyterLab αʔό ࣗ࡞gRPC ϓϩάϥϜ ୺຤ ϒϥ΢β ֎෦PC ros2_bridge ίϯςφ kachaka_grpc _ros2_bridge ࣗ࡞ROS 2 ϓϩάϥϜ ֎෦PC ࣗ࡞gRPC ϓϩάϥϜ 19

Slide 17

Slide 17 text

YComponent XComponent RobotInfoComponent ΧνϟΧ gRPC ίϯςφ gRPC APIαʔό Ros2TopicBridge< kachaka_api::GetRobotVersionResponse, std_msgs::msg::String> Converter ros2_msg->data = grpc_msg.version() https://github.com/pf-robotics/kachaka-api/blob/main/ros2/ kachaka_grpc_ros2_bridge/src/component/robot_info_component.cpp ΧνϟΧιϑτ΢ΣΞͷόʔδϣϯΛ Pub͢ΔROS 2ίϯϙʔωϯτ ~/version τϐοΫPub GetRobotVersion RPCݺͼग़͠ 22

Slide 18

Slide 18 text

ΧνϟΧAPIܦ༝ͰͷφϏήʔγϣϯ • ExecKachakaCommand ΞΫγϣϯΛRViz2ͷ2D Goal Poseػೳʹద༻ • લΧϝϥʹΑΔSemantic SegmentationɺLiDARɺ ToF͢΂ͯΛηϯαʔ౷߹ • Ո۩ͷੵࡌ༗ແͰInflation Map΋มԽ

Slide 19

Slide 19 text

Navigation 2ʹΑΔφϏήʔγϣϯ • https://github.com/ros- planning/navigation2 Λɹɹ ϦϞʔτϒϨΠϯͰ࣮ߦՄೳ • ηϯαʔ৘ใ͸LiDARͷΈ • ΧνϟΧAPIͰ͸ະఏڙͷ Path΍Inflation Mapදࣔʹɹ ରԠ

Slide 20

Slide 20 text

ΧνϟΧιϑτ΢ΣΞຊؾͷφϏήʔγϣϯ • ੑೳࣗମ͸ΧνϟΧAPIܦ༝ ͱ΄΅ಉ༷ʢϒϦοδʹ൐͏Φʔόʔϔουͳ͠ʣ • ΧνϟΧAPIͰ͸ະఏڙͷ Semantic Segmentationɺ ToF͕࢖༻Մೳ • ToF API͸ϓϥΠόγʔ໰୊ Λղܾޙɺఏڙ༧ఆ 25

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

ΧνϟΧAPI ROS 2ϒϦοδTips

Slide 23

Slide 23 text

CompressedImageͷར༻ Tips • ඇѹॖը૾τϐοΫ͸Hz͕௿͍͕ɺ JPEGը૾τϐοΫ͸Hz͕ߴ͍ • remap͢Ε͹RViz2ͳͲͰ΋ඳըՄೳ $ ros2 topic hz /kachaka/front_camera/ image_raw average rate: 1.961 $ ros2 topic hz /kachaka/front_camera/ image_raw/compressed average rate: 8.672 $ rviz2 --ros-args --remap /kachaka/front_camera/image_raw/camera_info:= /kachaka/front_camera/camera_info Image CompressedImage 28

Slide 24

Slide 24 text

෺ମೝࣝΞϓϦέʔγϣϯ • ಠࣗͷֶशσʔληοτͳͷͰ ਓ͸଍͚ͩͰ΋ೝࣝՄೳ • ΧνϟΧγΣϧϑ͸Χόʔ༗ແɺ ੵࡌ༗ແʹݶΒͣೝࣝՄೳ • Network Architecture Searchʹ ΑΔݶք·ͰͷܰྔԽ • ਓ௥ैɺՈ۩ࣗಈൃݟͳͲʹɹ Ԡ༻Մೳ 29 ਓ Ո۩ ॆిث ൶ Tips

Slide 25

Slide 25 text

IMUΞϓϦέʔγϣϯ Tips • XYZ࣠ͷฒਐՃ଎౓ͱZ࣠ ͷճస଎౓Λग़ྗ • Ωουφοϓݕग़ɺస౗ɹ ݕग़ͳͲʹԠ༻Մೳ 30

Slide 26

Slide 26 text

ηϯαʔτϐοΫͷQoSઃఆ Tips • ΧνϟΧͷηϯαʔτϐοΫ͸͢΂ͯrclcpp::SensorDataQoSΛ࢖༻ • ReliabilityΛBest Effortʹઃఆ͠ͳ͍ͱɺτϐοΫΛSubͰ͖ͳ͍ͷͰ஫ҙ

Slide 27

Slide 27 text

cmd_velͷ҆શػೳ Tips • લΧϝϥͷSemantic SegmentationɺLiDARɺToFʹΑΔඇৗఀࢭػೳ͕༗ޮ • ޙୀ͸҆શػೳ͕ͳ͍ʢͿ͔ͭΔʣ • ࣗಈॆిػೳͷແޮԽ͸Մೳ • Remap͢Ε͹ROS 2ඪ४ύοέʔδͱ΋૬ੑྑ͠ $ ros2 service call /kachaka/auto_homing/set_enabled std_srvs/srv/SetBool "data: true" $ ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args --remap /cmd_vel:=/kachaka/manual_control/cmd_vel 32

Slide 28

Slide 28 text

kachaka_grpc_ros2_bridgeͷϩʔΧϧ࣮ߦ Tips • ros2_bridgeίϯςφΛ࢖ΘͣɺϩʔΧϧ࣮ߦ͢Δ͜ͱ΋Մೳ • https://github.com/pf-robotics/kachaka-api/blob/main/Dockerfile.ros2 Λࢀߟʹ $ cd ~/kachaka-api/ros2/kachaka_grpc_ros2_bridge $ protoc -I ~/kachaka-api/protos --grpc_out gen-src --plugin=protoc-gen-grpc=/usr/bin/grpc_cpp_plugin --cpp_out=gen-src ~/src/kachaka-api/protos/kachaka-api.proto $ mkdir -p ~/kachaka-api-ros/src $ ln -s ~/kachaka-api/ros2/kachaka_* ~/kachaka-api-ros/src/ $ cd ~/kachaka-api-ros $ rosdep install --from-paths src --ignore-src -r -y $ colcon build $ source ~/kachaka-api-ros/install/setup.zsh $ ros2 launch kachaka_grpc_ros2_bridge grpc_ros2_bridge.launch.xml server_uri:=$KACHAKA_IP:26400 33

Slide 29

Slide 29 text

ΧνϟΧAPIϫʔΫγϣοϓࢿྉ • 9/15ʹ։࠵͞ΕͨΧνϟΧAPIϫʔΫ γϣοϓͷߨٛࢿྉ • 15෼͋Ε͹ɺࣗ͝୐ͷΧνϟΧͰAPI ϫʔΫγϣοϓͷݸਓֶश͕Մೳ https://github.com/pf-robotics/kachaka-api/ blob/main/docs/kachaka_api_workshop.ipynb Tips 34

Slide 30

Slide 30 text

ฐࣾΤϯδχΞʹΑΔQiitaهࣄ https://qiita.com/organizations/pfrobotics Tips

Slide 31

Slide 31 text

GitHub Discussionsͷ׆༻ Tips • ΧνϟΧAPI͸͋͘·ͰίϛϡχςΟʔ αϙʔτ • GitHub DiscussionsͰͷ౼࿦ɺGitHub IssuesͰͷ໰୊ఏىɺGitHub PRʹΑΔ OSSߩݙɺ͓଴͓ͪͯ͠Γ·͢ https://github.com/pf-robotics/ kachaka-api/discussions 36

Slide 32

Slide 32 text

https://x.com/hakuturu583/status/ 1681886045212909568?s=20 ΑΓసࡌ https://x.com/ko1_baseba11/status/ 1692509808845549620?s=20 ΑΓసࡌ https://x.com/_ame_a_/status/ 1692888644951163357?s=20 ΑΓసࡌ https://x.com/daijiro/status/ 1699307339839582379?s=20 ΑΓసࡌ https://x.com/hakuturu583/status/ 1702158560803828034?s=20 ΑΓసࡌ https://x.com/_ame_a_/status/ 1703417718018625814?s=20 ΑΓసࡌ 37

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

֤छECαΠτͰઈࢍൃചத https://store.kachaka.life/ https://rt-net.jp/service/kachaka/ https://www.amazon.co.jp/stores/Kachaka/page/ 194F8B15-D2F4-46CE-B591-F722A5D0B2F7 https://www.rakuten.co.jp/kachaka/ ެࣜαΠτ ެඅɾߍඅ෷͍ ༗ྉαϙʔτ ཌ೔഑ૹ AmazonϙΠϯτ ָఱܦࡁݍ ָఱϙΠϯτ 40

Slide 35

Slide 35 text

๏ਓ޲͚ຊ֨ಋೖ։࢝ • ΧνϟΧ͕ҩྍɾ෱ࢱɺҿ৯ۀքͳ ͲΛத৺ʹɺࣄۀͷݱ৔ʹ͓͍ͯ΋ ׆༻͕ਐΜͰ͍Δ͜ͱΛड͚ɺ๏ਓ ޲͚αΠτΛΦʔϓϯ • https://kachaka.life/business/

Slide 36

Slide 36 text

ΧνϟΧϥ΢ϯδ • ؙͷ಺ςϥε಺ʹ͋Δձһ੍γΣΞ εϖʔεOCA TOKYOʹΧνϟΧͷ γϣʔϧʔϜ͕Φʔϓϯ • https://prtimes.jp/main/html/rd/p/ 000000012.000115855.html • https://note.kachaka.life/n/ nde611aa906fa

Slide 37

Slide 37 text

HAPiiBOT • ΞϚϊ༷ͱڞಉ։ൃͨ͠খܕচચড়ϩϘοτ • Preferred Robotics͕φϏήʔγϣϯγεςϜɺAI ϏδϣϯɺΤοδCPUϘʔυͳͲΛ։ൃ https://www.amano.co.jp/Clean/hapiibot.html ΑΓసࡌ 43

Slide 38

Slide 38 text

https://youtu.be/-dkSf5Wor64 ΑΓసࡌ

Slide 39

Slide 39 text

Cursor • gRPCʹ͸ͳ͍ಠࣗͷ࢓૊Έ • cursorൺֱʹΑΔσʔλऔಘͷطಡ؅ཧͱ ϩϯάϙʔϦϯάΛಋೖ • cursor = 0ͷͱ͖ɺͦͷ࣌఺ͷ࠷৽஋Λड৴ • cursor = Xͷͱ͖ɺαʔόଆ͕cursor != Xʹ ͳΔ·Ͱ଴ػ͠ɺσʔλΛड৴ • ॏෳड৴ɺ࠶ૹɺ࠷৽σʔλͷΈड৴ͳͲ ͷ՝୊ʹରԠ message Metadata { sfixed64 cursor = 1; } message GetRequest { Metadata metadata = 1; } message GetRobotSerialNumberResponse { Metadata metadata = 1; string serial_number = 2; } service KachakaApi { rpc GetRobotSerialNumber (GetRequest) returns (GetRobotSerialNumberResponse); } https://github.com/pf-robotics/kachaka-api/ blob/main/protos/kachaka-api.proto ൈਮ 45

Slide 40

Slide 40 text

cursor = 0ͷέʔε 46

Slide 41

Slide 41 text

cursor != 0ͷέʔε