forked from RoboSense-LiDAR/rslidar_sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/cone-ground-plane-intersection
- Loading branch information
Showing
15 changed files
with
122 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
cmake_minimum_required(VERSION 3.14) | ||
project(ava_fake_trackdrive) | ||
|
||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
add_compile_options(-Wall -Wextra -Wpedantic) | ||
endif () | ||
|
||
find_package(ament_cmake REQUIRED) | ||
find_package(rclcpp REQUIRED) | ||
find_package(embedded_msgs REQUIRED) | ||
|
||
include_directories(include) | ||
|
||
add_executable(ava_fake_trackdrive_node src/trackdrive.cpp) | ||
ament_target_dependencies(ava_fake_trackdrive_node rclcpp embedded_msgs) | ||
|
||
install(TARGETS | ||
ava_fake_trackdrive_node | ||
DESTINATION lib/${PROJECT_NAME}) | ||
|
||
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) | ||
|
||
ament_package() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef AVA_PLANNING_NODE_HPP | ||
#define AVA_PLANNING_NODE_HPP | ||
|
||
#include "embedded_msgs/msg/trajectory_setpoints.hpp" | ||
#include "rclcpp/rclcpp.hpp" | ||
|
||
class AvaPlanningNode : public rclcpp::Node { | ||
public: | ||
AvaPlanningNode(); | ||
|
||
void on_tick(); | ||
|
||
private: | ||
rclcpp::TimerBase::SharedPtr run_timer; | ||
rclcpp::Publisher<embedded_msgs::msg::TrajectorySetpoints>::SharedPtr trajectory_publisher; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0"?> | ||
<launch> | ||
<node pkg="ava_fake_trackdrive" exec="ava_fake_trackdrive_node" name="ava_fake_trackdrive_node" respawn="true" | ||
output="screen"/> | ||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>ava_fake_trackdrive</name> | ||
<version>0.0.0</version> | ||
<description>>ava_fake_trackdrive</description> | ||
|
||
<maintainer email="dut@dut.dut">DUT</maintainer> | ||
<license>Apache License 2.0</license> | ||
|
||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
|
||
<depend>rclcpp</depend> | ||
<depend>embedded_msgs</depend> | ||
|
||
<test_depend>ament_lint_auto</test_depend> | ||
<test_depend>ament_lint_common</test_depend> | ||
|
||
<export> | ||
<build_type>ament_cmake</build_type> | ||
</export> | ||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "trackdrive.hpp" | ||
|
||
#include <chrono> | ||
|
||
using namespace std::chrono_literals; | ||
|
||
AvaPlanningNode::AvaPlanningNode() : Node("ava_planning_node") { | ||
run_timer = rclcpp::create_timer(this, get_clock(), 100ms, std::bind(&AvaPlanningNode::on_tick, this)); | ||
trajectory_publisher = create_publisher<embedded_msgs::msg::TrajectorySetpoints>("/embedded/to/TrajectorySetpoints", 1); | ||
} | ||
|
||
void AvaPlanningNode::on_tick() { | ||
embedded_msgs::msg::TrajectorySetpoints setpoints; | ||
setpoints.header.stamp = now(); | ||
setpoints.acceleration = 15; | ||
setpoints.steer_angle = 0.5f; | ||
trajectory_publisher->publish(setpoints); | ||
} | ||
|
||
int main(int argc, char **argv) { | ||
rclcpp::init(argc, argv); | ||
auto ava_planning_node = std::make_shared<AvaPlanningNode>(); | ||
RCLCPP_INFO(ava_planning_node->get_logger(), "Ava Node Main Setup"); | ||
|
||
rclcpp::Rate loop_rate(50.0); | ||
while (rclcpp::ok()) { | ||
rclcpp::spin_some(ava_planning_node); | ||
loop_rate.sleep(); | ||
} | ||
return 0; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0"?> | ||
<launch> | ||
<group> | ||
<include file="$(find-pkg-share ava_fake_trackdrive)/launch/trackdrive.launch.xml"/> | ||
</group> | ||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters