ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

cv_ros_user's profile - activity

2022-11-30 00:16:56 -0500 received badge  Student (source)
2022-11-22 04:12:53 -0500 received badge  Famous Question (source)
2021-07-01 08:23:18 -0500 received badge  Famous Question (source)
2021-04-20 23:58:11 -0500 received badge  Notable Question (source)
2021-02-16 09:01:31 -0500 received badge  Famous Question (source)
2020-12-01 17:17:01 -0500 commented answer Solving inverse kinematics for special configuration (IKFast)

TRAC-IK performs a lot better than default KDL IK solver in my use case (8 dof robot). It is as simple as installing th

2020-11-27 00:16:15 -0500 received badge  Popular Question (source)
2020-11-23 01:05:14 -0500 received badge  Famous Question (source)
2020-11-17 16:31:17 -0500 received badge  Organizer (source)
2020-11-17 16:30:42 -0500 asked a question Add tolerances to computeCartesianPath

Add tolerances to computeCartesianPath Hi, I am using the computeCartesianPath() to perform linear trajectory between t

2020-11-17 05:16:34 -0500 commented answer How to change Trac IK parameters online

So I have added a trac_ik/trac_ik_kinematics_plugin/cfg/TRACIKDynamicReconfigure.cfg file. I have added a dynamic_reconf

2020-11-17 05:07:38 -0500 received badge  Notable Question (source)
2020-11-16 21:22:33 -0500 received badge  Popular Question (source)
2020-11-16 11:49:24 -0500 marked best answer How to change Trac IK parameters online

Hi,

I would like to know how to change the IK parameters in C++. The kinematics.yaml contains default parameters and I would like to change for certain planning operations the solve_type parameters.

So how to retrieve the IK solver pointer in order to change some parameters, and so that it is updated for the MoveGroupInterface?

I am using the TRAC-IK plugin if it matters.

2020-11-16 11:49:22 -0500 commented answer How to change Trac IK parameters online

Thanks again. I have almost no experience with dynamic_reconfigure so I didn't know it was possible to use it with serv

2020-11-16 11:27:36 -0500 received badge  Notable Question (source)
2020-11-16 11:26:12 -0500 commented answer How to change Trac IK parameters online

Thanks for your answer. I don't think dynamic_reconfigure is an option for me. I want to change this parameters in the

2020-11-16 11:25:10 -0500 commented answer How to change Trac IK parameters online

Thanks for your answer. I don't think dynamic_reconfigure is an option for me. I want to change this parameters in the

2020-11-16 07:22:27 -0500 asked a question How to change Trac IK parameters online

How to change IK parameters online Hi, I would like to know how to change the IK parameters in C++. The kinematics.yaml

2020-10-20 10:43:41 -0500 received badge  Famous Question (source)
2020-07-29 23:55:39 -0500 received badge  Notable Question (source)
2020-07-28 02:09:45 -0500 received badge  Popular Question (source)
2020-07-14 00:22:33 -0500 received badge  Notable Question (source)
2020-06-30 04:32:44 -0500 received badge  Popular Question (source)
2020-06-04 13:54:06 -0500 answered a question Collision-free guarantee with move_group.plan() and RRTConnect

Not really an answer... Alternative to using g_planning_scene->checkCollision(c_req, c_res, *robot.robotState()); fr

2020-06-04 12:56:12 -0500 answered a question Do we need to remove collision object before applyAttachedCollisionObject?

My answer No, it is not needed to remove the collision object before calling applyAttachedCollisionObject(). See this t

2020-06-03 09:04:15 -0500 received badge  Popular Question (source)
2020-05-30 07:45:14 -0500 asked a question Collision-free guarantee with move_group.plan() and RRTConnect

Collision-free guarantee with move_group.plan() and RRTConnect I am using the OMPL planner and specifically RRTConnect t

2020-05-30 07:28:26 -0500 edited question Do we need to remove collision object before applyAttachedCollisionObject?

Do we need to remove collision object before applyAttachedCollisionObject? Currently, when I want to attach an object to

2020-05-30 07:28:17 -0500 edited question Do we need to remove collision object before applyAttachedCollisionObject?

Do we need to remove collision object before applyAttachedCollisionObject? Currently, when I want to attach an object to

2020-05-30 07:28:17 -0500 received badge  Editor (source)
2020-05-30 07:22:34 -0500 asked a question Do we need to remove collision object before applyAttachedCollisionObject?

Do we need to remove collision object before applyAttachedCollisionObject? Currently, when I want to attach an object to

2020-05-18 15:55:14 -0500 marked best answer Disabling collision in AllowedCollisionMatrix removes attached object from the scene

I am updating the AllowedCollisionMatrix in order to disable collision between an object attached to the robot end-effector and a collision object in the world for a specific robot movement. It works but it also removes the attached object from the scene. So it seems that it is not possible to disable temporary collision for an attached object and enable it afterward.

What would have been useful:

  • to be able to update the ACM to disable collision between an attached object and another object in the scene
  • use MoveIt to move the end-effector
  • update the ACM to enable collision
  • the attached object is still present in the scene with its position updated since the robot has moved

Unfortunately, it looks like it just removes the attached object from the scene.


A minimal code looks like this (tested on ROS Kinetic). Run with roslaunch panda_moveit_config demo.launch and rosrun <> <>.

#include <moveit/move_group_interface/move_group_interface.h>
#include <moveit/planning_scene_interface/planning_scene_interface.h>
#include <moveit/planning_scene_monitor/planning_scene_monitor.h>

#include <moveit_msgs/AttachedCollisionObject.h>
#include <moveit_msgs/CollisionObject.h>

int main(int argc, char** argv)
{
  ros::init(argc, argv, "move_group_interface_tutorial");
  ros::NodeHandle node_handle;
  ros::AsyncSpinner spinner(1);
  spinner.start();

  static const std::string PLANNING_GROUP = "panda_arm";
  moveit::planning_interface::MoveGroupInterface move_group(PLANNING_GROUP);
  moveit::planning_interface::PlanningSceneInterface planning_scene_interface;
  robot_model_loader::RobotModelLoaderPtr robot_model_loader(new robot_model_loader::RobotModelLoader("robot_description"));
  planning_scene_monitor::PlanningSceneMonitorPtr planning_scene_monitor(new planning_scene_monitor::PlanningSceneMonitor(robot_model_loader));

  planning_scene_monitor->startSceneMonitor();
  planning_scene_monitor->startWorldGeometryMonitor();
  planning_scene_monitor->startStateMonitor();

  //Add collision object
  {
    moveit_msgs::CollisionObject collision_object;
    collision_object.header.frame_id = move_group.getPlanningFrame();
    collision_object.id = "box1";

    shape_msgs::SolidPrimitive primitive;
    primitive.type = primitive.BOX;
    primitive.dimensions.resize(3);
    primitive.dimensions[0] = 0.3;
    primitive.dimensions[1] = 1;
    primitive.dimensions[2] = 0.4;

    geometry_msgs::Pose box_pose;
    box_pose.orientation.w = 1.0;
    box_pose.position.x = 0.3;
    box_pose.position.y = 0;
    box_pose.position.z = 0;

    collision_object.primitives.push_back(primitive);
    collision_object.primitive_poses.push_back(box_pose);
    collision_object.operation = collision_object.ADD;

    std::vector<moveit_msgs::CollisionObject> collision_objects;
    collision_objects.push_back(collision_object);
    planning_scene_interface.applyCollisionObjects(collision_objects);
  }

  //Add collision object and attach it
  {
    moveit_msgs::CollisionObject collision_object;
    collision_object.header.frame_id = move_group.getPlanningFrame();
    collision_object.id = "box_attach";

    shape_msgs::SolidPrimitive primitive;
    primitive.type = primitive.BOX;
    primitive.dimensions.resize(3);
    primitive.dimensions[0] = 0.1;
    primitive.dimensions[1] = 0.1;
    primitive.dimensions[2] = 0.1;

    geometry_msgs::Pose box_pose = move_group.getCurrentPose().pose;
    box_pose.position.z -= 0.175;

    collision_object.primitives.push_back(primitive);
    collision_object.primitive_poses.push_back(box_pose);
    collision_object.operation = collision_object.ADD;

    std::vector<moveit_msgs::CollisionObject> collision_objects;
    collision_objects.push_back(collision_object);

    planning_scene_interface.applyCollisionObjects(collision_objects);

    moveit_msgs::AttachedCollisionObject aco;
    aco.object.id = collision_object.id;
    aco.link_name = move_group.getEndEffectorLink();
    aco.touch_links.push_back(move_group.getEndEffectorLink());
    aco.touch_links.push_back("panda_hand");
    aco.touch_links.push_back("panda_leftfinger");
    aco.touch_links.push_back("panda_rightfinger");
    aco.object.operation = moveit_msgs::CollisionObject::ADD;
    planning_scene_interface.applyAttachedCollisionObject(aco);

    std::map<std::string, moveit_msgs::AttachedCollisionObject> attached_co = planning_scene_interface.getAttachedObjects();
    std::cout << "\nAttachedCollisionObject after applyAttachedCollisionObject:" << std::endl;
    for (const auto& kv : attached_co) {
      std::cout << kv.first << " ; " << kv.second.object.id << std::endl;
    }
  }

  //Wait a little
  const int wait_time = 2;
  ros::Duration(wait_time).sleep();

  //Ignore collision between attached object and collision object in the world
  {
    planning_scene_monitor::LockedPlanningSceneRW ls(planning_scene_monitor);
    collision_detection::AllowedCollisionMatrix& acm = ls->getAllowedCollisionMatrixNonConst();
    acm.setEntry("box1", "box_attach", true);
    std::cout << "\nAllowedCollisionMatrix:\n";
    acm.print(std ...
(more)
2020-05-18 15:54:52 -0500 commented answer Disabling collision in AllowedCollisionMatrix removes attached object from the scene

Thank you! Adding diff_scene.robot_state.is_diff = true; solves indeed the issue. About the proposal, maybe adding a bo

2020-05-18 14:49:25 -0500 asked a question Disabling collision in AllowedCollisionMatrix removes attached object from the scene

Disabling collision in AllowedCollisionMatrix removes attached object from the scene I am updating the AllowedCollisionM

2019-09-30 16:17:31 -0500 received badge  Famous Question (source)
2019-09-27 12:30:57 -0500 commented answer Robot_localization: fuse absolute with relative measurements

Yes, I think I have understood what you said about the IMU. I use the ROS Madgwick filter btw. Not sure what absolute or

2019-09-25 12:54:13 -0500 marked best answer Robot_localization: fuse absolute with relative measurements

I want to fuse global pose from tag pose estimation with visual odometry and IMU.

I am using:

  • a RealSense D435i with realsense-ros that provides all the transformations between each sensor
  • and rtab_map for the visual odometry

Fusing relative measurements (visual odometry and IMU) looks correct with rviz:

ekf_local.yaml:

frequency: 30
sensor_timeout: 0.1
publish_tf: true
map_frame: map
odom_frame: odom
base_link_frame: camera_link
world_frame: odom

odom0: /odom
odom0_config: [true,  true,  true,
               true,  true,  true,
               true,  true,  true,
               true,  true,  true,
               true,  true,  true]
odom0_differential: false
odom0_relative: true

imu0: /imu/data
imu0_config: [false, false, false,
              true,  true,  true,
              false, false, false,
              true,  true,  true,
              true,  true,  true]

imu0_differential: true
imu0_relative: false
imu0_remove_gravitational_acceleration: true

I am not able to fuse absolute pose with visual odometry and IMU. I want to use something like this:

ekf_global.yaml:

frequency: 30
sensor_timeout: 0.1
publish_tf: true
map_frame: map
odom_frame: odom
base_link_frame: camera_link
world_frame: map

odom0: /odom
odom0_config: [true,  true,  true,
               true,  true,  true,
               true,  true,  true,
               true,  true,  true,
               true, true, true]

odom0_differential: false
odom0_relative: true

odom1: /tag_pose

odom1_config: [true,  true,  true,
               true,  true,  true,
               false, false, false,
               false, false, false,
               false, false, false]

odom1_differential: false
odom1_relative: false

imu0: /imu/data
imu0_config: [false, false, false,
              true,  true,  true,
              false, false, false,
              true,  true,  true,
              true,  true,  true]

imu0_differential: true
imu0_relative: false
imu0_remove_gravitational_acceleration: true

odom0 is the output of rtab_map:

frame_id: "odom"
child_frame_id: "camera_link"

imu0 is:

frame_id: "camera_imu_optical_frame"

(Realsense ROS publishes all the transformations between the camera_link and for instance camera_imu_optical_frame.)

What should be the transformation for odom1?

Is it the transformation between the map (frame_id) and the camera_link (so the raw transformation between the tag and the camera)? Is it the transformation between the map (frame_id) and the odom? Since I have another ekf_node that fuses the continuous data (vo and IMU), I can transform the raw tag pose.

The output of the local ekf is clear. It is the transformation between the odom and the camera_link. The odom frame is the initial position of the sensor when launching the nodes.

What is the output of the global ekf (/ekf_global/odometry/filtered)? From the doc it should be the transformation between the map and odom. But from my understanding:

  • map frame is fixed and corresponds in my case to the tag frame
  • odom frame is the initial pose of the sensor and the transformation map / odom should be fixed
  • camera_link is the free floating camera frame

So does the ekf (/ekf_global/odometry/filtered) estimates the map --> odom transformation and I have to use the /ekf_local/odometry/filtered to get the transformation between the tag/map and the camera_link?


Edit:

I did some tests, recapped here.

The homogeneous transformation a_T_b means: X_a = a_T_b . X_b.

The vision library detects the tag and estimates the transformation camlink_T_tag. The goal was to still have the transformation camlink_T_tag when the tag is not detected (occlusion, ...).

Option 1:

  • map and tag frames are the same
  • ekf_local/odometry/filtered estimates odom_T_camlink
  • ekf_global/odometry/filtered estimates map_T_camlink
  • when the tag is detected ...
(more)
2019-09-25 12:54:13 -0500 commented answer Robot_localization: fuse absolute with relative measurements

Thanks for the answer. I have edited my questions to add the tests I did. Yes in my case I assume the tag does not move