Closed yasuohayashibara closed 2 months ago
実行方法 ただし実行してもロボットは進まなかった. /cmd_velは出力されていたので,シミュレータの問題かもしれない.
ros2 launch simulator gazebo_simulator.launch.py
cd ~/ros2_ws/src/aiformula/scripts
python3 convert_sim_to_vectornav_pose.py
以下を何度か実行
ros2 launch main_executor main_exec.launch.py
ros2 topic pub --once /autonomous std_msgs/msg/Bool "data: true"
以下の修正を行う.
mirai@DESKTOP-KO48QPB:~/ros2_ws/src/aiformula$ git diff
diff --git a/main_executor/src/main.cpp b/main_executor/src/main.cpp
index 9bf8675..a070458 100644
--- a/main_executor/src/main.cpp
+++ b/main_executor/src/main.cpp
@@ -15,19 +15,19 @@ int main(int argc, char * argv[]){
nodes_option.allow_undeclared_parameters(true);
nodes_option.automatically_declare_parameters_from_overrides(true);
mirai@DESKTOP-KO48QPB:~/ros2_ws/src/aiformula$ git diff
diff --git a/main_executor/src/main.cpp b/main_executor/src/main.cpp
index 9bf8675..a070458 100644
--- a/main_executor/src/main.cpp
+++ b/main_executor/src/main.cpp
@@ -15,19 +15,19 @@ int main(int argc, char * argv[]){
nodes_option.allow_undeclared_parameters(true);
nodes_option.automatically_declare_parameters_from_overrides(true);
- auto socketcan_node = std::make_shared<socketcan_interface::SocketcanInterface>(nodes_option);
- auto socketcan_cybergear_node = std::make_shared<socketcan_interface::SocketcanInterface>("cybergear", nodes_option);
+ //auto socketcan_node = std::make_shared<socketcan_interface::SocketcanInterface>(nodes_option);^M
+ //auto socketcan_cybergear_node = std::make_shared<socketcan_interface::SocketcanInterface>("cybergear", nodes_option);^M
auto controller_node = std::make_shared<controller::Controller>(nodes_option);
- auto roboteq_driver_node = std::make_shared<roboteq_driver::RoboteqDriver>(nodes_option);
- auto cybergear_interface_node = std::make_shared<cybergear_interface::CybergearInterface>(nodes_option);
+ //auto roboteq_driver_node = std::make_shared<roboteq_driver::RoboteqDriver>(nodes_option);^M
+ //auto cybergear_interface_node = std::make_shared<cybergear_interface::CybergearInterface>(nodes_option);^M
auto path_publisher_node = std::make_shared<gnssnav::Publisher>(nodes_option);
auto follower_node = std::make_shared<gnssnav::Follower>(nodes_option);
- exec.add_node(socketcan_node);
- exec.add_node(socketcan_cybergear_node);
+ //exec.add_node(socketcan_node);^M
+ //exec.add_node(socketcan_cybergear_node);^M
exec.add_node(controller_node);
- exec.add_node(roboteq_driver_node);
- exec.add_node(cybergear_interface_node);
+ //exec.add_node(roboteq_driver_node);^M
+ //exec.add_node(cybergear_interface_node);^M
exec.add_node(path_publisher_node);
exec.add_node(follower_node);
エラーが発生することもあるが,実行できるようになったのでissueを閉じます.
24/9/9時点での以下のブランチの実行方法を示す. https://github.com/open-rdc/aiformula/tree/feat/vectornav_sim