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

Karnivaurus's profile - activity

2021-02-03 18:54:10 -0500 received badge  Nice Question (source)
2019-10-09 08:06:28 -0500 received badge  Famous Question (source)
2018-11-05 15:08:12 -0500 received badge  Nice Question (source)
2018-07-31 15:49:24 -0500 received badge  Great Question (source)
2017-04-21 11:58:10 -0500 received badge  Famous Question (source)
2017-04-21 11:58:10 -0500 received badge  Notable Question (source)
2016-11-24 08:59:34 -0500 received badge  Good Question (source)
2016-05-08 16:11:02 -0500 marked best answer Finding the relative pose of a robot gripper

I have a robot arm with a gripper. I know the gripper pose (relative to the robot base coordinate system) at any moment. At startup, I record the pose of the gripper and set this as the original pose O. Then, the gripper moves to its new pose N, again in the robot base coordinate system. What I want to calculate, is R, the relative pose of the gripper in the coordinate system of the original pose O, rather than in the coordinate system of the robot base, which would just be N.

So, O = original pose, N = new pose, R = relative pose

From my calculations:

O * R = N

Therefore:

R = O^-1 * N

However, from my observations, R is the pose of the hand relative to the original pose, but in the coordinate system of the robot base. I want it to be in the coordinate system of the original pose. How do I get this?

2016-05-08 16:10:27 -0500 received badge  Notable Question (source)
2016-05-08 14:56:35 -0500 marked best answer Writing a simple CMakeLists.txt file for ROS

I am new to ROS (Indigo), and I want to write a C++ program to use the MoveIt! package.

However, I am confused as to what I need to have in my CMakeLists.txt file, such that the header and library files can be found.

For example, here is the file so far:

cmake_minimum_required(VERSION 2.8.1)

project(MicoMoveIt)

set(CMAKE_CXX_FLAGS "-std=c++11")

file(GLOB srcs *.cpp)

include_directories(/opt/ros/indigo/include)

link_directories(/opt/ros/indigo/lib)

add_executable(${PROJECT_NAME} ${srcs})

And my main.cpp file is:

#include <ros/ros.h>
#include <moveit/move_group_interface/move_group.h>

int main()
{
    moveit::planning_interface::MoveGroup group("right_arm");
    return 0;
}

But compiling this gives me the error:

/opt/ros/indigo/include/moveit/robot_model/joint_model.h:47: error: Eigen/Geometry: No such file or directory
 #include <Eigen/Geometry>
                          ^

So, I need to specify where to find these Eigen header files. But given that Eigen is a dependency of MoveIt!, then I shouldn't have to manually include all these header file directories.

How should I be writing the CMakeLists.txt file so that all header and library directories of dependencies are included?

2016-04-26 03:18:21 -0500 received badge  Nice Question (source)
2016-03-14 07:54:59 -0500 received badge  Famous Question (source)
2016-03-14 07:54:59 -0500 received badge  Notable Question (source)
2016-03-04 06:24:06 -0500 received badge  Popular Question (source)
2015-11-24 03:26:49 -0500 received badge  Famous Question (source)
2015-11-12 09:40:21 -0500 received badge  Famous Question (source)
2015-11-12 09:40:21 -0500 received badge  Popular Question (source)
2015-11-12 09:40:21 -0500 received badge  Notable Question (source)
2015-10-01 19:13:45 -0500 received badge  Notable Question (source)
2015-10-01 19:13:45 -0500 received badge  Popular Question (source)
2015-08-13 14:25:45 -0500 asked a question Building PCL with Kinfu

I am installing Point Cloud Library (PCL), without installing ROS. Now, I would like to use the open source version of Kinect Fusion (http://pointclouds.org/news/2011/12/08/kinectfusion-open-source/). So, I downloaded the latest PCL source from https://github.com/PointCloudLibrary/pcl, and then followed the compilation and installation instructions at http://pointclouds.org/downloads/source.html.

But how do I now run the Kinect Fusion implementation? I cannot seem to find any reference to Kinfu in the build files. I notice that there is a directory at /PCL/src/gpu/kinfu_large_scale, but in /PCL/build/gpu there are just some cmake files, and a makefile.

Perhaps this is something to do with the configuration, where I have not indicated that I want Kinfu to be built? I remember that when I originally ran cmake, it told me that it could not find OpenNI, so could this be the issue? I do have OpenNI2, because my camera (ASUS Xtion) does not work with the original OpenNI), but will Kinfu build with this?

2015-08-05 23:14:15 -0500 received badge  Famous Question (source)
2015-07-03 13:09:43 -0500 received badge  Famous Question (source)
2015-06-21 03:22:00 -0500 marked best answer Sourcing from multiple workspaces

I am just running through the ROS tutorials for Indigo (running on Ubuntu 14.04). In my .bashrc file, I have added the line source ~/catkin_ws/devel/setup.bash, to source the setup file. If I then run echo $ROS_PACKAGE_PATH, it gives me /home/karnivaurus/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks.

However, I also have downloaded another package, located in ~/ROS/src. I now want to source the setup file for this new package, so that ROS knows to search there if I reference this package. Therefore, I add another line to .bashrc, source ~/ROS/devel/setup.bash.

The problem is that if I now run echo $ROS_PACKAGE_PATH again, it gives me /home/karnivaurus/ROS/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks. So, it seems that the second of the two lines in .bashrc overrides the first, and the package created in the tutorial can no longer be found by ROS.

So the only solution I have come up with is to have all my packages in the same workspace. But this means that I cannot run the tutorial whilst also playing around with some other packages I've downloaded. Is it normal to just have one workspace which contains all packages you have built / downloaded (i.e. other than the ones that come with ROS by default)? Or is there another solution to this?

I have inspected the setup.bash files for both these workspace, and they are identical:

#!/usr/bin/env bash
# generated from catkin/cmake/templates/setup.bash.in

CATKIN_SHELL=bash

# source setup.sh from same directory as this file
_CATKIN_SETUP_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)
. "$_CATKIN_SETUP_DIR/setup.sh"
2015-06-06 03:33:08 -0500 received badge  Famous Question (source)
2015-06-01 21:52:38 -0500 received badge  Notable Question (source)
2015-05-28 10:01:48 -0500 received badge  Popular Question (source)
2015-05-26 11:58:47 -0500 received badge  Notable Question (source)
2015-05-26 10:24:43 -0500 asked a question Error with MoveIt! MoveGroup: Unable to construct robot model

I am very new to ROS (Indigo), and want to use the MoveIt! tools with a Kinova Mico arm. So, I decided to follow the official tutorial at: http://docs.ros.org/hydro/api/pr2_mov...

Here, it tells me to use the following line to create a MoveGroup:

moveit::planning_interface::MoveGroup group("right_arm");

What hasn't been explained, is what to use in place of "right_arm"?

I have created a package called mico_move, containing a node with the following code:

#include <moveit/move_group_interface/move_group.h>

int main(int argc, char **argv)
{
    ros::init(argc, argv, "mico_move_node");
    moveit::planning_interface::MoveGroup group("right_arm");

    return 0;
}

I build the package with catkin_make, then run it with rosrun mico_move mico_move_node.

However, this gives me the error:

[FATAL] [1432653194.030197342]: Unable to construct robot model. Please make sure all needed information is on the parameter server.
terminate called after throwing an instance of 'std::runtime_error'
  what():  Unable to construct robot model. Please make sure all needed information is on the parameter server.
Aborted (core dumped)

Why am I getting this error, and what do I need to put instead of "right_arm"? The tutorial does not give very much background help!

2015-05-26 02:39:07 -0500 received badge  Popular Question (source)
2015-05-26 02:13:25 -0500 received badge  Popular Question (source)
2015-05-25 14:59:48 -0500 received badge  Popular Question (source)
2015-05-25 10:58:34 -0500 edited question Which package should I use in CMakeLists.txt?

I want to use the MoveIt! package on ROS indigo, and I am following the tutorial at http://docs.ros.org/hydro/api/pr2_mov... .

As an example of how to use MoveIt! in C++, the tutorial provides the following line:

moveit::planning_interface::MoveGroup group("right_arm");

What I am trying to figure out, is how to actually compile this. So, I have built a new ROS package, and in the CMakeLists.txt file for that package, I need to specify where to look for header and library files. But how do I know the name of the package that is required for the above code?

If I look in /opt/ros/indigo/include, there are various directories such as moveit, moveit_msgs, moveit_planners_ompl, and similarly in /opt/ros/indigo/lib and /opt/ros/indigo/share. Is each of these directories a package, or is each one a node, or something else?

After doing a bit of research, I found that the moveit::planning_interface::MoveGroup class from the above code is defined in /opt/ros/indigo/include/moveit/move_group_interface/move_group.h. This suggests to me that I should be using the moveit or move_group_interface packages, but if I try either of these, then it fails. For example, in my CMakeLists.txt file, if I have:

find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs genmsg moveit)

And then I try to build my package, it tells me:

Could not find a package configuration file provided by "moveit"

And similarly for move_group_interface.

So I'm obviously a bit confused as to what ROS packages actually are, where they are stored on my machine, and how to know which one I should be referencing in CMakeLists.txt. Any help? Thanks :)