update 11_grab_object

This commit is contained in:
Robot 2023-11-03 22:18:58 +08:00
parent 9dda9bce2e
commit 2f82a20026
3 changed files with 63 additions and 1 deletions

View File

@ -0,0 +1,39 @@
cmake_minimum_required(VERSION 3.8)
project(mani_pkg)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find dependencies
find_package(ament_cmake REQUIRED)
# uncomment the following section in order to fill in
# further dependencies manually.
# find_package(<dependency> REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(wpr_simulation2 REQUIRED)
add_executable(grab_object src/grab_object.cpp)
ament_target_dependencies(grab_object
"rclcpp" "std_msgs" "geometry_msgs" "sensor_msgs" "wpr_simulation2"
)
install(TARGETS grab_object
DESTINATION lib/${PROJECT_NAME})
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
# the following line skips the linter which checks for copyrights
# comment the line when a copyright and license is added to all source files
set(ament_cmake_copyright_FOUND TRUE)
# the following line skips cpplint (only works in a git repo)
# comment the line when this package is in a git repo and when
# a copyright and license is added to all source files
set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()
ament_package()

View File

@ -22,7 +22,6 @@ rclcpp::Publisher<sensor_msgs::msg::JointState>::SharedPtr mani_pub;
float object_x = 0.0;
float object_y = 0.0;
float object_z = 0.0;
int count = 0;
float align_x = 1.0;
float align_y = 0.0;

View File

@ -0,0 +1,24 @@
<?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>mani_pkg</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="robot@6-robot.com">robot</maintainer>
<license>TODO: License declaration</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<depend>rclcpp</depend>
<depend>std_msgs</depend>
<depend>geometry_msgs</depend>
<depend>sensor_msgs</depend>
<depend>wpr_simulation2</depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>