Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated on TurtleBot3_Manipulation maintenance #73

Open
wants to merge 10 commits into
base: humble-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion turtlebot3_manipulation/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>
ROS 2 package for turtlebot3_manipulation
</description>
<maintainer email="willson@robotis.com">Will Son</maintainer>
<maintainer email="pyo@robotis.com">Pyo</maintainer>
<license>Apache 2.0</license>
<url type="website">https://emanual.robotis.com/docs/en/platform/turtlebot3/manipulation/</url>
<url type="repository">https://github.com/ROBOTIS-GIT/turtlebot3_manipulation</url>
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion turtlebot3_manipulation_bringup/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>
ROS 2 package for turtlebot3_manipulation
</description>
<maintainer email="willson@robotis.com">Will Son</maintainer>
<maintainer email="pyo@robotis.com">Pyo</maintainer>
<license>Apache 2.0</license>
<url type="website">https://emanual.robotis.com/docs/en/platform/turtlebot3/manipulation/</url>
<url type="repository">https://github.com/ROBOTIS-GIT/turtlebot3_manipulation</url>
Expand Down
2 changes: 1 addition & 1 deletion turtlebot3_manipulation_cartographer/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>
ROS 2 launch scripts for cartographer
</description>
<maintainer email="willson@robotis.com">Will Son</maintainer>
<maintainer email="pyo@robotis.com">Pyo</maintainer>
<license>Apache 2.0</license>
<url type="website">https://emanual.robotis.com/docs/en/platform/turtlebot3/manipulation/</url>
<url type="repository">https://github.com/ROBOTIS-GIT/turtlebot3_manipulation</url>
Expand Down
2 changes: 1 addition & 1 deletion turtlebot3_manipulation_description/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>
ROS 2 package for turtlebot3_manipulation_description
</description>
<maintainer email="willson@robotis.com">Will Son</maintainer>
<maintainer email="pyo@robotis.com">Pyo</maintainer>
<license>Apache 2.0</license>
<url type="website">https://emanual.robotis.com/docs/en/platform/turtlebot3/manipulation/</url>
<url type="repository">https://github.com/ROBOTIS-GIT/turtlebot3_manipulation</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ https://github.com/ROBOTIS-GIT/open_manipulator/blob/kinetic-devel/open_manipula
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="${meshes_file_direction}/link1.stl" scale="0.001 0.001 0.001"/>
<box size="0.05 0.05 0.05"/>
</geometry>
</collision>

Expand Down Expand Up @@ -207,6 +207,12 @@ https://github.com/ROBOTIS-GIT/open_manipulator/blob/kinetic-devel/open_manipula
</inertial>
</link>

<joint name="${prefix}gripper_right_joint_mimic" type="fixed">
<parent link="${prefix}link5" />
<child link="dummy_mimic_fix" />
</joint>
<link name="dummy_mimic_fix"/>

<joint name="${prefix}gripper_right_joint" type="prismatic">
<parent link="${prefix}link5"/>
<child link="${prefix}gripper_right_link"/>
Expand Down
39 changes: 39 additions & 0 deletions turtlebot3_manipulation_example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
cmake_minimum_required(VERSION 3.8)
project(turtlebot3_manipulation_example)

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)
find_package(moveit_ros_planning_interface REQUIRED)
find_package(rclcpp REQUIRED)

add_executable(hello_moveit src/hello_moveit.cpp)
target_include_directories(hello_moveit PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_compile_features(hello_moveit PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
ament_target_dependencies(
hello_moveit
"moveit_ros_planning_interface"
"rclcpp"
)

install(TARGETS hello_moveit
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()
21 changes: 21 additions & 0 deletions turtlebot3_manipulation_example/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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>turtlebot3_manipulation_example</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="[email protected]">robotis</maintainer>
<license>TODO: License declaration</license>

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>moveit_ros_planning_interface</depend>
<depend>rclcpp</depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
54 changes: 54 additions & 0 deletions turtlebot3_manipulation_example/src/hello_moveit.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Modify the MoveIt tutorial as much as you like using the basic example.
// Author: Sungho Woo

#include <memory>

#include <rclcpp/rclcpp.hpp>
#include <moveit/move_group_interface/move_group_interface.h>

int main(int argc, char * argv[])
{
// Initialize ROS and create the Node
rclcpp::init(argc, argv);
auto const node = std::make_shared<rclcpp::Node>(
"hello_moveit",
rclcpp::NodeOptions().automatically_declare_parameters_from_overrides(true)
);

// Create a ROS logger
auto const logger = rclcpp::get_logger("hello_moveit");

// Create the MoveIt MoveGroup Interface
using moveit::planning_interface::MoveGroupInterface;
auto move_group_interface = MoveGroupInterface(node, "arm");

// Set a target Pose
auto const target_pose = []{
geometry_msgs::msg::Pose msg;
msg.orientation.w = 1.0;
msg.position.x = 0.2;
msg.position.y = 0.0;
msg.position.z = 0.2;
return msg;
}();
move_group_interface.setPoseTarget(target_pose);
move_group_interface.setGoalJointTolerance(0.01);
move_group_interface.setGoalOrientationTolerance(0.01);

// Create a plan to that target pose
auto const [success, plan] = [&move_group_interface]{
moveit::planning_interface::MoveGroupInterface::Plan msg;
auto const ok = static_cast<bool>(move_group_interface.plan(msg));
return std::make_pair(ok, msg);
}();

// Execute the plan
if(success) {
move_group_interface.execute(plan);
} else {
RCLCPP_ERROR(logger, "Planing failed!");
}
// Shutdown ROS
rclcpp::shutdown();
return 0;
}
2 changes: 1 addition & 1 deletion turtlebot3_manipulation_hardware/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Changelog for package turtlebot3_manipulation_hardware
* MoveIt environment configured
* use ros2_control framework instead of ROBOTIS custom library
* removed dependency to `turtlebot3_*`` and `open_manipulator` packages
* Contributors: Hye-Jong KIM, Darby Lim, Will Son
* Contributors: Hye-Jong KIM, Darby Lim, Will Son
2 changes: 1 addition & 1 deletion turtlebot3_manipulation_hardware/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>
ROS 2 package for turtlebot3_manipulation_hardware
</description>
<maintainer email="willson@robotis.com">Will Son</maintainer>
<maintainer email="pyo@robotis.com">Pyo</maintainer>
<license>Apache 2.0</license>
<url type="website">https://emanual.robotis.com/docs/en/platform/turtlebot3/manipulation/</url>
<url type="repository">https://github.com/ROBOTIS-GIT/turtlebot3_manipulation</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ hardware_interface::CallbackReturn TurtleBot3ManipulationSystemHardware::on_init

dxl_joint_commands_.resize(4, 0.0);
dxl_joint_commands_[0] = 0.0;
dxl_joint_commands_[1] = -1.57;
dxl_joint_commands_[2] = 1.37;
dxl_joint_commands_[3] = 0.26;
dxl_joint_commands_[1] = -1.05;
dxl_joint_commands_[2] = 1.05;
dxl_joint_commands_[3] = 0.0;

dxl_gripper_commands_.resize(2, 0.0);

Expand Down
2 changes: 1 addition & 1 deletion turtlebot3_manipulation_moveit_config/.setup_assistant
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ moveit_setup_assistant_config:
- position
state:
- position
- velocity
- velocity
2 changes: 1 addition & 1 deletion turtlebot3_manipulation_moveit_config/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Changelog for package turtlebot3_manipulation_moveit_config
* MoveIt environment configured
* use ros2_control framework instead of ROBOTIS custom library
* removed dependency to `turtlebot3_*`` and `open_manipulator` packages
* Contributors: Hye-Jong KIM, Darby Lim, Will Son
* Contributors: Hye-Jong KIM, Darby Lim, Will Son
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ arm:
kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin
kinematics_solver_search_resolution: 0.005
kinematics_solver_timeout: 0.05
position_only_ik: false
position_only_ik: True
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ self_collision_proximity_threshold: 0.01 # Start decelerating when a self-collis
scene_collision_proximity_threshold: 0.02 # Start decelerating when a scene collision is this far [m]
# Parameters for "stop_distance"-type collision checking
collision_distance_safety_factor: 1000.0 # Must be >= 1. A large safety factor is recommended to account for latency
min_allowable_collision_distance: 0.01 # Stop if a collision is closer than this [m]
min_allowable_collision_distance: 0.01 # Stop if a collision is closer than this [m]
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@
<disable_collisions link1="link1" link2="wheel_left_link" reason="Never"/>
<disable_collisions link1="link1" link2="wheel_right_link" reason="Never"/>
<disable_collisions link1="link2" link2="link3" reason="Adjacent"/>
<disable_collisions link1="link2" link2="link4" reason="Adjacent"/>
<disable_collisions link1="link2" link2="wheel_left_link" reason="Never"/>
<disable_collisions link1="link2" link2="wheel_right_link" reason="Never"/>
<disable_collisions link1="link3" link2="link4" reason="Adjacent"/>
<disable_collisions link1="link3" link2="link5" reason="Never"/>
<disable_collisions link1="link3" link2="wheel_left_link" reason="Never"/>
<disable_collisions link1="link3" link2="wheel_right_link" reason="Never"/>
<disable_collisions link1="link4" link2="link5" reason="Adjacent"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def generate_launch_description():
"moveit_manage_controllers": True,
"trajectory_execution.allowed_execution_duration_scaling": 1.2,
"trajectory_execution.allowed_goal_duration_margin": 0.5,
"trajectory_execution.allowed_start_tolerance": 0.01,
"trajectory_execution.allowed_start_tolerance": 0.05,
}

# Moveit Controllers
Expand All @@ -120,13 +120,15 @@ def generate_launch_description():
"publish_geometry_updates": True,
"publish_state_updates": True,
"publish_transforms_updates": True,
"publish_robot_description": True,
"publish_robot_description_semantic": True
}

ld = LaunchDescription()
use_sim = LaunchConfiguration('use_sim')
declare_use_sim = DeclareLaunchArgument(
'use_sim',
default_value='false',
default_value='true',
description='Start robot in Gazebo simulation.')
ld.add_action(declare_use_sim)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
def generate_launch_description():
moveit_config = MoveItConfigsBuilder("turtlebot3_manipulation",
package_name="turtlebot3_manipulation_moveit_config").to_moveit_configs()
return generate_setup_assistant_launch(moveit_config)
return generate_setup_assistant_launch(moveit_config)
2 changes: 1 addition & 1 deletion turtlebot3_manipulation_moveit_config/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>
An automatically generated package with all the configuration and launch files for using the turtlebot3_manipulation with the MoveIt Motion Planning Framework
</description>
<maintainer email="willson@robotis.com">Will Son</maintainer>
<maintainer email="pyo@robotis.com">Pyo</maintainer>
<license>BSD</license>
<url type="website">http://moveit.ros.org/</url>
<url type="bugtracker">https://github.com/ros-planning/moveit2/issues</url>
Expand Down
2 changes: 1 addition & 1 deletion turtlebot3_manipulation_navigation2/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>
ROS 2 launch scripts for navigation2
</description>
<maintainer email="willson@robotis.com">Will Son</maintainer>
<maintainer email="pyo@robotis.com">Pyo</maintainer>
<license>Apache 2.0</license>
<author email="[email protected]">Darby Lim</author>
<author email="[email protected]">Pyo</author>
Expand Down
2 changes: 1 addition & 1 deletion turtlebot3_manipulation_teleop/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Changelog for package turtlebot3_manipulation_teleop
* MoveIt environment configured
* use ros2_control framework instead of ROBOTIS custom library
* removed dependency to `turtlebot3_*`` and `open_manipulator` packages
* Contributors: Hye-Jong KIM, Darby Lim, Will Son
* Contributors: Hye-Jong KIM, Darby Lim, Will Son
2 changes: 2 additions & 0 deletions turtlebot3_manipulation_teleop/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ find_package(nav_msgs REQUIRED)
find_package(control_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(rclcpp_action REQUIRED)

add_executable(turtlebot3_manipulation_teleop src/turtlebot3_manipulation_teleop.cpp)
target_include_directories(turtlebot3_manipulation_teleop PUBLIC
Expand All @@ -37,6 +38,7 @@ ament_target_dependencies(
"control_msgs"
"sensor_msgs"
"std_srvs"
"rclcpp_action"
)

install(TARGETS turtlebot3_manipulation_teleop
Expand Down
Loading
Loading