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

End-Effector's profile - activity

2022-05-10 10:34:09 -0500 received badge  Notable Question (source)
2022-05-10 10:34:09 -0500 received badge  Famous Question (source)
2020-07-10 18:15:28 -0500 marked best answer Tutorials: Writing Simple Server Client Bug?

Hello,

so I'm doing the tutorials and I got a problem in this one.

Where do you get this file? #include "beginner_tutorials/AddTwoInts.h"?

I know that you have to go back look at creating the AddTwoInts.srv Tutorial.

But my problem is how do you get the .h file?

This file is needed for both service and client.

2020-02-25 13:48:13 -0500 received badge  Taxonomist
2019-06-22 07:52:06 -0500 received badge  Nice Answer (source)
2019-01-12 21:59:49 -0500 received badge  Famous Question (source)
2018-02-27 01:35:57 -0500 marked best answer tf lookuptransform

Hello,

I'm trying to move my robot to some position. So I made a frame in some random postition named /posicao_objectivo and I made a simple broadcaster to set this position in reference to the frame /odom that gets set by Gazebo.

#include <ros/ros.h>
#include <tf/transform_broadcaster.h>

int main(int argc, char** argv){
  ros::init(argc, argv, "tf_broadcaster_posicaoRobot");
  ros::NodeHandle node;

  tf::TransformBroadcaster br;
  tf::Transform transform;


  ros::Rate rate(1.0);
  while(node.ok()){
        transform.setOrigin(  tf::Vector3(5, 0.0, 0.0) );
        transform.setRotation(tf::Quaternion(0, 0, 0, 1)       );

        br.sendTransform(tf::StampedTransform(transform, ros::Time::now(),"/odom", "/posicao_objectivo"));
        rate.sleep();
  }

  return 0;
};

After this I made a listener that uses the function lookuptransform to calculate the transform from the robot /base_link to my set position /posicao_objectivo created by my broadcaster.

#include <ros/ros.h>

#include <tf transform_listener.h=""> #include <geometry_msgs twist.h="">

int main(int argc, char** argv){ ros::init(argc, argv, "my_tf_listener_mexeRobot");

ros::NodeHandle node;

ros::Publisher robot_vel =  node.advertise<geometry_msgs::Twist>("p3dx/cmd_vel", 10);

tf::TransformListener listener;

ros::Rate rate(1.0); while (node.ok()){

    tf::StampedTransform transform;
            try{
              listener.waitForTransform("/base_link", "/posicao_objectivo",
                          ros::Time(0), ros::Duration(3.0));
              listener.lookupTransform("/base_link", "/posicao_objectivo",
                                       ros::Time(0), transform);
            }
            catch (tf::TransformException &ex) {
              ROS_ERROR("%s",ex.what());
              ros::Duration(1.0).sleep();
              continue;
            }

         geometry_msgs::Twist vel_msg;
                    vel_msg.angular.z = 0.2 * atan2(transform.getOrigin().y(),
                                                        transform.getOrigin().x());
                    vel_msg.linear.x = 0.5 * sqrt(pow(transform.getOrigin().x(), 2) +
                                                      pow(transform.getOrigin().y(), 2));
                    robot_vel.publish(vel_msg);

                    rate.sleep();
}
return 0;

};

The problem is that when I run the listener I get this error:

[ERROR] [1425495472.170621190, 132.992000000]: "posicao_objectivo" passed to lookupTransform argument source_frame does not exist.

I tried using the command: rosrun tf tf_echo odom posicao_objectivo

And it says:

Exception thrown:"posicao_objectivo" passed to lookupTransform argument source_frame does not exist. 
The current list of frames is:
Frame base_link exists with parent odom.
Frame front_sonar exists with parent base_link.
Frame p3dx_left_hubcap exists with parent p3dx_left_wheel.
Frame p3dx_right_hubcap exists with parent p3dx_right_wheel.
Frame top_plate exists with parent base_link.
Frame camera_link exists with parent Arucos.
Frame Arucos exists with parent top_plate.
Frame center_hubcap exists with parent center_wheel.
Frame lms100 exists with parent base_link.

What is confusing me Is that went I start the broadcast of my frame /posicao_objectivo the frame appears in RVIZ tree and it appears in rosrun rqt_tf_tree rqt_tf_tree. So the frame does exist, don't understand how it does not work with rosrun tf tf_echo odom posicao_objectivo.

2018-02-27 01:35:57 -0500 received badge  Nice Answer (source)
2018-02-07 04:04:20 -0500 marked best answer Creating stl mesh file with textures

Hello,

I'm trying to make a simple cube to set over a pioneer. The cube has some Aruco Tags (textures). I did the cube in sketchup and them exported it to stl. Then I saved it with meshlab and put it in my robot.

Problem--> the cube doesn't have the textures (Arucos tags) I put in sketchup. How do you export the file with the textures included anyone knows?

2018-02-07 04:03:47 -0500 received badge  Self-Learner (source)
2018-01-15 05:27:25 -0500 marked best answer urdf to xacro

I'm building my first robot and I'm not understanding XACRO.

I did the robot in urdf and now I'm changing the file to xacro. But I get a lot or errors.

Expat parsing error.  Check that:
 - Your XML is correctly formed
 - You have the xacro xmlns declaration: xmlns:xacro="http://www.ros.org/wiki/xacro"

Traceback (most recent call last):
  File "/opt/ros/indigo/share/xacro/xacro.py", line 60, in <module>
    xacro.main()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py", line 672, in main
    doc = parse(f)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
    return expatbuilder.parse(file)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 928, in parse
    result = builder.parseFile(file)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 211, in parseFile
    parser.Parse("", True)
xml.parsers.expat.ExpatError: unclosed token: line 1, column 0

I only changed the first lines of the original urdf file that was successfully parsed. I just added this code.

<?xml version="1.0">
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="r2d2" >

<xacro:property name="raioRoda" value="0.05"/>
2018-01-11 20:16:33 -0500 received badge  Popular Question (source)
2018-01-09 02:03:52 -0500 received badge  Famous Question (source)
2017-10-20 06:25:44 -0500 marked best answer Mesh .dae file with textures invisible

I created a file .dae with sketchup of a cube with Textures.

I want to put the cube over a pioneer but when I see the robot in Rviz the cube is transparent.

Should I stop using sketchup to generate the .dae and try some other program? Need some help here.

2017-10-09 08:26:16 -0500 received badge  Famous Question (source)
2017-05-22 22:38:49 -0500 received badge  Famous Question (source)
2017-01-17 11:07:41 -0500 received badge  Famous Question (source)
2016-07-01 20:06:32 -0500 received badge  Notable Question (source)
2016-06-25 14:40:35 -0500 received badge  Famous Question (source)
2016-04-05 16:49:44 -0500 received badge  Notable Question (source)
2016-04-05 16:49:44 -0500 received badge  Famous Question (source)
2016-03-29 02:40:55 -0500 received badge  Notable Question (source)
2016-03-29 02:40:55 -0500 received badge  Famous Question (source)
2016-03-28 21:44:52 -0500 received badge  Famous Question (source)
2016-03-28 21:44:52 -0500 received badge  Notable Question (source)
2016-03-03 08:36:24 -0500 marked best answer ros with Aruco Tags

Hello I'm trying to use this pkg: https://github.com/warp1337/ros_aruco

I installed OpenCV and Aruco 1.2.4.

I tested the Aruco and It works.

Problem:

In step 7 I get this error

[100%] Building CXX object ros_aruco/CMakeFiles/ros_aruco.dir/src/ros_aruco.cpp.o
/home/paulo/catkin_ws/src/ros_aruco/src/ros_aruco.cpp:35:19: fatal error: aruco.h: No such file or directory
#include "aruco.h"
               ^
compilation terminated.
make[2]: *** [ros_aruco/CMakeFiles/ros_aruco.dir/src/ros_aruco.cpp.o] Error 1
make[1]: *** [ros_aruco/CMakeFiles/ros_aruco.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

I think I'm not understanding what he means by -DARUCO_PATH=/usr/local.

I'm simply using the command: catkin_make --pkg ros_aruco -DARUCO_PATH=/usr/local/include/aruco

And in that location is the aruco.h file. I don't understand how the system isn't finding it.

Maybe I didin't install aruco globaly on my pc, but I don't know how to do that.

Anyone knows how to solve this problem?

Thx so much.

UPDATE:

Thx to gvdhoorn now I can detect the aruco.h file.

Problem I get another Error:

CMakeFiles/ros_aruco.dir/src/ros_aruco.cpp.o: In function `main':

ros_aruco.cpp:(.text+0x10a6): undefined reference to aruco::CvDrawingUtils::draw3dCube(cv::Mat&, aruco::Marker&, aruco::CameraParameters const&)' CMakeFiles/ros_aruco.dir/src/ros_aruco.cpp.o: In functioncvTackBarEvents(int, void)': ros_aruco.cpp:(.text+0x182b): undefined reference to `aruco::CvDrawingUtils::draw3dCube(cv::Mat&, aruco::Marker&, aruco::CameraParameters const&)' collect2: error: ld returned 1 exit status make[2]: [ros_aruco/ros_aruco] Error 1 make[1]: [ros_aruco/CMakeFiles/ros_aruco.dir/all] Error 2 make: ** [all] Error 2 Invoking "make -j8 -l8" failed

Don't know what to do here...

FINAL UPDATE

Problem solved. i HAD A package that was conflicting with this one. I had aruco_ros-master, I'm testing several different packages and that one was the one getting the errors. They have near names.

It compiles with no Errors now. THx you all-

2016-03-01 14:37:40 -0500 received badge  Notable Question (source)
2016-03-01 14:37:40 -0500 received badge  Popular Question (source)
2016-02-20 01:20:04 -0500 received badge  Necromancer (source)
2016-02-15 11:02:57 -0500 received badge  Notable Question (source)
2016-02-15 11:02:57 -0500 received badge  Popular Question (source)
2016-02-15 11:02:57 -0500 received badge  Famous Question (source)
2015-12-13 21:09:15 -0500 marked best answer Spawning multiples robots with 1 URDF/XACRO file

Hello,

I'm spawning 2 pioneer robots but I have some plug-ins for the sensors, odom and cmd/vel that are publishing for the same topics.

Is there any simple/and efficient way to change the topics where they are publishing this messages? The robots have different names already. Anyone knows how to do this?

I don't want just to copy paste all the xacro code and change the topics by hand, I think its not a good solution.

Anyone knows how to do this? So far I created 2 launch files to try to do this:

 <launch>
    <param name="/use_sim_time" value="true"/>

    <include file="$(find gazebo_ros)/launch/empty_world.launch"/>

  <group ns="p3dx_1">
    <include file="$(find p3dx_gazebo)/launch/pioneer.launch">
      <arg name="name" value="p3dx_1"/>
      <arg name="pos_x" value="-4.0"/>
      <arg name="namespace_arg" value="p3dx_1"/>
    </include>
  </group>

  <group ns="p3dx_2">
    <include file="$(find p3dx_gazebo)/launch/pioneer.launch">
      <arg name="name" value="p3dx_2"/>
      <arg name="pos_x" value="4.0"/>
      <arg name="namespace_arg" value="p3dx_2"/>
    </include>
  </group>
</launch>

and this one:

<launch>
  <!-- push robot_description to factory and spawn robot in gazebo -->
  <arg name="name" default="pioneer"/>
  <arg name="pos_x" default="0.0"/>
  <arg name="pos_y" default="0.0"/>
  <arg name="pos_z" default="0.0"/>
  <arg name="namespace_arg" default=""/>

  <arg name="model" default="$(find p3dx_description)/urdf/$(arg namespace_arg).xacro"/>
  <!-- send the robot XML to param server -->
  <param name="robot_description" command="$(find xacro)/xacro.py '$(arg model)'" />
  <param name="tf_prefix" value="$(arg namespace_arg)" />
  <node name="spawn_robot" pkg="gazebo_ros" type="spawn_model"
        args="-param robot_description
              -urdf
              -x $(arg pos_x)
              -y $(arg pos_y)
              -z $(arg pos_z)
              -model $(arg name)"
        respawn="false" output="screen">
  </node>
</launch>

But I think this way I will have to copy the .xacro files. Anyone has a better idea?

2015-12-13 02:51:04 -0500 received badge  Famous Question (source)
2015-12-07 10:16:31 -0500 received badge  Famous Question (source)
2015-10-30 14:24:26 -0500 received badge  Notable Question (source)
2015-10-26 05:58:25 -0500 received badge  Famous Question (source)
2015-10-11 08:49:48 -0500 answered a question Help needed for gazebo simulation record

This is wrong!

Do not waste you time with glc or recordmydesktop.

Just simply go to "UBUNTU SOFTWARE CENTER" and install KAZAM.

Best program ever, 2 clicks and it's done. Records gazebo!

I used it in my thesis to film the simulated results from gazebo.

2015-09-24 14:42:29 -0500 received badge  Popular Question (source)
2015-09-08 08:45:16 -0500 answered a question Getting "Aria.h: file not found" when installing rosaria

THIS IS THE EXACT SOLUTION FOR THIS QUESTION!

Once you have downloaded the Rosaria package do not run catkin_make. First you have to install Aria. That is why you are getting the error "error fatal: Aria.h: No such file or directory."

So what you have to do is:

Open Ubuntu Software Center and install the following: Shearch for Aria and click on "Show 14 technical items". Pick libraria2, libaria-dev and libraria-dev-doc.

Then do catkin_make and it will build the RosAria Package.

2015-09-08 08:31:46 -0500 received badge  Popular Question (source)
2015-09-07 09:57:11 -0500 asked a question Aruco detection and Real life VS Gazebo

Hello everyone,

I'm a student working with a Aruco Package(https://github.com/Sahloul/ar_sys). I'm using it with ROS and I have 2 questions:

1) Why are the Aruco giving more error when the Aruco is straight to the camera? When the Aruco is in an angle I seem to get better results, there is less error in the poses.

2) I tried the Aruco with Gazebo and I was getting really high error in the poses, now that I'm working with actual robots and with Kinects and I get almost no error in the measurements of the Aruco poses. They are almost perfect, like 1 degrees of error, comparing to the almost ~10degree error in the Gazebo simulator. I was expecting worst results in the real life situation. How can I explain this?

This package is amazing if you want to work with Aruco Markers this is the one to use, thx you so much for the help.

2015-08-28 16:01:35 -0500 received badge  Famous Question (source)
2015-08-27 09:49:15 -0500 marked best answer Camera Calibration with Freenect Kinect driver

Hello,

I'm working with a Kinect and the Freenect driver package.

The Kinect is working fine and the distances provided are also fine. But I think I should calibrate the Kinect, if I do not people might call me stupid or something. I can calibrate the Kinect using opencv_cam_calibration package. This package gives a camera_conf.xml file that is the configuration of the camera. I can convert the file from .xml to .yaml.

My question is where do I put this file in the Freenect Kinect driver? I can't seem to find the place where to put it.

Anyone knows? Thanks so much!