- ROS2 Dashing Diademata
- ros2arduino 0.1.3
- Micro-XRCE-DDS Agent 1.1.0
I bought below parts.
- ¥1,480 ESP32-DevKitC-32D
- ¥350 AE-TB6612
- ¥90 AZ0526
You need to setup Micro-XRCE-DDS Agent for using ros2arduino.
If you have not setup arduino environment yet, you can check the instraction at here
Make sure you need an access point.
$ git clone https://github.com/shirokunet/ros2_esp32bot
$ cd ros2_esp32bot/main/
$ cp network_config_templrate.h network_config.h
$ vi network_config.h
#define SSID ""
#define SSID_PW ""
#define AGENT_IP ""
#define AGENT_PORT 2018
And write the .ino file into your ESP32.
$ MicroXRCEAgent udp -p 2018 -v 6
If you get error messages like below:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)
Try to run.
$ LD_PRELOAD="/usr/local/lib/libfastrtps.so.1 /usr/local/lib/libfastcdr.so.1" MicroXRCEAgent udp -p 2018
$ ros2 run joy joy_node
$ ros2 run teleop_twist_joy teleop_node
$ ros2 node list
$ ros2 topic list
$ ros2 topic echo /esp32bot/status
$ ros2 topic echo /esp32bot/chatter
$ ros2 topic echo /joy
$ ros2 topic echo /cmd_vel
If you do not have a PS4 controller, you can buy F310 and use my repository.