2023-07-21 04:41:35 -0500 | received badge | ● Famous Question
(source)
|
2022-07-28 08:12:35 -0500 | received badge | ● Nice Question
(source)
|
2022-07-20 11:19:45 -0500 | marked best answer | How to use planners in Moveit? Hi Community,
i'm a newbie of ROS and i'm working on a project in which i have to control a robot Yumi of ABB (IRB 14000), searching in the web i found the ROS packages for the Yumi link. After playing around and working with the same points i have notice that each time i'm executing the code the trajectory is different and sometimes very different, there is a way to constraint better the choice of the trajectory?
I searched and found that changing the file: "ompl_planning.yaml" is possible to change and add different planners and so i changed this the RRTConnect into: RRTConnectkConfigDefault:
type: geometric::RRTConnect
optimization_objective: MaximizeMinClearanceObjective
range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup()
goal_bias: 0.05
delay_collision_checking: 1
in order to achieve better accuracy, but this is not true, do you have some advices/references?
Thank you so much PS: I'm using ROS Kinetic |
2022-07-20 11:19:38 -0500 | marked best answer | moveit takes a lot of time for plan and execute Hi community,
I'm a newbie of ROS and i had started to work with a Yumi robot of ABB (IRB 14000).
In order to use ROS Kinetic (with ubuntu 16.04) with this robot i followed these guides and installed these packages
Now i'm in some trouble with the trajectory planning mainly because: - The trajectory planning takes a lot of time also for very easy poses: for example
- The planners do "whatever they want"
(but probably i fixed with my old
question link
text)
- Sometime the planner does not compute the path for no reason
I searched a lot in the web and i had setted/changed different parameters in the ompl_planning.yaml file. For example now i'm using: RRTstarkConfigDefault:
type: geometric::RRTstar
termination_condition: Iteration[10]
range: 0.0 # Max motion added to tree. ==> maxDistance_ default: 0.0, if 0.0, set on setup()
goal_bias: 0.05 # When close to goal select goal, with this probability? default: 0.05
delay_collision_checking: 1 # Stop collision checking as soon as C-free parent found. default 1
Is there are also a "good way" to program the motion? I followed all the tutorials regarding Python language because is the one that i'm using and the code written by me is: #!/usr/bin/env python
import copy
from typing import Any
from moveit_msgs.msg import *
from moveit_commander import *
from std_msgs.msg import String
import geometry_msgs.msg
from yumi_utils import PI, gripper_effort
from yumi_hw.srv import *
from tf.transformations import quaternion_from_euler, concatenate_matrices, euler_matrix, quaternion_from_matrix
# Arm IDs
RIGHT = 1 # :ID of the right arm
LEFT = 2 # :ID of the left arm
BOTH = 3 # :ID of both_arms
# Defining the measure of the table
table_height = 0.025 # [m] :The height of the upper surface of the table (z)
table_length = 1.200 # [m] :The width of the table (y)
table_width = 0.400 # [m] :The width of the table (x)
# Length of the Gripper from datasheet
z_gripper = 0.136 # [m]
# Distance of the center of the cam from yumi_link_7_r
z_cam = 0.040 # [m]
# Length of the test tube
length_tube = 0.125 # [m]
# Choice of the planners
planner = "RRTstarkConfigDefault" # Asymptotic optimal tree-based planner
# planner = "ESTkConfigDefault" # Default: tree-based planner
# planner = "RRTConnectConfigDefault" # Tree-based planner
# planner = "PRMstarkConfigDefault" # Probabilistic Roadmap planner
planning_attempts = 100 # planning attempts
planning_time = 50 # [s] Planning time for computation
# Defining the workspace [min X, min Y, min Z, max X, max Y, max Z]
ws_R = [0.000, -table_length/2, table_height, 0.600, 0.200, 0.593]
ws_L = [0.000, -0.200, table_height, 0.600, table_length, 0.593]
# Initialization of the Node
rospy.init_node('demo_test', anonymous=True, log_level=rospy.DEBUG)
# Initialization of Moveit
rospy.loginfo('Starting the Initialization')
roscpp_initialize(sys.argv)
robot = RobotCommander()
scene = PlanningSceneInterface()
mpr = MotionPlanRequest()
rospy.sleep(1.0)
# Left arm
group_l = MoveGroupCommander("left_arm")
# Type of planner
group_l.set_planner_id(planner)
group_l.set_pose_reference_frame("yumi_body")
# Setting the workspace
group_l.set_workspace(ws=ws_L)
# Replanning
group_l.allow_replanning(True)
group_l.set_goal_tolerance(0.005)
group_l.set_num_planning_attempts(planning_attempts)
group_l.set_planning_time(planning_time)
# Right arm
group_r = MoveGroupCommander("right_arm")
# Type of planner
# group_r.set_planner_id(planner)
group_r.set_pose_reference_frame("yumi_body ... (more) |
2022-02-14 12:18:20 -0500 | received badge | ● Famous Question
(source)
|
2022-02-14 12:18:20 -0500 | received badge | ● Notable Question
(source)
|
2021-11-15 17:58:23 -0500 | marked best answer | How to setup a C++ project for moveit? Hi i'm a newbie of ROS and C++, i worked with python for some months and i would like to start to use C++ which is well supported. I am using ROS Kinetic with Ubuntu 16.04 and Qt-creator with ROS plugin as IDE.
I created a new workspace with: catkin build and a new package with: catkin_create_pkg test1 roscpp rospy std_msgs .
I opened the CMakeLists.txt inside the package and i modified this in this way: cmake_minimum_required(VERSION 3.0.2)
project(test1)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
)
find_package(moveit_ros_planning_interface)
include_directories(${moveit_ros_planning_interface_DIR})
find_package(Eigen3 REQUIRED)
include_directories(SYSTEM ${EIGEN3_INCLUDE_DIRS})
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES test1
# CATKIN_DEPENDS roscpp rospy std_msgs moveit_ros_planning_interface
# DEPENDS system_lib
)
include_directories(
# include
${catkin_INCLUDE_DIRS}
)
add_executable(test1 src/moveit_tutorial.cpp)
I created this simple C++ script like the moveit tutorials in order to practice: #include <ros/ros.h>
#include <moveit/move_group_interface/move_group_interface.h>
#include <moveit/planning_scene_interface/planning_scene_interface.h>
#include <moveit_msgs/DisplayRobotState.h>
#include <moveit_msgs/DisplayTrajectory.h>
#include <moveit_msgs/AttachedCollisionObject.h>
#include <moveit_msgs/CollisionObject.h>
int main(int argc, char **argv)
{
// Inizializzazione nodo ROS
ros::init(argc, argv, "moveit_tutorial");
ros::NodeHandle node_handle;
ros::AsyncSpinner spinner(1);
spinner.start();
ROS_INFO("HELLO! NODO INIT");
// Nome del gruppo
static const std::string PLANNING_GROUP = "manipulator";
moveit::planning_interface::MoveGroupInterface move_group(PLANNING_GROUP);
// Raw pointers are frequently used to refer to the planning group for improved performance.
const robot_state::JointModelGroup* joint_model_group =
move_group.getCurrentState()->getJointModelGroup(PLANNING_GROUP);
geometry_msgs::Pose target_pose1;
target_pose1.orientation.w = 1.0;
target_pose1.position.x = 0.10;
target_pose1.position.y = -0.1;
target_pose1.position.z = 0.3;
move_group.setPoseTarget(target_pose1);
moveit::planning_interface::MoveGroupInterface::Plan plan1;
bool success = (move_group.plan(plan1) == moveit::planning_interface::MoveItErrorCode::SUCCESS);
ROS_INFO_NAMED("tutorial", "visualizing plan 1 (pose goal) %s", success ? "" : "FAILED");
// usa move_group.move() quando usi un vero robot
// Pianificare un joint-space goal
// RobotState oggetto che contiene tutte le posizioni attuali pos/vel/acc
moveit::core::RobotStatePtr current_state = move_group.getCurrentState();
// Current set of joint values
std::vector<double> joint_group_position;
// copia da current state i valori dei giunti
current_state->copyJointGroupPositions(joint_model_group, joint_group_position);
// modifico un valore di un giunto
joint_group_position[0] = -1.0;
move_group.setJointValueTarget(joint_group_position);
moveit::planning_interface::MoveGroupInterface::Plan plan2;
success = (move_group.plan(plan2) == moveit::planning_interface::MoveItErrorCode::SUCCESS);
ROS_INFO("HA AVUTO SUCCESSO? %s", success ? "SI" : "NO");
if (success)
{
move_group.execute(plan2);
}
ros::shutdown();
return 0;
}
On the IDE i receive this error: moveit_tutorial.cpp:40:43: error: member reference type 'robot_state::RobotStatePtr' (aka 'int') is not a pointer And after sourcing the workspace and building i received: Errors << test1:make /home/kappa95/ur5_tests/logs/test1/build.make.004.log
In file included from /opt/ros/kinetic/include/moveit/macros/class_forward.h:40:0,
from /opt/ros/kinetic/include/moveit/move_group_interface/move_group_interface.h:41,
from /home/kappa95/ur5_tests/src/test1/src/moveit_tutorial.cpp:13:
/opt/ros/kinetic ... (more) |
2021-10-31 08:18:17 -0500 | received badge | ● Famous Question
(source)
|
2021-10-28 00:54:47 -0500 | received badge | ● Famous Question
(source)
|
2021-08-24 07:05:30 -0500 | received badge | ● Notable Question
(source)
|
2021-08-11 17:04:09 -0500 | received badge | ● Notable Question
(source)
|
2021-07-31 09:19:59 -0500 | received badge | ● Nice Answer
(source)
|
2021-06-14 06:54:31 -0500 | received badge | ● Popular Question
(source)
|
2021-06-08 01:58:30 -0500 | received badge | ● Notable Question
(source)
|
2021-05-19 11:15:47 -0500 | received badge | ● Famous Question
(source)
|
2021-05-04 06:31:30 -0500 | asked a question | microROS - rclc add subscription does not execute always the callback microROS - rclc add subscription does not execute always the callback
Hi community,
I am using microROS on a raspberry p |
2021-04-28 07:27:05 -0500 | received badge | ● Popular Question
(source)
|
2021-04-26 21:53:38 -0500 | received badge | ● Student
(source)
|
2021-04-26 05:34:19 -0500 | received badge | ● Notable Question
(source)
|
2021-04-23 08:50:22 -0500 | received badge | ● Popular Question
(source)
|
2021-04-23 08:06:17 -0500 | received badge | ● Self-Learner
(source)
|
2021-04-23 08:05:37 -0500 | edited answer | ros2 node list doesn not show node - Raspberry Pico The solution was related more on the compiler for the Raspberry which for microros requires the 9.3.1 and not the 6.3.1 |
2021-04-23 08:01:23 -0500 | answered a question | ros2 node list doesn not show node - Raspberry Pico The solution was related more on the compiler for the Raspberry which for microros requires the 9.3.1 and not the 6.3.1 |
2021-04-23 08:01:23 -0500 | received badge | ● Rapid Responder
(source)
|
2021-04-23 07:54:57 -0500 | commented question | ros2 node list doesn not show node - Raspberry Pico There isn't doctor in Dashing distro, was introduced in Eloquent. In anycase the problem is "solved". I post the answer |
2021-04-23 05:21:40 -0500 | commented question | ros2 node list doesn not show node - Raspberry Pico Actually there isn't the topic
|
2021-04-23 03:18:38 -0500 | asked a question | ros2 node list doesn not show node - Raspberry Pico ros2 node list doesn not show node - Raspberry Pico
Hi community,
I started to use a Raspberry Pico RP2040 in order to |
2021-04-22 01:52:09 -0500 | marked best answer | RCUTILS logging macro vs ROS_INFO Hi Community,
I am starting to studying ROS2 in order to start to work with Realtime and Lifecycle nodes. I would like to ask which are the differences between the rcutils and the classical debugging/printout methods provided by ROS2 like ROS_INFO .
The usage of these tools like rcutils have better performances for realtime and are suitable for these applications? |
2021-04-22 01:52:06 -0500 | commented answer | RCUTILS logging macro vs ROS_INFO |
2021-04-22 01:51:11 -0500 | received badge | ● Popular Question
(source)
|
2021-04-19 15:05:03 -0500 | commented answer | Client doesn't return when you create a client class ROS2 Thank you so much! The answer is very clear! So it means that each time I'm creating a service or a client I am using a |
2021-04-19 14:59:24 -0500 | marked best answer | Client doesn't return when you create a client class ROS2 Hi community,
I would like to write a client and server node using classes. I started writing the client in a class "form" using the tutorial in the documentation and I used the same messages and the same identical code for the server node.
I wanted to create a client class which is querying each 500ms the same msg to the server. Searching on the ROS Answer I found a similar question. And using a solution like that I got that the client now is stuck in a deadlock or similar because send the first request but later no and the code continue to run. The client that I had written is this: #include "rclcpp/rclcpp.hpp"
#include "example_interfaces/srv/add_two_ints.hpp"
#include <chrono>
#include <cstdlib>
#include <memory>
#include <functional>
using namespace std::chrono_literals;
class client_foo : public rclcpp::Node
{
public:
client_foo(const std::string &node_name) : rclcpp::Node(node_name)
{
client_ = this->create_client<example_interfaces::srv::AddTwoInts>("servizio", rmw_qos_profile_services_default);
cb_grp_client_ = this->create_callback_group(rclcpp::callback_group::CallbackGroupType::MutuallyExclusive);
while (!client_->wait_for_service(1s))
{
if (!rclcpp::ok())
{
RCLCPP_ERROR(get_logger(), "Errore mentre aspetto");
exit(1);
}
RCLCPP_INFO(get_logger(), "Servizio non disponibile aspetta...");
}
timer_cb_ = create_wall_timer(500ms, std::bind(&client_foo::start, this));
}
private:
rclcpp::Client<example_interfaces::srv::AddTwoInts>::SharedPtr client_;
rclcpp::callback_group::CallbackGroup::SharedPtr cb_grp_client_;
// Timer per il callback
rclcpp::TimerBase::SharedPtr timer_cb_;
example_interfaces::srv::AddTwoInts::Response::SharedPtr start()
{
auto request = std::make_shared<example_interfaces::srv::AddTwoInts::Request>();
request->a = 1;
request->b = 2;
auto result = client_->async_send_request(request);
result.wait();
RCLCPP_INFO(get_logger(), "Results!");
return result.get();
}
};
int main(int argc, char *argv[])
{
rclcpp::init(argc, argv);
rclcpp::executors::MultiThreadedExecutor exe;
std::shared_ptr<client_foo> client_node =
std::make_shared<client_foo>("client_foo");
exe.add_node(client_node);
exe.spin();
return 0;
}
Probably the question is very silly but I don't get the point where the code fails.
Someone can help me? Thank you so much. |
2021-04-19 09:13:37 -0500 | asked a question | Client doesn't return when you create a client class ROS2 Client doesn't return when you create a client class ROS2
Hi community,
I would like to write a client and server node |
2021-04-11 05:29:13 -0500 | asked a question | RCUTILS logging macro vs ROS_INFO RCUTILS logging macro vs ROS_INFO
Hi Community,
I am starting to studying ROS2 in order to start to work with Realtime |
2021-03-30 23:03:21 -0500 | received badge | ● Famous Question
(source)
|
2021-03-19 06:37:11 -0500 | received badge | ● Popular Question
(source)
|
2021-03-19 05:24:22 -0500 | edited question | moveit Setup assistant finds duplicated links moveit Setup assistant finds duplicated links
Hi Community,
I'm practicing with xacro files and moveit package. I had cr |
2021-03-08 12:58:31 -0500 | received badge | ● Popular Question
(source)
|
2021-03-08 12:57:58 -0500 | commented answer | How to publish a dictionary with other dictionary inside in a topic? Why not create your own ROS msg? In this way you could code the informations as you whish
|
2021-03-08 12:57:58 -0500 | received badge | ● Commentator
|
2021-03-08 12:55:49 -0500 | edited question | moveit Setup assistant finds duplicated links moveit Setup assistant finds duplicated links
Hi Community,
I'm practicing with xacro files and moveit package. I had cr |
2021-03-08 12:53:49 -0500 | asked a question | moveit Setup assistant finds duplicated links moveit Setup assistant finds duplicated links
Hi Community,
I'm practicing with xacro files and moveit package. I had cr |
2021-03-06 10:49:24 -0500 | received badge | ● Famous Question
(source)
|
2021-02-26 03:27:06 -0500 | received badge | ● Famous Question
(source)
|