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

green96's profile - activity

2022-03-17 01:55:43 -0500 received badge  Nice Question (source)
2016-10-09 05:55:26 -0500 received badge  Famous Question (source)
2016-05-08 15:44:17 -0500 marked best answer catkin_make problem after several workspace directory

Hi I have one problem with catkin. When I have just installed ROS I made catkin_ws folder. After it I tried to download source from git and I noticed that with this package from git there is readme file with installation steps. So I made another workspace. I mean I got two workspace:

  • catkin_ws just after instalation (there was only one package - beginners tutorial)
  • tum_simulator_ws with two packages.

I read here that if we really don't need several workspace we should avoid this situation, because there are some complications.

So I remove catkin_ws, but now I can't use catkin_make. Please help me.

przemek@przem:~/tum_simulator_ws/src$ catkin_init_workspace 
Creating symlink "/home/przemek/tum_simulator_ws/src/CMakeLists.txt" pointing to "/opt/ros/indigo/share/catkin/cmake/toplevel.cmake"
przemek@przem:~/tum_simulator_ws/src$ cd ~/tum_simulator_ws/
przemek@przem:~/tum_simulator_ws$ catkin_make
Base path: /home/przemek/tum_simulator_ws
Source space: /home/przemek/tum_simulator_ws/src
The specified base path "/home/przemek/tum_simulator_ws" contains a CMakeLists.txt but "catkin_make" must be invoked in the root of workspace
przemek@przem:~/tum_simulator_ws$

I use ROS Indigo and Ubuntu 14.04. In my .bashrc file I have this lines:

source /opt/ros/indigo/setup.bash
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/tum_simulator_ws

LC_NUMERIC=C
2016-05-08 15:43:52 -0500 received badge  Notable Question (source)
2016-01-04 10:14:56 -0500 marked best answer How to remap service? commit button during camera_calibration doesn't work

Hi, I didn't find accurate answer to this question

I would like to remap service from /set_camera_info to /camera/set_camera_info

according to this instructions: http://wiki.ros.org/Remapping%20Argum... I tried:

przemek@przem:~$ rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.025 image:=/image_raw set_camera_info:=/camera/set_camera_info

but after pushing on commit button I get: raise ServiceException("service [%s] unavailable"%self.resolved_name) rospy.service.ServiceException: service [/camera/set_camera_info] unavailable

so my camera is calibrated or not?

details from calibration:

rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.025 image:=/image_raw set_camera_info:=/camera/set_camera_info
*** Added sample 1, p_x = 0.675, p_y = 0.933, p_size = 0.446, skew = 0.038
*** Added sample 2, p_x = 0.528, p_y = 0.502, p_size = 0.282, skew = 0.135
*** Added sample 3, p_x = 0.566, p_y = 0.416, p_size = 0.300, skew = 0.209
*** Added sample 4, p_x = 0.533, p_y = 0.382, p_size = 0.247, skew = 0.092
*** Added sample 5, p_x = 0.523, p_y = 0.500, p_size = 0.169, skew = 0.003
*** Added sample 6, p_x = 0.261, p_y = 0.480, p_size = 0.181, skew = 0.011
*** Added sample 7, p_x = 0.727, p_y = 0.526, p_size = 0.181, skew = 0.186
*** Added sample 8, p_x = 0.836, p_y = 0.546, p_size = 0.168, skew = 0.536
*** Added sample 9, p_x = 0.867, p_y = 0.544, p_size = 0.166, skew = 0.151
*** Added sample 10, p_x = 0.924, p_y = 0.552, p_size = 0.157, skew = 0.278
*** Added sample 11, p_x = 0.120, p_y = 0.602, p_size = 0.209, skew = 0.001
*** Added sample 12, p_x = 0.389, p_y = 0.627, p_size = 0.322, skew = 0.029
*** Added sample 13, p_x = 0.674, p_y = 0.736, p_size = 0.284, skew = 0.440
*** Added sample 14, p_x = 0.772, p_y = 0.559, p_size = 0.298, skew = 0.498
*** Added sample 15, p_x = 0.808, p_y = 0.515, p_size = 0.287, skew = 0.622
*** Added sample 16, p_x = 0.802, p_y = 0.528, p_size = 0.250, skew = 0.815
*** Added sample 17, p_x = 0.749, p_y = 0.613, p_size = 0.331, skew = 0.010
*** Added sample 18, p_x = 0.633, p_y = 0.599, p_size = 0.323, skew = 0.120
*** Added sample 19, p_x = 0.370, p_y = 0.594, p_size = 0.287, skew = 0.325
*** Added sample 20, p_x = 0.314, p_y = 0.589, p_size = 0.262, skew = 0.630
*** Added sample 21, p_x = 0.514, p_y = 0.690, p_size = 0.279, skew = 0.224
*** Added sample 22, p_x = 0.554, p_y = 0.643, p_size = 0.362, skew = 0.267
*** Added sample 23, p_x = 0.608, p_y = 0.618, p_size = 0.401, skew = 0.373
*** Added sample 24, p_x = 0.671, p_y = 0.585, p_size = 0.440, skew = 0.443
*** Added sample 25, p_x = 0.604, p_y = 0.604, p_size = 0.415, skew = 0.546
*** Added sample 26, p_x = 0.603, p_y = 0.520, p_size = 0.452, skew = 0.094
*** Added sample 27, p_x = 0.670, p_y = 0.441, p_size = 0.512, skew = 0.103 ...
(more)
2015-06-30 19:04:02 -0500 marked best answer Calibration uvc_camera and ar_pose | does not match name narrow_stereo

Hi, I have a problem with calibration of uvc_camera. According to this tutorial I calibrated my uvc_cam, I get txt file, next I converted it to *yaml file. Unfortunately something is still wrong. Please help.

I calibrated this cam due to tutorial but I am still not able to use ar_pose. It says that my cam is not calibrated due to this WARN: does not match name narrow_stereo/...

DETAILS: When I try to run uvc_cam i get warn:

przemek@przem:/opt/ros/indigo/share/uvc_camera$ rosrun uvc_camera uvc_camera_node
[ INFO] [1416757839.936490924]: using default calibration URL
[ INFO] [1416757839.936732155]: camera calibration URL: file:///home/przemek/.ros/camera_info/camera.yaml
[ WARN] [1416757839.938720327]: [camera] does not match name narrow_stereo in file /home/przemek/.ros/camera_info/camera.yaml
opening /dev/video0
pixfmt 0 = 'YUYV' desc = 'YUV 4:2:2 (YUYV)'
  discrete: 640x480:   1/30 1/15 
  discrete: 352x288:   1/30 1/15 
  discrete: 320x240:   1/30 1/15 
  discrete: 176x144:   1/30 1/15 
  discrete: 160x120:   1/30 1/15 
  discrete: 1280x1024:   2/15 1/5 
  int (Brightness, 0, id = 980900): -10 to 10 (1)
  int (Contrast, 0, id = 980901): 0 to 20 (1)
  int (Saturation, 0, id = 980902): 0 to 10 (1)
  int (Gamma, 0, id = 980910): 100 to 200 (1)
  int (Gain, 0, id = 980913): 32 to 48 (1)
  menu (Power Line Frequency, 0, id = 980918): 0 to 2 (1)
    0: Disabled
    1: 50 Hz
    2: 60 Hz
  int (Sharpness, 0, id = 98091b): 0 to 10 (1)
select timeout in grab

My yaml file looks:

image_width: 640
image_height: 480
camera_name: narrow_stereo
camera_matrix:
  rows: 3
  cols: 3
  data: [562.565802, 0, 334.212253, 0, 559.2623160000001, 230.512081, 0, 0, 1]
distortion_model: plumb_bob
distortion_coefficients:
  rows: 1
  cols: 5
  data: [0.06530999999999999, -0.217992, 0.000628, -0.005040999999999999, 0]
rectification_matrix:
  rows: 3
  cols: 3
  data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
projection_matrix:
  rows: 3
  cols: 4
  data: [560.932284, 0, 331.534094, 0, 0, 561.324191, 230.144188, 0, 0, 0, 1, 0]

It is only warn but I can't use ar_pose too:

przemek@przem:/opt/ros/indigo/share/uvc_camera$ roslaunch ar_pose ar_pose_single.launch 
... logging to /home/przemek/.ros/log/7190f504-7328-11e4-86d4-001e65a44a56/roslaunch-przem-27002.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://przem:54421/

SUMMARY
========

PARAMETERS
 * /ar_pose/marker_center_x: 0.0
 * /ar_pose/marker_center_y: 0.0
 * /ar_pose/marker_pattern: /home/przemek/tum...
 * /ar_pose/marker_width: 152.4
 * /ar_pose/threshold: 100
 * /ar_pose/use_history: True
 * /camera/uvc_camera_node/camera_info_url: file:///opt/ros/i...
 * /camera/uvc_camera_node/device: /dev/video0
 * /camera/uvc_camera_node/fps: 30
 * /camera/uvc_camera_node/frame: camera
 * /camera/uvc_camera_node/height: 240
 * /camera/uvc_camera_node/width: 320
 * /rosdistro: indigo
 * /rosversion: 1.11.9

NODES
  /camera/
    image_proc (image_proc/image_proc)
    uvc_camera_node (uvc_camera/uvc_camera_node)
  /
    ar_pose (ar_pose/ar_single)
    rviz (rviz/rviz)
    world_to_cam (tf/static_transform_publisher)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[rviz-1]: started with pid [27020]
process[world_to_cam-2]: started with pid [27021]
process[camera/image_proc-3]: started with pid [27038]
process[camera/uvc_camera_node-4]: started ...
(more)
2015-05-14 04:04:19 -0500 received badge  Famous Question (source)
2015-04-01 23:58:38 -0500 received badge  Famous Question (source)
2015-02-13 03:01:59 -0500 received badge  Famous Question (source)
2015-01-30 14:03:06 -0500 received badge  Famous Question (source)
2015-01-26 13:01:51 -0500 received badge  Notable Question (source)
2015-01-22 12:26:19 -0500 received badge  Popular Question (source)
2015-01-13 09:12:01 -0500 received badge  Famous Question (source)
2015-01-05 11:34:24 -0500 received badge  Famous Question (source)
2014-12-20 09:12:27 -0500 commented answer Rendering outdoor world in Gazebo

Hi, could you post a link to answer to this question? I got similar problem, I am trying to build world from heightmap or using blender but I have some problems.

2014-12-20 08:45:13 -0500 received badge  Notable Question (source)
2014-12-18 17:08:40 -0500 received badge  Famous Question (source)
2014-12-17 16:41:22 -0500 received badge  Popular Question (source)
2014-12-16 15:42:32 -0500 asked a question Problem with subscriber, ar_pose cmake files.

Hello, I have just finished writing a simple subscriber for ar_pose package, but I have problem during compilation. Catkin make gives me this error:

CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:75 (find_package):
  Could not find a package configuration file provided by "ar_pose" with any
  of the following names:

    ar_poseConfig.cmake
    ar_pose-config.cmake

  Add the installation prefix of "ar_pose" to CMAKE_PREFIX_PATH or set
  "ar_pose_DIR" to a directory containing one of the above files.  If
  "ar_pose" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  contr_node/CMakeLists.txt:9 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/przemek/tum_simulator_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/przemek/tum_simulator_ws/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Błąd 1
Invoking "make cmake_check_build_system" failed

I couldn't find this files, could you give me any advice?

What depend. should I write in package.xml file? I tried ar_pose, next ar_tools...

###################################################################

EDIT: I found this similar topic: http://answers.ros.org/question/10734...

#####################################################################

structure in src:

workspace/src/ar_tools:

ar_pose, ar_toolkit, ar_tools.

my cmakelist.txt file: http://pastebin.com/ynD5qBib

my package.xml file:

<?xml version="1.0"?>
<package>
  <name>contr_node</name>
  <version>0.1.0</version>
  <description>The contr_node package</description>
  <maintainer email="przemek@todo.todo">przemek</maintainer>
  <license>TODO</license>

  <buildtool_depend>catkin</buildtool_depend>
  <run_depend>roscpp</run_depend>
  <build_depend>roscpp</build_depend>
  <run_depend>artoolkit</run_depend>
  <build_depend>artoolkit</build_depend>
  <run_depend>ar_pose</run_depend>
  <build_depend>ar_pose</build_depend>


</package>
2014-12-16 05:30:26 -0500 commented question Problem with simple controller for ardrone quadricopter based on visual tags.

So i think values from ar_pose are not accurate with marker in Gazebo. I ddn't know what parameters should be set, first i tried to use ar_pose with real printed marker, next I just use rosparam to use it with Gazebo.

2014-12-16 05:24:44 -0500 commented question Problem with simple controller for ardrone quadricopter based on visual tags.

Hi Pedro, I have just tried to compare cordinates in world of marker and quadrocopter and values which comes from ar_pose.

Check this screens: http://snag.gy/5VFms.jpg http://snag.gy/wLx2d.jpg

comparision: http://snag.gy/xakm9.jpg

2014-12-13 17:45:02 -0500 received badge  Notable Question (source)
2014-12-05 19:07:42 -0500 asked a question Problem with simple controller for ardrone quadricopter based on visual tags.

Hello, I would like to create or implement node which will allow ar drone quadricopter fly autonomously towards detected tag. Something similar to this video: https://www.youtube.com/watch?v=yg4w2...

EDIT:

I have written a simple node, which detect a tag and according to data, which gives ar_pose, sends message to cmd_vel and /ardrone/land and /ardrone/takeoff.

I have a strange problem that when angle to marker is big it fly so slowly. Please check this link - big angle: http://youtu.be/60Z9qmjxOzA

When angle is smaller everything seems to be ok - small angle: https://www.youtube.com/watch?v=f7IvK...

For straight line and controlled with joy: https://www.youtube.com/watch?v=LVoMT... https://www.youtube.com/watch?v=s5vbv...

Could you tell me what is wrong in my code?

#include "ros/ros.h"
#include <ar_pose/ARMarker.h>
#include <geometry_msgs/Twist.h>
#include "std_msgs/Empty.h"
#include <iomanip> // for std::setprecision and std::fixed

const int PUBLISH_FREQ = 50;

double pos_x, pos_y, pos_z, orient_x, orient_y, orient_z;

struct Contr_Node{
    ros::Subscriber sub;
    ros::Publisher pub_takeoff, pub_land, pub_vel;
    ros::NodeHandle nh;
    geometry_msgs::Twist msg_twist;
    bool is_flying;

    void poseMessageReceived(const ar_pose::ARMarker& msg){
        pos_x = msg.pose.pose.position.x;
        pos_y = msg.pose.pose.position.y;
        pos_z = msg.pose.pose.position.z;
        orient_x = msg.pose.pose.orientation.x;
        orient_y = msg.pose.pose.orientation.y;
        orient_z = msg.pose.pose.orientation.z;

        if(pos_z > 0.5){
            msg_twist.linear.x = 1; // forward
        }


        //msg_twist.linear.z = 0; // up down

        if((pos_z < 5) && (pos_z > 0) && (pos_x > 0.5) )
            msg_twist.angular.z = -0.2; // yaw

//      if((pos_x < 0.5) && (pos_x > 0.2))
//          msg_twist.angular.z = -0.2; // yaw


        if((pos_z < 5) && (pos_z > 0) && (pos_x < -0.5) )
            msg_twist.angular.z = 0.2; // yaw

//      if((pos_x > -0.5) && (pos_x < -0.2))
//          msg_twist.angular.z = 0.2; // yaw

        if (!is_flying && (pos_z > 1)){
            ROS_INFO("L1 was pressed, Taking off!");
            pub_takeoff.publish(std_msgs::Empty());
            is_flying = true;
        }

        if (is_flying && (pos_z < 1) && (pos_y < 1)){
            ROS_INFO("L1 was released, landing");
            pub_land.publish(std_msgs::Empty());
            is_flying = false;
        }


        ROS_INFO_STREAM(std::setprecision(3) << std::fixed
                << "x= " << pos_x << " "
                << "y= " << pos_y << " "
                << "z= " << pos_z << "\n"
                << " orient_x= " << orient_x << ","
                << " orient_y= " << orient_y << ","
                << " orient_z= " << orient_z << "\n");
    }


    Contr_Node(){
        is_flying = false;

        msg_twist.linear.x = msg_twist.linear.y = msg_twist.linear.z = 0;
        msg_twist.angular.x = msg_twist.angular.y = msg_twist.angular.z = 0;

        //sub from ar_pose
        sub = nh.subscribe("/ar_pose_marker", 1000, &Contr_Node::poseMessageReceived, this);

        //ros::Publisher
        pub_takeoff = nh.advertise<std_msgs::Empty>("/ardrone/takeoff",1);
        pub_land = nh.advertise<std_msgs::Empty>("/ardrone/land",1);
        pub_vel  = nh.advertise<geometry_msgs::Twist>("/cmd_vel",1);
    }

    void send_cmd_vel(){
        pub_vel.publish(msg_twist);
    }

};

int main(int argc, char **argv){

    //Inicjalizacja noda
    ros::init(argc, argv, "subscribe_to_pose");
    Contr_Node contr_node_obj;


    //Loop at 2Hz until node is shut down.
    //ros::Rate pub_rate(2);
    ros::Rate pub_rate(PUBLISH_FREQ);
    contr_node_obj.pub_takeoff.publish(std_msgs::Empty());
    while(contr_node_obj.nh.ok()){

        ros::spinOnce();
        //Publish

        contr_node_obj.send_cmd_vel();


        //Send a message to rosout with the details.
        ROS_INFO_STREAM("Sending random velocity command:"
                << " linear=" << contr_node_obj.msg_twist.linear.x
                //<< " angular=" << msg_twist.angular.z
                << " pos_z=" << pos_z);

        //Wait until it's time for antoher iteration.
        pub_rate.sleep();
    }

    return 0;
}
2014-12-04 08:25:01 -0500 commented question Ar_pose doesn't recognize tag in tum_simulator. Please help.

I haven't heard about this package before. You are using real camera or camera in gazebo simulator? Everything works fine?

Some time ago I found this repository: http://wiki.ros.org/ar_track_alvar

I have calibrated ar_pose to my cam in laptop so I would rather don't change repository.

2014-12-04 07:50:50 -0500 edited question Ar_pose doesn't recognize tag in tum_simulator. Please help.

Hello,

I would like to use ar_pose with image from ardrone camera. I don't have real quadrotor, I am using tum_simulator with Gazebo.

My problem is that ar_pose doesn't recognize tags in simulation, so I have few questions:

screens:

Gazebo and ar_tag which I add image description

  1. Should I do camera calibration? (I don't have real cam, I am using cam which is in tum_simulator)
  2. What parameters should be set in ar_pose like: marker marker_width? (I am using tags in simulation)
  3. Why ar_pose doesn't recognize this tag?

EDIT: what I have done?

I have add two lines to launch file which is responsible for running Gazebo + tum_simulator + ardrone_autonomy

<remap from="/ardrone/camera_info" to="/camera/camera_info"/>
<remap from="/ardrone/image_raw" to="/camera/image_raw"/>

so when I launch this files I have above topics remapped: http://pastebin.com/vv0UpGRp

next I launch ar_pose:

<launch>

  <node pkg="rviz" type="rviz" name="rviz" 
    args="-d $(find ar_pose)/launch/live_single.rviz"/>
  <node pkg="tf" type="static_transform_publisher" name="world_to_cam" 
    args="0 0 0.5 -1.57 0 -1.57 world camera 10" />


  <node name="ar_pose" pkg="ar_pose" type="ar_single" respawn="false"
    output="screen">
    <param name="marker_pattern" type="string"
      value="$(find ar_pose)/data/4x4/4x4_19.patt"/>
    <param name="marker_width" type="double" value="200"/>
    <param name="marker_center_x" type="double" value="0.0"/>
    <param name="marker_center_y" type="double" value="0.0"/>
    <param name="threshold" type="int" value="100"/>
    <param name="use_history" type="bool" value="true"/>

  </node>
</launch>

RESULTS: screen from rviz (simulation) image description

(screen1) image description

Problem is that there is warming NO IMAGE RECEIVED and it is true. Preview from camera using 'CAMERA' gives black window, preview should be done with 'IMAGE'. AR_POSE uses this 'camera style' preview, no 'image style'. How to solve this problem? (screen2) image description

info from marker section: basic_shapes/1 For frame [ardrone_base_frontcam]: No transform to fixed frame [camera]. TF error: [Could not find a connection between 'camera' and 'ardrone_base_frontcam' because they are not part of the same tree.Tf has two or more unconnected trees.] (screen3) image description

EDIT:

it started working! I change fixed frame to ar_marker and it seems to be working! :)

but it gives me message in terminal:

[ERROR] [1417704617.003409185, 3461.051000000]: Ignoring transform for child_frame_id "ar_marker" from authority "unknown_publisher" because of a nan value in the transform (0.609564 -0.180967 -3.568543) (-nan -nan -nan -nan)
[ERROR] [1417704622.185442670, 3463.722000000]: Ignoring transform for child_frame_id "ar_marker" from authority "unknown_publisher" because of a nan value in the transform (0.984986 -0.604149 -2.678788) (nan nan nan nan)
[ERROR] [1417704623.374384366, 3464.377000000]: Ignoring transform for child_frame_id "ar_marker" from authority "unknown_publisher" because of a nan value in the transform (0.590453 -0.226787 -2.891703) (nan nan nan nan)

(screen4) image description

2014-12-04 07:22:10 -0500 commented answer Ar_pose doesn't recognize tag in tum_simulator. Please help.

I have added white borders to this tag, changed way of remapping and changed fixed frame. It works, I am a little bit surprised. Could you look at the error which I pasted at the bottom of the post?