add readme.md
This commit is contained in:
parent
1ca5b1a501
commit
f9c7100cf2
|
|
@ -9,6 +9,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <algorithm>
|
||||||
#include "geometry_msgs/msg/twist.hpp"
|
#include "geometry_msgs/msg/twist.hpp"
|
||||||
#include "rclcpp/rclcpp.hpp"
|
#include "rclcpp/rclcpp.hpp"
|
||||||
#include "nav_msgs/msg/odometry.hpp"
|
#include "nav_msgs/msg/odometry.hpp"
|
||||||
|
|
@ -58,8 +59,9 @@ private:
|
||||||
// 定位订阅
|
// 定位订阅
|
||||||
rclcpp::Subscription<geometry_msgs::msg::Pose>::SharedPtr odom_sub_;
|
rclcpp::Subscription<geometry_msgs::msg::Pose>::SharedPtr odom_sub_;
|
||||||
rclcpp::TimerBase::SharedPtr timer_;
|
rclcpp::TimerBase::SharedPtr timer_;
|
||||||
//
|
|
||||||
std::unique_ptr<tf2_ros::TransformBroadcaster> tf_broadcaster_;
|
// 坐标转换broadcaster
|
||||||
|
std::unique_ptr<tf2_ros::TransformBroadcaster> tf_broadcaster_; // odom -> baselink
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// odom path info
|
// odom path info
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
/***************************Webots simulation*************************/
|
||||||
|
This repository contains the simulation code based on Webots2023a.
|
||||||
|
And it is communcatied by ros2 foxy, visualized by rviz2.
|
||||||
|
|
||||||
|
Package name: sweet_webots_robot
|
||||||
|
Communication Schematic diagram:
|
||||||
|

|
||||||
|
1. rm -rf build install log
|
||||||
|
2. colcon build
|
||||||
|
3. source install/setup.bash
|
||||||
|
4. ros2 launch sweet_webots_robot sweet_webots_robot.launch.py
|
||||||
|
5. ros2 run sweet_webots_robot path_visualizer
|
||||||
|
|
||||||
|
|
@ -639,9 +639,6 @@ void PathVisualizer::publishVehicleTF()
|
||||||
|
|
||||||
tf_broadcaster_->sendTransform(transform);
|
tf_broadcaster_->sendTransform(transform);
|
||||||
}
|
}
|
||||||
#include <vector>
|
|
||||||
#include <cmath>
|
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
void PathVisualizer::densifyPath(double interval)
|
void PathVisualizer::densifyPath(double interval)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 104 KiB |
Loading…
Reference in New Issue