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

Joao Ferreira's profile - activity

2014-04-06 23:17:39 -0500 received badge  Famous Question (source)
2014-03-19 03:09:26 -0500 received badge  Enthusiast
2014-03-17 06:59:32 -0500 received badge  Notable Question (source)
2014-03-17 04:43:00 -0500 answered a question Why do I get this error when catkin_make my package?

Well, I don't know why, but when I git cloned the robot_model package to my catkin workspace, instead of just installing it using apt-get I finally managed to build my testbot_description package.

Does anyone know why? At least I can proceed with the urdf tutorials, now, and I hope this will help others.

$ cd ~/catkin_ws/src

$ git clone https://github.com/ros/robot_model

$ cd ~/catkin_ws

$ catkin_make
2014-03-17 03:27:16 -0500 commented answer Print the Camera parameters from the file created after Camera Calibration

I am afraid I can't help you further. I don't have a checkerboard to test this package. The GUI does not allow me to save or commit the calibration parameters.

2014-03-17 03:27:16 -0500 received badge  Commentator
2014-03-17 03:05:37 -0500 commented answer Print the Camera parameters from the file created after Camera Calibration

I took a better look at the tutorial you are following. Section 1.7 talks about how to create your .yaml file from the parameters you have just commited to your camera. In order to be able to read parameters, you got to create this .yaml file, and use this file when you run/launch your node(s). When I first answered your question, I assumed you had the parameters being published already.

2014-03-17 02:48:07 -0500 commented answer Print the Camera parameters from the file created after Camera Calibration

Well, I have never used this camera_calibration package. Is there any .launch file? Does it create parameters?

2014-03-17 02:44:19 -0500 commented answer Print the Camera parameters from the file created after Camera Calibration

but the parameters name are also listed when you run "$ rosparam list" after launching your nodes. When you have only 'roscore' running, for example, and you run "$rosparam list" you get something like that: /rosdistro /roslaunch/uris/host_joao_inspiron_n5010__50954 /rosversion /run_id

2014-03-17 02:41:42 -0500 commented answer Print the Camera parameters from the file created after Camera Calibration

You can find the .yaml file by taking a look at the .launch file. For instance, in my .launch file, there is something like that: rosparam file="$(find custom_image)/params/marker_params.yaml" command="load" /> Thus, my .yaml file is inside a folder called "params" in my package directory.

2014-03-17 00:56:50 -0500 commented answer Print the Camera parameters from the file created after Camera Calibration

The .yaml file does not publish any topic. It does only provide these parameters to the parameters' server, so the ROS nodes can use them. That is why you can't subscribe. Also, I don't get the point of reading from a topic, as reading from the parameters's server is not that difficult.

2014-03-16 14:58:34 -0500 answered a question Print the Camera parameters from the file created after Camera Calibration

You got to create a function that reads the parameters.

For instance:

void readParams(const ros::NodeHandle& nh)
{
        nh.param<std::string>("ns" , ns , "custom_image");
        nh.param<double>("/"+ns+"/color/a" , color_a , 1.0);
        nh.param<double>("/"+ns+"/color/b" , color_b , 0.0);
        nh.param<double>("/"+ns+"/color/g" , color_g , 0.0);
        nh.param<double>("/"+ns+"/color/r" , color_r , 1.0);
}

The example above is reading color parameters, where the following parameters:

ns , color_a ,color_b , color_g , color_r

are declared in a .yaml file as follows:

# Node namespace
ns: 'custom_image'

# color parameters
color: { 'r': 1.0, 'g': 0.0, 'b': 0.0, 'a': 1.0 }

Thus, nh.param() is a function that receives three arguments:

argument 1 is a string with the name of the parameter as it appears to your ros environment.

argument 2 is a global variable that you should have declared prior to call this function. In this example, ns is a string variable, and color_a , color_b , color_g and color_r are double.

argument 3 is a default value that will be parsed to your variable (argument 2) just in case the parameter declared (argument 1) cannot be found.

In summary, as long as your parameters are visible in your ros environment, this function will read it by looking for argument 1, and store its value to the variable in argument 2.


Now that you have your readParams() function. You only have to call it parsing your node handle.

For instance, in my main() function I did:

    ros::init(argc , argv , "custom_image");
    ROS_INFO("Initializing my node...");

    ros::NodeHandle nh;
    readParams(nh);

After that, you can print the variables' values, as they are storing their respective parameters.

(If you need more help, take a look at: http://wiki.ros.org/roscpp/Overview/P... )

2014-03-16 14:38:37 -0500 commented question How to run openni2_tracker

As long as openni2 is a catkin package, you should be able to make it by using catkin_make. What is the error message you are getting? I cloned openni2_tracker package to my catkin workspace but couldn't make it as well. First, I got an error related to orocos_kdl-config.cmake that I was able to work around by removing from catkin dependencies, and finding the package individualy. However, I got another error related to Nite2 directories that I could not fix. Do you really need to use openni2 ?

2014-03-16 13:37:06 -0500 answered a question Cannot create package with opencv2 dependency using ROS Groovy

You are trying to create a package that depends on opencv2 and it seems that you don't have opencv2 installed yet.

However, I would suggest you to create a catkin package, as you are using Groovy and you are inside a catkin workspace. This tutorial seems to have been last edited before Groovy was released, and that is why it is not creating a catkin package.

To make sure you have opencv2 installed, try:

$ sudo apt-get install ros-groovy-opencv2

Retry creating your package after that. You can either follow the tutorial or create a catking package:

$ catkin_create_pkg learning_image_transport image_transport opencv2 cv_bridge
2014-03-16 07:31:51 -0500 received badge  Popular Question (source)
2014-03-15 22:15:00 -0500 received badge  Teacher (source)
2014-03-15 12:32:36 -0500 commented question Why do I get this error when catkin_make my package?

I just realized that when I comment the code that calls for initFile() I get rid of this error and I am able to build my package. In my parser.cpp , if I keep the " if (!model.initFile(urdf_file)) { ROS_ERROR("Failed to parse urdf file"); return -1; } " the error appears again.

2014-03-15 08:26:58 -0500 answered a question registration in openni_launch

I am not completely sure, but from what I could understand, the registered data matches the depth information and relates to the RGB camera.

By taking a look at the /camera/depth_registered/disparity we can see that it is slightly different from /camera/depth/disparity

/camera/depth_registered/disparity seems to be the image got from the rgb camera, showing only the part that is visible by the depth sensor. It is useful when you want to relate the RGB image and the depth points. Imagine you want to 3D scan an object. If you need to know the color of that object, you should use /camera/depth_registered . That is how the /camera/depth_registered/points might be built, as it kind of mix the information from RGB camera and depth sensor.

/camera/depth/disparity contains the raw depth information from the depth sensor, though.

2014-03-15 07:14:04 -0500 commented answer openni_tracker nothing output

Try installing openni_launch: $ sudo apt-get install ros-<rosdistro>-openni-launch and then run: $ roslaunch openni_launch openni.launch This should run every nodes related to depth image and transforms. Then try $ rostopic list

2014-03-15 07:07:15 -0500 commented question Why do I get this error when catkin_make my package?

Thanks, BennyRe. I just added it. I hope it will help.

2014-03-14 14:50:35 -0500 received badge  Supporter (source)
2014-03-14 14:37:36 -0500 received badge  Editor (source)
2014-03-14 14:29:29 -0500 answered a question openni_tracker nothing output

Did you check for the topics being published?

try: $ rostopic list

openni_tracker should publish a /tf topic

It usually starts publishing as soon as the depth camera detects someone in front of it. Also, you cannot see any image unless you run a node that is capable of doing that.

Rviz provides this capability. Try: $rosrun rviz rviz , add and configure a new TF display that listens to the /tf topic.

Please, refer to rviz tutorials if you don't know how to configure it.

If openni_tracker is not working, you can also try:

Install openni_launch: $ sudo apt-get install ros-hydro-openni-launch and then run: $ roslaunch openni_launch openni.launch This should run every nodes related to depth image and transforms. Then try $ rostopic list

2014-03-14 13:30:55 -0500 edited question Why do I get this error when catkin_make my package?
Linking CXX executable /home/joao/catkin_ws/devel/lib/testbot_description/parser /opt/ros/hydro/lib/liburdf.so: undefined reference to `ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, char const*, int, char const*, char const*, ...)' /opt/ros/hydro/lib/liburdf.so: undefined reference to `ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > const&, char const*, int, char const*)' collect2: ld returned 1 exit status make[2]: *** [/home/joao/catkin_ws/devel/lib/testbot_description/parser] Error 1 make[1]: *** [testbot_description/CMakeFiles/parser.dir/all] Error 2 make: *** [all] Error 2 Invoking "make" failed

[ROS Hydro and Ubuntu 12.04]

I am trying to follow the urdf parser tutorial.

My testbot_description package has a /src/parser.cpp file and a /urdf/my_robot.urdf file

Both are identical to the ones suggested by the tutorial page. (I already copied and pasted the code to make sure).

This is my CMakeLists:

cmake_minimum_required(VERSION 2.8.3)
project(testbot_description)

## 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 urdf)



## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES testbot_description
#  CATKIN_DEPENDS urdf
#  DEPENDS system_lib
)

include_directories(
  ${catkin_INCLUDE_DIRS}
)


add_executable(parser src/parser.cpp)
target_link_libraries(parser ${catkin_LIBRARIES})

And this is my package.xml:

<package>
  <name>testbot_description</name>
  <version>0.0.1</version>
  <description>The testbot_description package</description>


  <maintainer email="joao.cicero@ifce.edu.br">Joao Cicero</maintainer>

  <license>BSD</license>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>urdf</build_depend>
  <run_depend>urdf</run_depend>

  <!-- The export tag contains other, unspecified, tags -->
  <export>
    <!-- You can specify that this package is a metapackage here: -->
    <!-- <metapackage/> -->

    <!-- Other tools can request additional information be placed here -->
  </export>
</package>