Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all 152 articles
Browse latest View live

input xacro name in xacro file

$
0
0
hi, i want to implement this : this of course won't work cause ${arg robot} as xacro:name is not recognized. Any way to implement this way? with the robot name as an argument? Thanks

Texturize robot consisting of STL-files

$
0
0
I created robots links with CATIA exported them as STL an constructed my own robot with URDF. Now I'm able to move my little mobile robot around the world in Gazebo. Yeah. Then I mounted an Universal Robot Arm on top of my rover and there where textures on the arm. I looked in the XACRO-Description and found out, they use DAE files with textures to colorize the robots links. Is it possible (and if with which software) to import STL-files attach textures on it and export it as DAE as easy as possible? How would you texturize my existing robot with STL files? Thanks for your help Max

How to handle multiple URDF files in a single moveit package

$
0
0
Hello, I am trying to test several robot-tool configurations. Doing that, I combined the tool urdfs (as discussed [here](https://answers.ros.org/question/271839/how-to-add-a-tool-model-onto-the-robot-model-which-can-be-generated-in-the-moveit/)) with the urdf of my robot. To me it seems the only way to test that configuration with my robot is to create a moveit package for every single robot-tool configuration. I was wondering if there is a convinient way to switch beetween urdf or xacro files to be able to switch between robot models and still use only a single movit package. Any ideas? Thanks a lot.

Help with using parameters in included Xacro Macro

$
0
0
Hello all, I'm trying to do something that I think is very basic but running into all kinds of trouble. System is Ubuntu 16.04 with ROS Kinetic. I want to define my robot (a drone) with the following file: **sample_drone.urdf.xacro** And for reference, the astra file looks like: **orbbec_astra.xacro**: I've tried several different tweaks to this, but everything seems to run into some kind of error. Is there any way I can include the orbbec_astra.xacro **without** having it automatically expand (and thus fail because it has no parameters) and then call the macro with the required parameters? **Edit:** For more clarification, I am running rosrun xacro xacro.py sample_drone.urdf.xacro > sample_drone.urdf With the code I've shown above, I get the following errors: xacro: Traditional processing is deprecated. Switch to --inorder processing! To check for compatibility of your document, use option --check-order. For more infos, see http://wiki.ros.org/xacro#Processing_Order name 'parent' is not defined when evaluating expression 'parent' when processing file: sample_drone.urdf.xacro Which makes sense, because it seems to try expanding the astra macro completely. Now if I remove the line from the top-level file and instead try to pass parameters to the include such as like: I get errors that parent is not a known parameter (makes sense, that's not what xacro knows about). **Edit: [Answer]:** Including the robot tag in the astra macro has resolved the issue.

Converting from URDF to STL

$
0
0
Is there any way to convert URDF files into STL files? I know basically we use CAD software to create stl and convert them into urdf to simulate our robots. But, in my situation, I have only xacro files and I want to 3d print them so I need stl files. Thanks

roslaunch Python arg substitution finds wrong package folder path?

$
0
0
I've recently played around with [Python expressions as substitution args in launch files](http://wiki.ros.org/roslaunch/XML#substitution_args) (on 16.04 AMD64/Kinetic/current .debs). I encountered a curious problem during doing so. When trying to generalize this line: the following expression works: However, it has to be noted that I have to use the deprecated `xacro.py` here, as the `xacro` executable is not found. Investigating further I noted that $(find xacro) returns `/opt/ros/kinetic/lib/xacro` as a path, where also the `xacro` executable is located. In contrast to this $(eval find('xacro')) returns `/opt/ros/kinetic/share/xacro` as a path, where only the `xacro.py` executable is located. My expectation was that both calls to find should work identically, but apparently, this is not the case. My questions hence are: - Is this expected behavior or a bug? - Is there some other way to get to the "right" folder with the `xacro` executable while using Python substitution args in roslaunch?

How does one pass xacro blocks as arguments in a launch file?

$
0
0
The ``insert_block`` feature in xacro is super nice. However, I am not quite sure how to pass such a block argument from a launch file. Most of the answers I have seen so far are about passing single arguments from a launch file. Here is what I am trying to do: And in the launch file, I would like to load the xacro to a parameter like this: Any help on how to do this is very much appreciated. Thanks!

Problem with xacro:if value="${model_type == A_model_type}"

$
0
0
I'm trying to set up a Xacro where one section is based on a Model type passed as an argument (the first line below would be an external argument). No matter what model_type is set to, model A, B and C get included. I can get this to work by having a separate variable set to true/false for each model, but it's ugly. The following always loads all three models. I'm using Indigo.

How to use SDF with ROS packages in gazebo?

$
0
0
Using ROS Indigo and Gazebo 2.2 on Ubuntu 14.04 I have created a model for a robot that is similar to Clearpath's Jackal. What I am trying to do is have the already-created Jackal packages apply to my robot model. In other words, I am trying to substitute the model of Clearpath's Jackal with my robot model so that Clearpath's Jackal packages can apply to my model. The robot I made is in SDF while the packages for Clearpath's jackal reference and use URDF/XACRO. Does anyone know if it is possible to implement the SDF files and/or remove the URDF/XACRO files from the packages so that the Clearpath's Jackal's packages would apply to my model? If it is possible, what would be the best implementation process? Thanks! Pooja

xacro properties

$
0
0
I'm trying to use the mesh from the [realsense camera](https://github.com/intel-ros/realsense/tree/development/realsense2_camera) in my .urdf.xacro file and getting `name 'd435_cam_height' is not defined` or similar. This is a MWE to show the issue: They define the property I'm trying to use with the following snippet: ... ... ... Is it not possible to use properties defined inside a macro in another xacro file? I tried with namespaces, I tried to search for similar questions and I did the tutorial and looked for similar robots with no luck. Of course using 0.025 directly solves the issue, it's beside the point of using properties then.

Xacro include breaks including xacro file

$
0
0
I have a xacro file named "diff_wheeled_robot.urdf.xacro" to describe a robot and it works just fine. It is including other xacro files and their xacro macros. Now I want to include another xacro file describing a laser. The following code is the laser file ("rplidar.urdf.xacro"):Gazebo/Bluefalse${rplidar_radius/2} 0 0 0 0 0true10800003.141592653590.158.00.001/scanrplidar_link But when I try to include it via and I run rosrun xacro xacro --inorder diff_wheeled_robot.urdf.xacro I get an error: No such file or directory: None None when processing file: diff_wheeled_robot.urdf.xacro What am I doing wrong? ROS Kinetic Ubuntu 16.04

Questions to SDF, urdf, xacro, material, textures using Gazebo

$
0
0
Hi Guys, Currently I am a little stuck with my xacro model. I have a texture file which should be attached to a surface in the xacro. How to add materials to your package, what do I need to export (what could I export) in the package.xml Where do I really find the stuff documenting this features. Examples: I have seen that for url there can be file and model. Does package also work here? What are those replaced with in the end and which of these exist? Next: in the material file: material a/mat { technique { pass { ambient 0.5 0.5 0.5 1.0 diffuse 1.0 1.0 1.0 1.0 specular 0.0 0.0 0.0 1.0 0.5 texture_unit { texture file.png filtering trilinear } } } } **From where and how does it know where file.png is?** Does it just go standard for "../textures" ? Folder structure is mostly like - package - models - myModel * textures * scripts It works for me in a sdf file, but it seems to work never in my xacro. Somehow this is related to the package.xml as well where you export model or media path I found as well: or: Are there any others and what exactly do they do? Which variable does that set? Can I see them in my environment? How are they supposed to be set up correctly - any standard way? What if for example I want to do a package with materials for gazebo, which should can be used for any package, how do I set that up? So that I can use them, as you normally can do with "Gazebo/Grey ", "Gazebo/White" Example*1 (xacro): Gazebo/Grey Can somebody just enlighten me how to do it or where I find the documentation for all these things to make it "just right"? UPDATE --- I have now checked out multiple locations and found different places to get information about this thing, also found how to debug it. [http://gazebosim.org/tutorials?tut=ros_roslaunch](http://gazebosim.org/tutorials?tut=ros_roslaunch) there it says: rospack plugins --attrib="gazebo_media_path" gazebo_ros And I saw that I actually had a problem. It only takes these if you have a `` on **gazebo_ros**. gazebo_ros --- But I still do not get my material like that*1. Update 2: Just when looking at my own old xacros I found out, you can instead of *1 also do: So another Question raised up: **Which is now the "prefered" way of doing that?** **Which one is deprecated?** ______________________ Thanks a lot, Regards, Christian

'#pragma once' equivalent for urdf/xacro files

$
0
0
I have multiple urdf files representing different components of a robot. As I don't want to define materials multiple times in different files, I created a file containing those definitions ('materials.urdf.xacro'). The file looks like this: I include them via in a component file ('laser.urdf.xacro') and in the robot definition file ('robot.urdf.xacro') with itself includes 'laser.urdf.xacro'). When I try to run the urdf file via rviz, I get an error: material 'Black' is not unique. I presume it's due to the indirect second include of the 'materials.urdf.xacro' file, just like the problems you would have in C++ without '#pragma once' or the '#ifndef ... => #define ... => #endif' construct. So is there an equivalent to this in urdf/xacro files? - ROS Kinetic - Ubuntu 16.04

No camera message received with tum_simulator

$
0
0
I am running tum_simulator in ros kinetic ubuntu 16.04 when i run $ roslaunch cvg_sim_gazebo ardrone_testworld.launch i get the following warning, xacro: Traditional processing is deprecated. Switch to --inorder processing! To check for compatibility of your document, use option --check-order. For more infos, see http://wiki.ros.org/xacro#Processing_Order inconsistent namespace redefinitions for xmlns:xacro: old: http://playerstage.sourceforge.net/gazebo/xmlschema/#interface new: http://ros.org/wiki/xacro (/home/dyana/catkin_make/src/cvg_sim_gazebo/urdf/quadrotor_base.urdf.xacro) inconsistent namespace redefinitions for xmlns:xacro: old: http://playerstage.sourceforge.net/gazebo/xmlschema/#interface new: http://ros.org/wiki/xacro (/home/dyana/catkin_make/src/cvg_sim_gazebo/urdf/sensors/sonar_sensor.urdf.xacro) inconsistent namespace redefinitions for xmlns:xacro: old: http://playerstage.sourceforge.net/gazebo/xmlschema/#interface new: http://ros.org/wiki/xacro (/home/dyana/catkin_make/src/cvg_sim_gazebo/urdf/sensors/generic_camera.urdf.xacro) inconsistent namespace redefinitions for xmlns:xacro: old: http://playerstage.sourceforge.net/gazebo/xmlschema/#interface new: http://ros.org/wiki/xacro (/home/dyana/catkin_make/src/cvg_sim_gazebo/urdf/sensors/generic_camera.urdf.xacro) redefining global property: pi when processing file: /home/dyana/catkin_make/src/cvg_sim_gazebo/urdf/quadrotor_sensors.urdf.xacro xacro.py is deprecated; please use xacro instead and when I $ rostopic echo /ardrone/front/camera_info WARNING: no messages received and simulated time is active. Is /clock being published? I get the above message. Is it because the camera xacro is not loaded properly? I did not have such issues while running with ros indigo. I get this issue after I moved to kinetic and gazebo7.14 How do i resolve this?

The joints cannot rotate in Rviz

$
0
0
I use .xacro file as the model of the robot, and show it in Rviz. Part of the .xacro file is as follows. The launch file is as follows. When I change the `joint_state_publisher` pedal, the robot just stays static. How can I make them rotate? Thanks!

How to add custom tool to robot end effector in URDF or Xacro for Moveit!

$
0
0
I am using ROS kinetic on Ubuntu 16.04 I would like to add a custom tool (CAD file) to my robot end effector, so that I can define a new point (on the custom tool) as the end effector for path planning. I have a CAD file of the custom tool and the xacro/macro files for the desired robot (staubli tx90) How would I go about this? Is it possible to convert CAD to xacro?

Error: Joint is missing a parent and/or child

$
0
0
Hi all, I'm trying to build a robotic arm, but I'm having troubles when I create the macro to simplify the code. I have the next error: Failed to build tree: Joint [module_1_length_yaw_joint] is missing a parent and/or child link specification. I have try to solve it modifying the code as many times I imagine it could works, but anyway it didn't work. This is the part of my code for the macro: Gazebo/Orange I try many changes creating the name for the child in the joint, but I don't know if I missing something in the if statement for the xacro language. If you need more information I can update the question. Thank you for your help. Jorge NOTE: I try to ask this question in Gazebo answers, but it says that is SPAM and doesn't publish the question

XML parsing error: XML or text declaration not at start of entity

$
0
0
I keep getting this error on my xacro file. To be honest I am not familiar with this kind of format and I was wondering if I could get any help for the bad syntax error that keeps popping. Thanks in advance

xacro command not found

$
0
0
I am trying to run a xacro command to generate the latest baxter.srdf file to use with Moveit config. I found the command in a readme file in the baxter_moveit_config folder. It has been modified to give the paths to the files since it was having trouble finding them: xacro --inorder ~/ros_ws/src/moveit_robots/baxter/baxter_moveit_config/config/baxter.srdf.xacro left_electric_gripper:=true right_electric_gripper:=true left_tip_name:=left_gripper right_tip_name:=right_gripper >> ~/ros_ws/src/moveit_robots/baxter/baxter_moveit_config/config/baxter.srdf I keep getting: xacro: command not found I have sourced everything properly: source /opt/ros/indigo/setup.bash I even ran a catkin_make and tried it again. When I run "rospack find xacro" it returns the location of it. I am running it on Ubuntu 14.04 with Ros Indigo. Any suggestions?

Arm does not appear when using xacro to attach UR5 to Robotiq Gripper

$
0
0
I am trying to attach a Robotiq 2f gripper to a UR5 arm, but cannot get the two components to properly connect to one another. Following the tutorial [here](http://wiki.ros.org/Industrial/Tutorials/WorkingWithRosIndustrialRobotSupportPackages#Example:_adding_an_end-effector_to_a_robot), I created the xacro file below, but only the gripper appears when I launch the MoveIt Setup Assistant and load the xacro. I don't see any errors. How do I properly attach the gripper to the arm for simulation? --> I have cloned the most recent industrial packages for Universal Robots and Robotiq and am running Ubuntu 18.04.
Viewing all 152 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>