Download Site: https://code.visualstudio.com/
VS Code에 필요한 extension 목록 설치
(2) github에서 다운 받은 폴더 중 다른 repository를 사용하기 때문에 다른 저장소를 하나의 sub-folder로 추가할 수 있도록 진행
$ git submodule update --init --recursive
"CORE2":
{
"tx_pin": "USBTX",
"rx_pin": "USBRX",
"baudrate": 525000,
"rtos_kernel_ms_tick": 1
}
(5) rosbot-stm32-firmware 안의 “platformio.ini” 파일안에 들어가서 다음을 제거
// remove this lines
-D ROS_NOETIC_MSGS=1
(7) ROSBOT 2.0 SBC (Tinker board)에서 flash_firmware.sh를 다음과 같이 변경 후 실행
$ sudo stm32loader -c tinker -u -W
$ sudo stm32loader -c tinker -e -v -w firmware.bin
(10) rosserial communication을 위해서 ros에서 제공하는 package를 설치
$ sudo apt install ros-melodic-rosserial* ros-melodic-serial*
(11) workspace에 있는 package들이 필요로 하는 연결된 패키지들을 모두 다운
$ rosdep install --from-paths src --ignore-src -r -y
(12) rosbot_ekf package build 진행 후, “rosbot_ekf → launch → all.launch”에서 USB port name과 mbed_lib.json에서 설정한 baudrate로 변경
<include unless="$(arg rosbot_pro)" file="$(find rosbot_ekf)/launch/rosserial_bridge.launch">
<arg name="serial_port" default="/dev/ttyUSB0"/>
<arg name="serial_baudrate" default="525000"/>
</include>
(13) rosbot_ekf에서 all.launch를 실행하면 이제는 /cmd_vel 의 topic 명을 가진다면 ROSBOT의 SBC 없이 제어 가능
# start rosserial communication
$ roslaunch rosbot_ekf all.launch
# control robot moving using teleop
$ rosrun teleop_twist_keyboard teleop_twist_keyboard.py
꼭 설치할 때, python version 문제가 생길 수 있으므로 “python3” 로 실행 (**important** 줄 참조)
# Install using `curl`
$ curl -fsSL https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py -o get-platformio.py
$ python3 get-platformio.py ******important******
# Success result
$ python3 get-platformio.py
Installer version: 0.3.5
Platform: Linux-4.4.71husarion5-armv7l-with-glibc2.25
Python version: 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0]
Python path: /usr/bin/python3
Creating a virtual environment at /home/husarion/.platformio/penv
Updating Python package manager (PIP) in a virtual environment
PIP has been successfully updated!
Virtual environment has been successfully created!
Installing PlatformIO Core
Collecting platformio
PlatformIO Core has been successfully installed into an isolated environment `/home/husarion/.platformio/penv`!
The full path to `platformio.exe` is `/home/husarion/.platformio/penv/bin/platformio`
If you need an access to `platformio.exe` from other applications, please install Shell Commands
(add PlatformIO Core binary directory `/home/husarion/.platformio/penv/bin` to the system environment PATH variable):
# should be able to run PlatformIO from terminal
$ sudo ln -s ~/.platformio/penv/bin/platformio /usr/local/bin/platformio
$ sudo ln -s ~/.platformio/penv/bin/pio /usr/local/bin/pio
$ sudo ln -s ~/.platformio/penv/bin/piodebuggdb /usr/local/bin/piodebuggdb
Reference Site: https://docs.platformio.org/en/latest/core/quickstart.html
여러 error가 등장하는데 그 종류와 해결 방안에 대해서 설명
[Error 1] This system supports the C.UTF-8 locale which is recommended. You might be able to resolve your issue by exporting the following environment variables:
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
[Solve 1] 위의 설명대로 그냥 차례대로 export LC_ALL=C.UTF-8 해주고 export LANG=C.UTF-8 이거 해주면 끝