vsclab
user.email=n26104256@gs.ncku.edu.tw
user.name=112-VSCLAB.Wun
[colcon build Error]: this step
# Input
colcon build --symlink-install --merge-install
# Output
ROS2 error: can‘t find examples_rclcpp_minimal_subscriber/Release/wait_set_subscriber
[colcon build error]
C:\dev\ros2_ws>colcon build --merge-install --packages-select my_package
[1.125s] colcon.colcon_core.package_identification WARNING Failed to parse ROS package manifest in 'src\my_package': Error(s) in package 'src\my_package\package.xml':
Invalid email "Delta Robot@todo.todo" for person "Delta Robot"
Starting >>> my_package
--- stderr: my_package
Error parsing 'C:/dev/ros2_ws/src/my_package/package.xml':
Traceback (most recent call last):
File "C:/dev/ros2_humble/ros2-windows/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py", line 150, in <module>
main()
File "C:/dev/ros2_humble/ros2-windows/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py", line 53, in main
raise e
File "C:/dev/ros2_humble/ros2-windows/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py", line 49, in main
package = parse_package_string(
File "C:\Python38\lib\site-packages\catkin_pkg\package.py", line 788, in parse_package_string
pkg.validate(warnings=warnings)
File "C:\Python38\lib\site-packages\catkin_pkg\package.py", line 330, in validate
raise InvalidPackage('\n'.join(errors), self.filename)
catkin_pkg.package.InvalidPackage: Error(s) in package 'C:/dev/ros2_ws/src/my_package/package.xml':
Invalid email "Delta Robot@todo.todo" for person "Delta Robot"
CMake Error at C:/dev/ros2_humble/ros2-windows/share/ament_cmake_core/cmake/core/ament_package_xml.cmake:95 (message):
execute_process(C:/Python38/python.exe
C:/dev/ros2_humble/ros2-windows/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py
C:/dev/ros2_ws/src/my_package/package.xml
C:/dev/ros2_ws/build/my_package/ament_cmake_core/package.cmake) returned
error code 1
Call Stack (most recent call first):
C:/dev/ros2_humble/ros2-windows/share/ament_cmake_core/cmake/core/ament_package_xml.cmake:49 (_ament_package_xml)
C:/dev/ros2_humble/ros2-windows/share/ament_lint_auto/cmake/ament_lint_auto_find_test_dependencies.cmake:31 (ament_package_xml)
CMakeLists.txt:32 (ament_lint_auto_find_test_dependencies)
---
Failed <<< my_package [0.72s, exited with code 1]
Summary: 0 packages finished [1.16s]
1 package failed: my_package
1 package had stderr output: my_package
C:/dev/ros2_ws/src/my_package/package.xml
改成有效 email[Visual Studio Code IncludePath Issue with ROS headers]
# .vscode/c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**",
"C:/dev/ros2_humble/ros2-windows/include/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"windowsSdkVersion": "10.0.17763.0",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe",
"cStandard": "c17",
"cppStandard": "c++17",
"intelliSenseMode": "windows-msvc-x64"
}
],
"version": 4
}
# Create a workspace
mkdir delta_ros2_ws\src
cd delta_ros2_ws\src
# Create a ros2 package named "delta" and dependencies
ros2 pkg create --build-type ament_cmake delta --dependencies rclcpp std_msgs example_interfaces
src/delta/package.xml
<description>Delta Robot with ROS2</description>
<maintainer email="vsclab.youbot@gmail.com">Delta Robot</maintainer>
<license>Apache License 2.0</license>
delta_ros2_ws/src/delta/include/delta
delta_ros2_ws/src/delta/src
colcon build --event-handlers console_direct+
$ set COLCON_EXTENSION_BLOCKLIST=colcon_core.event_handler.desktop_notification
# Custom Lib
include_directories(include) # Find the include directories
add_library(savedata src/SaveData.cpp) # add library definition
target_link_libraries(main savedata) # Link to the executable ("main")
set(IMC_LIB_PATH "C:/Program Files (x86)/ITRI/IMP3/IDDL/Library/VC/IMC3Driver.lib") # At Program Files(x86)
target_link_libraries(main ${IMC_LIB_PATH})
add_library(motioncard src/delta/MotionCard.cpp) # Compile "MotionCard.cpp"
ament_target_dependencies(motioncard rclcpp std_msgs example_interfaces)
target_include_directories(motioncard
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
- 打开 Control Panel
- 选择 Region (and Language)
- 选择 Administrative 页签
- 在 Language for non-Unicode programs 区域点击 "Change System Locale" 按钮
- 设置 Current system locale,比如 English (United States)。
- 点击 "OK" 保存。
先備知識
命令 | 行為 | 備註 |
---|---|---|
Servo ON | 馬達 鬆 煞車 | |
Servo OFF | 馬達 拉 煞車 |
graph TD;
緊急停機旋鈕壓下-->關閉控制箱總電源-->執行清命令程式-->開啟控制箱總電源-->旋開緊急開關-->按下藍色RESET鈕-->一人先扶著手臂,另一人再按下ServoON-->手臂復位-->ServoOFF
ros2 communication between two virtual machines
# Step 1: 確認兩台VM的IP位址
$ ip a # Ubuntu 20.04 up
$ ipconfig # Windows
# Step 2: 互相ping對方
$ ping 192.168.aaa.aaa -c 3 # Ubuntu ([-c] 代表ping的次數)
$ ping 192.168.bbb.bbb # Windows
# Step 3: 設定相同號碼的$ROS_DOMAIN_ID
$ export ROS_DOMAIN_ID=5 # 設定Ubuntu環境變數
$ echo $ROS_DOMAIN_ID # 查看Ubuntu環境變數
> 5
$ set ROS_DOMAIN_ID=5 # 設定Windows環境變數
$ echo %ROS_DOMAIN_ID% # 查看Windows環境變數
> 5