Dear Friends,
First of all, I apologize if my question may look trivial. I am new with ROS.
Here is the problem: The aim is to have two Schunk arms mounted on a simple box.
We have a robot.urdf.xacro file. This file "includes" the model of the arm:
And uses it twice to have two arms:
And then when I spawn the xacro file in launch file, 2 arms are loaded in Gazebo. Till here seems fine!
But adding a simple shape to this set was/is a pain for me.
I define a ros package, called *myschunk_gazebo*. Then I try to include one simple .xacro file including only a box (or cylinder) in myschunk_gazebo/models and I call the file simple_shape.xacro.
I know that ROS can locate the package. I check it with rospack:
ros@ros:~/Documents/Damon_CPP/ROS_Workspace/devel$ rospack find myschunk_gazebo
/home/ros/Documents/Damon_CPP/ROS_Workspace/src/myschunk_gazebo
But from here the problem starts!
Well, as I know, even this simple shape is called a "robot". So I write simple_shape.xacro. like:
When I launch the file, only the empty space is loaded in gazebo. And between many messages, I thought this might be useful to be put in here:
`Failed to find root link: Two root links found: [base_link] and [world]`
I guess I know what is going on. We should have only one , which I have in my urdf.xacro file that I spawn in my launch file. But what I do when I include simple_shape.xacro is that I have two s. And hence, two root links.
I remove the lines related to robot and change simple_shape.xacro to:
I also include base_link in my robot.urdf.xacro file:
And loads only empty space.
I don't think the inclusion of the file should be a problem. But I highly doubt if I use the shape in robot.urdf.xacro properly, or my codes for generating the shape are correct.
It would be so nice if a friend can clarify for me what is going on.
Thanks. :)
↧
Problem in adding two Schunk arms plus a simple shape (e.g. cylinder) into .urdf.xacro
↧
Traditional processing is deprecated...
When I am trying launch my gazebo project with: "roslaunch spider1_gazebo spider1_gazebo.launch"
I have the following problem:
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
Traceback (most recent call last):
File "/opt/ros/jade/share/xacro/xacro.py", line 61, in
xacro.main()
File "/opt/ros/jade/lib/python2.7/dist-packages/xacro/__init__.py", line 967, in main
out.write(doc.toprettyxml(indent=' '))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 1382: ordinal not in range(128)
Invalid tag: Cannot load command parameter [robot_description]: command [/opt/ros/jade/share/xacro/xacro.py '/home/d46/catkin_spider/src/spider1/spider1_description/urdf/spider1.urdf.xacro'] returned with code [1].
Param xml is
The traceback for the exception was written to the log file
When I run: `rosrun xacro xacro --inorder spider1.urdf.xacro > spider1.urdf`
It show the following:
Traceback (most recent call last):
File "/opt/ros/jade/lib/xacro/xacro", line 33, in
xacro.main()
File "/opt/ros/jade/lib/python2.7/dist-packages/xacro/__init__.py", line 967, in main
out.write(doc.toprettyxml(indent=' '))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 1646: ordinal not in range(128)
What is the solution to this?
↧
↧
Don't understand how to parse URDF file
Hello all,
I am using Ubuntu 12.04 with ROS Indigo.
So I am following the URDF tutorial ([Create your own urdf file](http://wiki.ros.org/urdf/Tutorials/Create%20your%20own%20urdf%20file)) but after I create my .urdf file I don't understand how to parse it.
The file is located in
> /home//ROS/catkin_ws/src/learning_urdf/urdf/robot.urdf
where:
- catkin_ws -- my ROS workspace
- learning_urdf -- a package I created
for this tutorial
the code in the robot.urdf is
and finally I run the command:
check_urdf robot.urdf
and get this error:
Error: Error document empty.
at line 72 in /build/buildd/urdfdom-0.2.10+dfsg/urdf_parser/src/model.cpp
ERROR: Model Parsing the xml failed
Looking more I found [this](http://wiki.ros.org/urdf#Verification) but still not sure what to do. Do I need to run a command similar to this
> rosrun xacro xacro.py `rospack find> pr2_description`/robots/pr2.urdf.xacro> -o /tmp/pr2.urdf
Do I need to first convert it to a xarco or somthing?
Where does to urdf file need to be for the command to run?
↧
URDF to Xacro from Solidworks Problems
Hello folks!
First time here, mind me if I do anything wrong :)
First, my setup is: ROS Indigo on Linux Mint 17.1 (Ubuntu 14.04 based).
I am trying to import a robot I built on Solidworks and exported to URDF with the plugin provided [here](http://wiki.ros.org/sw_urdf_exporter). Now things start to get tricky:
I can't run none launch files provided, with the following error (display.launch):
roque@mint-machine:~/ROS/catkin_workspace/src/CamPanTilt/launch$ roslaunch display.launch
... logging to /home/roque/.ros/log/7db1f390-4d13-11e5-9277-94dbc9b65860/roslaunch-mint-machine-11086.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://mint-machine:35559/
SUMMARY
========
PARAMETERS
* /robot_description:
* /rosdistro: indigo
* /rosversion: 1.11.10
* /use_gui: False
NODES
/
joint_state_publisher (joint_state_publisher/joint_state_publisher)
robot_state_publisher (robot_state_publisher/state_publisher)
rviz (rviz/rviz)
auto-starting new master
process[master]: started with pid [11098]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 7db1f390-4d13-11e5-9277-94dbc9b65860
process[rosout-1]: started with pid [11113]
started core service [/rosout]
process[joint_state_publisher-2]: started with pid [11130]
process[robot_state_publisher-3]: started with pid [11131]
[ERROR] [1440718181.920790719]: Error document empty.
state_publisher: /usr/include/boost/smart_ptr/shared_ptr.hpp:653: typename boost::detail::sp_member_access::type boost::shared_ptr::operator->() const [with T = const urdf::Link; typename boost::detail::sp_member_access::type = const urdf::Link*]: Assertion `px != 0' failed.
process[rviz-4]: started with pid [11145]
[robot_state_publisher-3] process has died [pid 11131, exit code -6, cmd /opt/ros/indigo/lib/robot_state_publisher/state_publisher __name:=robot_state_publisher __log:=/home/roque/.ros/log/7db1f390-4d13-11e5-9277-94dbc9b65860/robot_state_publisher-3.log].
log file: /home/roque/.ros/log/7db1f390-4d13-11e5-9277-94dbc9b65860/robot_state_publisher-3*.log
Traceback (most recent call last):
File "/opt/ros/indigo/lib/joint_state_publisher/joint_state_publisher", line 343, in
jsp = JointStatePublisher()
File "/opt/ros/indigo/lib/joint_state_publisher/joint_state_publisher", line 26, in __init__
robot = xml.dom.minidom.parseString(description).getElementsByTagName('robot')[0]
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1928, in parseString
return expatbuilder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 940, in parseString
return builder.parseString(string)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: no element found: line 1, column 0
[joint_state_publisher-2] process has died [pid 11130, exit code 1, cmd /opt/ros/indigo/lib/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/roque/.ros/log/7db1f390-4d13-11e5-9277-94dbc9b65860/joint_state_publisher-2.log].
log file: /home/roque/.ros/log/7db1f390-4d13-11e5-9277-94dbc9b65860/joint_state_publisher-2*.log
------------------
For gazebo, all i get is:
roque@mint-machine:~/ROS/catkin_workspace/src/CamPanTilt/launch$ roslaunch gazebo.launch
... logging to /home/roque/.ros/log/8b042242-4d14-11e5-b9ce-94dbc9b65860/roslaunch-mint-machine-13332.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://mint-machine:43321/
SUMMARY
========
PARAMETERS
* /pr2_controller_manager/joint_state_publish_rate: 100.0
* /pr2_controller_manager/mechanism_statistics_publish_rate: 1.0
* /robot_state_publisher/publish_frequency: 50.0
* /robot_state_publisher/tf_prefix:
* /rosdistro: indigo
* /rosversion: 1.11.10
* /use_sim_time: True
NODES
/
fake_joint_calibration (rostopic/rostopic)
gazebo (gazebo_ros/gzserver)
gazebo_gui (gazebo_ros/gzclient)
pr2_mechanism_diagnostics (pr2_mechanism_diagnostics/pr2_mechanism_diagnostics)
robot_state_publisher (robot_state_publisher/robot_state_publisher)
spawn_model (gazebo_ros/spawn_model)
tf_footprint_base (tf/static_transform_publisher)
auto-starting new master
process[master]: started with pid [13344]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 8b042242-4d14-11e5-b9ce-94dbc9b65860
process[rosout-1]: started with pid [13357]
started core service [/rosout]
process[gazebo-2]: started with pid [13381]
process[gazebo_gui-3]: started with pid [13387]
process[tf_footprint_base-4]: started with pid [13397]
Gazebo multi-robot simulator, version 2.2.3
Copyright (C) 2012-2014 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
Gazebo multi-robot simulator, version 2.2.3
Copyright (C) 2012-2014 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
process[spawn_model-5]: started with pid [13417]
process[robot_state_publisher-6]: started with pid [13418]
[ERROR] [1440718633.930278102]: Could not find parameter robot_description on parameter server
robot_state_publisher: /usr/include/boost/smart_ptr/shared_ptr.hpp:653: typename boost::detail::sp_member_access::type boost::shared_ptr::operator->() const [with T = const urdf::Link; typename boost::detail::sp_member_access::type = const urdf::Link*]: Assertion `px != 0' failed.
Msg Waiting for master.[ INFO] [1440718633.959184914]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1440718633.959634053]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
Msg Waiting for master
process[pr2_mechanism_diagnostics-7]: started with pid [13469]
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 192.168.1.66
[robot_state_publisher-6] process has died [pid 13418, exit code -6, cmd /opt/ros/indigo/lib/robot_state_publisher/robot_state_publisher __name:=robot_state_publisher __log:=/home/roque/.ros/log/8b042242-4d14-11e5-b9ce-94dbc9b65860/robot_state_publisher-6.log].
log file: /home/roque/.ros/log/8b042242-4d14-11e5-b9ce-94dbc9b65860/robot_state_publisher-6*.log
process[fake_joint_calibration-8]: started with pid [13497]
spawn_model script started
Error: you must specify incoming format as either urdf or sdf format xml
[ INFO] [1440718634.279034660, 0.022000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ INFO] [1440718634.325453185, 0.067000000]: Physics dynamic reconfigure ready.
[spawn_model-5] process has finished cleanly
log file: /home/roque/.ros/log/8b042242-4d14-11e5-b9ce-94dbc9b65860/spawn_model-5*.log
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 192.168.1.66
Error [Param.cc:181] Unable to set value [1,0471975511965976] for key[horizontal_fov]
Error [Param.cc:181] Unable to set value [0,100000001] for key[near]
---------------------
And nothing appears on gazebo world.
Now, I need majorly rviz working for simulation purposes, so any help is well appreciated!
Thank you all in advance!
EDIT:
These are the launch files and URDF contentes:
-> gazebo.launch
---------
-> display.launch
--> robots/CamPanTilt.URDF
All STL's are on the right place.
Update: gazebo shows the robot, but display.launch does not. Also, I always get that error saying that robot_publisher process died
↧
Loading variables with xacro:include
In roslaunch, if I include a file, I can pass it arguments like this:
Is there an equivalent for xacro:include? For example:
I know I can do this using something like:
However, this is not an ideal solution, as I would like to nest my robot_description urdf in a larger definition of robot_description.
↧
↧
xacro load yaml file with rospack
I'm using xacro's new [ability to load a yaml file into a property](http://wiki.ros.org/xacro#YAML_support) in order to update a URDF with new calibration data.
The file in the example is local. Is there any way to hook this up to rospack so I can include this xacro file in another one? I tried an inner $( ) but it didn't work.
↧
Optional Parameters from .launch to .xarco
Hi All
Can someone please tell how I would be able to send **optional** parameters from a .launch file to a .urdf.xarco file.
I have a gazebo model where I want to optionally send the material.
Eg. By default have material set to something specific in the xacro file, if "material" provided in .launch file - use it.
Note: My launch file has multiple instances of the same .urdf.xarco model.
Thanks
↧
jade xacro macro param line breaks 'string index out of range'
I have been running a xacro fine in indigo and hydro but now in jade I get a `string index out of range` error (I also had to add the `--inorder` flag) from having line breaks before or after macro params:
Corrected to the following then it works in jade:
↧
How to publish transform from odom to base_link?
I am running a p3at in a gazebo with ros plugins. I need to subscribe to the odometry pose and update broadcast the tf between odom and base_link.How do I do it? Should I define a "odom" link in the .xacro file used for simulation? What about the joint type?
↧
↧
Nested properties in xacro
I know you can nest xacro macros, but is it also possible to nest properties in xacro?
I'm trying something like this
`test.xacro` contains
but the output of `rosrun xacro xacro.py test.xacro` gives me:
...
note the not expanded contents of the `bar` property
↧
How to connect Turtlebot URDF to PincherX arm URDF file?
Hello,
Please help me in connecting turtlebot to pincherx arm for rviz simulation
i tried connecting it but couldn't do it successfully and ts showing an error during cmake. Turtle bot and PincherX arm description files are available in this location:-
Pincherx Arm
https://github.com/rst-tu-dortmund/phantomx_rst
Turtlebot
https://github.com/turtlebot/turtlebot
↧
How to set custom location for urdf files created from xacro with cmake?
Hello all,
I was following the tutorial here: http://wiki.ros.org/xacro#Building_from_CMakeLists.txt to automatically build urdf files from CMakeLists.txt, but I would additionally wish to create the files into a custom location, and could not make it work by myself... I tried setting the RUNTIME_OUTPUT_DIRECTORY but it did not have any effect. Furthermore, I don't think it is the way forward as I want the urdf files in a separate location and everything else built from the CMakeLists.txt in their respective directories.
Is there a way to modify the aforementioned tutorial to create a custom directory for the urdf files?
Thank you for your time,
A.K.
↧
xacro.py generates empty urdf file
I am using following command to convert *.urdf.xacro to *.urdf in ROS indigo,ubuntu 14.04:
rosrun xacro xacro.py a.urdf.xacro > a.urdf
also
rosrun xacro xacro.py -o a.urdf a.urdf.xacro
content of a.urdf.xacro(just for test):
and the content of generated urdf:
I have faced this problem in two different machines.
any idea?
↧
↧
Confused about Xacro and URDF
Hey together,
I am a little bit confused about the use case of xacro and urdf. I my case I have an robot equipped with 3 laserscanner and modeled a urdf file for it following the [build your URDF](http://wiki.ros.org/urdf/Tutorials/Building%20a%20Visual%20Robot%20Model%20with%20URDF%20from%20Scratch) tutorial. After finishing and testing this i have read that it is possible to [clean up a URDF with Xacro](http://wiki.ros.org/urdf/Tutorials/Using%20Xacro%20to%20Clean%20Up%20a%20URDF%20File). Thats whats confusing for me, I don't have a Xacro file and should use a Xacro file to clean up my previously made URDF?
So was it incorrect to create an URDF, should I have created a Xacro file instead?
Thanks in advance
↧
Xacro if statement evaluation order
Hey,
I am using xacro v1.9.5 with ros indigo but it seems I have run into a bug.
When I use the following code:
the if statement will be evaluated as true. It looks like that only the first value is taken into account.
Am I using it wrong or is this a known bug?
↧
Xacro filling in parameters without specifying
Hey everybody,
I came across the following strange feature. I have two seperate files. One that includes definitions of parts, another that put everything together.
First file:
Second file:
When I run this, the parameter of "parent_link" has the value that I specified in the second file. However, I didn't specify in the first file that this parameter should be used.
Is this intended or not?
↧
Gadzebo model problems
Hi all
I want to run my real robot in ros so I already wrote a simple hardware controller. I also created xacro model. First I wanted to simulate robot in gadzebo and tried there follow joint trajectory action. I did this tutorial http://gazebosim.org/tutorials?tut=ros_control . I am using Faulhaber MCDC 3003 motors which are pretty low effort but have strong transmissions. When I want to simulate robot in gadzebo he is doing what he want. Joints are just moving around and the motors cannot properly move with them. Is there problem with PID setup or what can be the problem. I cannot properly tune PID gains in the last part of tutorial because the PID tuner did not show up after clicking on PID.
I also cannot setup inertia matrix. Is there a way how to avoid it ?.
Here is my robot in real. (Documentation is horrible I needed to measure it myself and try to create proper model)
https://www.youtube.com/watch?v=aZYC8IAiYCk
life my hardware controller is working correctly but I just cannot simulate. Can you help me with any better tutorial or how to setup motors like this. For example when I want them to hold robot at the begging in zero positions.
Thanks for any help.
↧
↧
Resource Not Found: xacro
Hi everyone, I'm new to ROS and currently using indigo on 14.04 LTS.
I have a package called `myrobot_description`,with `launch` and `urdf` folder in it.
i am trying to launch a `.launch` file to display a urdf model in rviz,but facing this problem after i cd into the `launch` folder and run `roslaunch display.launch`
edmond@edmond:~/rosws/src/myrobot_description/launch$ roslaunch display.launch
... logging to /home/edmond/.ros/log/97f94786-aa1e-11e5-9e12-c81f662b396f/roslaunch-edmond-32318.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.
Traceback (most recent call last):
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/__init__.py", line 307, in main
p.start()
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 268, in start
self._start_infrastructure()
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 217, in _start_infrastructure
self._load_config()
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 132, in _load_config
roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/config.py", line 451, in load_config_default
loader.load(f, config, verbose=verbose)
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 730, in load
self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 702, in _load_launch
self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 646, in _recurse_load
self._param_tag(tag, context, ros_config, verbose=verbose)
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call
return f(*args, **kwds)
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 256, in _param_tag
vals = self.opt_attrs(tag, context, ('value', 'textfile', 'binfile', 'command'))
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 202, in opt_attrs
return [self.resolve_args(tag_value(tag,a), context) for a in attrs]
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 183, in resolve_args
return substitution_args.resolve_args(args, context=context.resolve_dict, resolve_anon=self.resolve_anon)
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 312, in resolve_args
resolved = _resolve_args(resolved, context, resolve_anon, commands)
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 325, in _resolve_args
resolved = commands[command](resolved, a, args, context)
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 141, in _find
source_path_to_packages=source_path_to_packages)
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 184, in _find_executable
full_path = _get_executable_path(rp.get_path(args[0]), path)
File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 200, in get_path
raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: xacro
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/home/edmond/rosws/src
ROS path [2]=/opt/ros/indigo/share
ROS path [3]=/opt/ros/indigo/stacks
so basically i suppose the problem here is `ResourceNotFound: xacro`, can any one help me on this issue?
Thanks a lot in advance!
---
Edit: as gvdhoom mentioned, the `xacro` package is missing.i tried installing `ros-indigo-xacro`, and the problem is half solved.It showed that a `urdf_tutorial` package is missing and i tried installing `ros-indigo-urdf-tutorial`, it worked.
Thanks for your instant help.
(btw,it is kind of weird because I've chosen ros full desktop installation, so it should not be any necessary package missing, isn't it?)
↧
Xacro, ruby : SDF parametrization
Hi,
I'm looking to control some parameters of my model through the ros launch file. I know that this used to be handle with xacro in urdf file and ruby allow some features in SDF but I not sure how to processed so that I can pass on the arguments from the launch file.
Also, would it be better to rather use urdf for my model?
Thanks
Alex
↧
Can somebody explain me the relation between .xacro file and .gazebo file and what's the philosophy behind them?
Hi,
I am analyzing some code base about a robot model which has an urdf folder in the package. The urdf folder contains .xacro and .gazebo file. I am not able to understand how these two files are related and they use .yaml configuration? What's the philosophy behind them and while writing .xacro and .gazebo file what should be kept in mind?
↧