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

Some problems of conversion of xacro to urdf

$
0
0
Hi,everyone. I'm reading the book《mastering ros robotics programming》,and in chapter 2 I'm meeting some problems when I try to convert the xacro file to urdf file in the demo "seven_dof_arm". My system is Ubuntu 16.04 & Ros Kinetic. The xacro file and it's incluing sensor file are downloaded from https://github.com/qboticslabs/mastering_ros/tree/master/chapter_2_codes/mastering_ros_robot_description_pkg/urdf When I run the command `rosrun xacro xacro.py seven_dof_arm.xacro > seven_dof_arm.urdf `, the terminal shows: 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://www.ros.org/wiki/xacro1 new: http://ros.org/wiki/xacro1 (/home/dd/catkin_workspace/src/mastering_ros_robot_description_pkg/urdf/sensors/xtion_pro_live.urdf.xacro) deprecated: xacro tags should be prepended with 'xacro' xml namespace. Use the following script to fix incorrect usage: find . -iname "*.xacro" | xargs sed -i 's#<([/]\?)(if\|unless\|include\|arg\|property\|macro\|insert_block)#<\1xacro:\2#g' when processing file: seven_dof_arm.xacro unknown macro name: xacro:base XacroException(u'unknown macro name: xacro:base',) when processing file: seven_dof_arm.xacro Can anyone help me ? Thanks.

How do i solve this?

$
0
0
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 resource not found: create_description ROS path [0]=/opt/ros/kinetic/share/ros ROS path [1]=/home/jhdeanda/catkin_ws/src ROS path [2]=/opt/ros/kinetic/share XacroException('resource not found:',) when processing file: /home/jhdeanda/catkin_ws/src/kobuki/turtlebot_description/urdf/turtlebot_library.urdf.xacro included from: /home/jhdeanda/catkin_ws/src/kobuki/turtlebot_description/robots/kobuki_hexagons_kinect.urdf.xacro while processing /home/jhdeanda/catkin_ws/src/kobuki/turtlebot_gazebo/launch/includes/kobuki.launch.xml: Invalid tag: Cannot load command parameter [robot_description]: command [/opt/ros/kinetic/share/xacro/xacro.py '/home/jhdeanda/catkin_ws/src/kobuki/turtlebot_description/robots/kobuki_hexagons_kinect.urdf.xacro'] returned with code [2]. Param xml is The traceback for the exception was written to the log file

How to use .xacro file for spawning model by using spawn_model service in c++

$
0
0
Hi everyone I have a question about spawning model by using spawn_model service. I use .xacro file for descripting the hector_quadrotor model. And I need to dynamically spawning new model by calling spawn_model service. But I feel confused about how to use .xacro file as parameter for the model_xml fild of gazebo_msgs/SpawnModel message type.If conversion is necessary, does anyone know how to conver .xacro to .urdf or .xml in c++ code. Thanks

Xacro Error: NoneType object has no attribute getitem

$
0
0
I'm trying to convert my `tortoisebot.urdf.xacro` file to a `tortoisebot.urdf` file by running `rosrun xacro xacro tortoisebot.urdf.xacro > tortoisebot.urdf` When I run this command I get this error: I couldn't get it to format correctly, so it's in a Github Gist here: https://gist.github.com/anonymous/bf307fba632e6017ee887caf153c315e. What is causing this error and how do I fix it? Again, I couldn't get the tortoisebot.urdf.xacro file to format correctly, so the link to the gist is here: https://gist.github.com/kk6axq/0cc1f76dbb9609c22177bc9a5d252053 All help is appreciated! Thanks, L

Hector sonar implementation on a Pioneer 3DX

$
0
0
Hello, I'm working on a simulation of two Pioneer-3DX robots on Gazebo. (Debian Stretch / Gazebo 7 / ROS Kinetic) I'm trying to implement sonar readings with Hector_sonar (to make one robot follow the other) but it seems like it doesn't work. The problem I face is that I don't get any range/sonar display on rviz and the range I get from the sonar is always the same, even when the p3dx is alone with nothing around it (range moves between 0.04 and 0.05 which is not really what I would expect). Here's how I did : I cloned in my catkin_ws/src : https://github.com/tu-darmstadt-ros-pkg/hector_models I used https://github.com/tu-darmstadt-ros-pkg/hector_models/blob/groovy-devel/hector_sensors_description/urdf/sonar_sensor.urdf.xacro from hector_models package to make my pioneer3dx_sonar.xacro : true${update_rate}0 0 0 0 0 0false${ray_count}1-${field_of_view/2} ${field_of_view/2}${ray_count}1-${field_of_view/2} ${field_of_view/2}${min_range}${max_range}0.010.005${ros_topic}${name}_link Ten I added into my pioneer3dx.xacro a line to call the previous file : And I obviously deleted how the sonar was defined before. (There was only a model with joint and link and nothing to actually make use of the sonar) If someone could figure out how to make this work with these informations, I'd be really thankful. If you need to know more and these aren't enough, just let me know. Hdifsttar **Edit 1 :** I changed the min value of the sonar range(=0.7) and the range changed to oscillate between the min range(=0.7) and the min range +0.04 (=0.74). Seems like the data I get from the sonar is only the gaussian noise produced in the plugin. So, I think I get 0 from the sonar and the rest is up to the noise. **Edit 2:** I changed the min value and i still got 0.7 from the sonar. The value I got from the sonar (0.74) and the value min I set (0.7) was just a coincidence. The sonar is now working just because i changed the min value from 0.01 to 0.08. Don't know how to explain that. I still can't see any sonar on Rviz though. **Edit 3:** I fixed Rviz, it was just a mistake of topic selected, my bad. I'm closing the topic since I got my answers, feel free to pm me if you ever encounter any problems like that, or want to do the same thing.

How to pass parameters loaded from a yaml file into a xacro?

$
0
0
If I do this: Can I then use values set in the yaml as arguments going into a xacro file? (I haven't experimented much here and I'll update this when I do try it tomorrow, but it seems like the documentation says only the other direction is possible: values can be set on the parameter server from within a launch file, and the local copies of those values can be used inside that same launch file and used as arguments, but there is no read access to the parameter server?)

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.

Does anyone know the focal length of Asus camera? or is there any documentation for it?

$
0
0
It's so important to me to find the answer before RoboCup 2017 competitions.

Error reading end tag - Model parsing the xml failed

$
0
0
I am working on a sample exercise of creating an arm robot with 3 links and 2 joints, by defining the urdf file. Am also following the tutorial from **Mastering ROS for Robotics Programmin** by **Lentin Joseph**. I have the following code while running check_urdf pan_tilt.urdf I get the following error : Error: Error reading end tag. at line 72 in /build/buildd/urdfdom-0.2.10+dfsg/urdf_parser/src/model.cpp ERROR: Model Parsing the xml failed The code is straight out of the tutorials. Can you please point out where the mistake is?

URDF tutorial Got Error

$
0
0
The screenshot for the problem: ![image description](/upfiles/15022719303025862.png) I will try my best to describe it. I just download the tutorial package from the Github: https://github.com/ros/urdf_tutorial/ Last time I tried, it was OK. However, I reinstalled my system due to my PC error. Then if I tried to use roslaunch urdf_sim_tutorial 09-joints.launch It will launch `gazebo` normally. But there are many errors in the rivz RobotModel part. **Many errors** such as : No transform from [box] to [base_link] However, I am pretty sure that there is such link in the file So does any one encounter the same problem? PS: I tried other files, they all give similar problem ( with the respect to the RobotModel in rivz) I really appreciated if any one can help me. Thanks.

mavros/local_position/pose values are totally different than the position generated from gazebo model and odometry sensors

$
0
0
I am trying to use mavros with px4 firmware and sitl. I have a launch file that opens a gazebo environment, spawns the drone, runs mavros, and runs px4. The robot model I used is iris. I created the following xacro with the imu, odometry and gps plugins as you can see. Then I convert it to sdf to be used. Also, I created some static transformations to the launch file as shown as well. The problem is that the position of the iris when using mavros/local_position/pose is different from ground_truth/pose generated from gazebo simulator. I do not know the source of the problem. So, 1- Is there any errors in the model used ? 2- What is the difference between parent_link and parent_frame_id link in the odometry plugin ?? 3- Are the provided static transformation right or wrong ? 4- Any other suggestions to solve this problem if more information required let me know and I will add it Thanks in Advance The xacro file for the iris as follows: 40/base_linkbase_linknavsat/fixnavsat/vel49.98.9000.0001 0.0001 0.0001 The static transformation are as follows:

Turtlebot astra camera does not publish tf

$
0
0
Hello, I have the following urdf file for my astras cameras (sensor_astra1 and sensor_astra2). The problem is that the /robot_state_publisher does not publish the TF of the cameras, so I cannot use them with RtabMap. I have followed the [instructions](http://wiki.ros.org/turtlebot/Tutorials/indigo/Adding%20New%203D%20Sensor) in order to add new sensors to Turtlebot and I have all the required files. I beleive the problem is with the actual urdf of the cameras but I cannot see the error. The file is: Any help is appreaciated! Cheers

Simulated 3-axis camera gimbal for UAV in gazebo

$
0
0
Hi there, I'm currently trying to simulate a "perfect" (no friction) 3-axis camera gimbal attached on the bottom of a UAV. I'm using the hector quadrotor gazebo/ROS project to try and achieve this. The ultimate goal is that the simulated image plane is continuously perpendicular with the world plane. In order to achieve this, I've attached a simulated camera to 3 orthogonal, continuous joints via links with no length (see the URDF/xacro below). However, the image feed produced is still as if the camera were permanently affixed to it. I'm fairly new to URDF/xacro/etc. so please excuse me if this is just a basic misunderstanding on my part! Here's the gimbal URDF/xacro file I've created: ${update_rate}${hfov * M_PI/180.0}${image_format}${res_x}${res_y}0.01100${name}${ros_topic}${cam_info_topic}${name}_optical_frame Which is instantiated in the following file: Thanks in advance!

robot slips after upgrade to kinetic

$
0
0
Dear all, After upgrading from Ubuntu 14.04 to 16.04 and from Indigo to Kinetic I'm experiencing a weird behavior from Gazebo and the HyQ robot model. The complete robot model can be found [here](https://github.com/iit-DLSLab/hyq-description). I made the minimal set of modifications to make it compatible with the new xacro standard (see [corresponding branch](http://github.com/iit-DLSLab/hyq-description/compare/kinetic-migration)) Even after setting unrealistically high friction coefficients in the corresponding tag (see [here](https://github.com/iit-DLSLab/hyq-description/blob/kinetic-migration/urdfs/leg/leg.gazebo.xacro#L69)), the robot can't walk and slips badly. With the same description on Gazebo 2/ROS Indigo the robot always was fine. Is there a new way to define friction between feet and ground? Am I missing a tag or something? I saw that in Gazebo 7 there is a torsional friction, but I can't find from URDF documentation how to add it. Also, there are many SDF-related tags which don't map well to URDF, like contact slip factor. **UPDATE:** I've narrowed down the issue to this portion of the URDF: Apparently, a collision set as a perfect sphere is handled in a different way from Gazebo 2 to 7. If I remove the collision field, the tip of the leg (which is not spherical) is taken for the collision, and the robot works fine. My suspect goes to the torsional friction feature, which has been introduced in new versions of Gazebo. How can I set torsional friction from URDF? [This answer](http://answers.gazebosim.org/question/13082/how-do-i-add-torsional-friction-to-urdf-model/) points to a tutorial which explains how to set it in SDF, not URDF.

Convert sdf file to urdf.xacro

$
0
0
Hey there I actually have a sdf file given and would like to convert it to an urdf.xacro file. As I have not found any converter for that I would like to do that by hand. Now what I currently have is e.g a sdf file which has a content like this:body_linkwheel1_link0 0 0 0 -0 00 1 00-1.79769e+3081.79769e+308-1-1000000.200.2 My current urdf.xacro file looks like this: Unfortunately I do not know how to deal with the physics tag.

Including another robot part via xacro

$
0
0
Hi, I've been trying to attach a gripper to my manipulator and I've decided it would be best for my project if it was in another file. The problem is that I can't seem to do this correctly, when running the gazebo simulation I get the message Error [parser_urdf.cc:3474] Unable to call parseURDF on robot model Error [parser.cc:342] parse as old deprecated model file failed. [INFO] [1511876200.859116, 10.141000]: Spawn status: SpawnModel: Entity pushed to spawn queue, but spawn service timed out waiting for entity to appear in simulation under the name Kuka_kr3 And the robot will not spawn. Below I attach the codes for robot and gripper. Another question that I have, is that I've made these files in similar fashion, but I don't know if I can use the macros defined in the manipulator file in gripper definition? So far, I've written it as a standard urdf file. Manipulator file /kuka_kr30.50.5Gazebo/${color}transmission_interface/SimpleTransmissionhardware_interface/EffortJointInterfaceEffortJointInterface1--> Gripper /gripper0.50.5Gazebo/Orange0.50.5Gazebo/Red0.50.5Gazebo/Redtransmission_interface/SimpleTransmissionEffortJointInterfaceEffortJointInterface1transmission_interface/SimpleTransmissionEffortJointInterfaceEffortJointInterface1

Loading robot_description dependent on rosparams

$
0
0
There are a few dimensions of my robot model that are subject to change at runtime, and so I would like to use the param server to set and get those values. It was easy enough to set the values, but now I am unsure as to the best way to pass them to xacro when uploading the robot description: - Am I right that there isn't a way to query a parameter from the server within a launch file? Otherwise I would do something like: <param name="robot_description" command="$(find xacro)/xacro.py $(arg model) my_var:=$(rosparam get my_var)"> - I can instead query the parameters within a python script, but how do I invoke xacro from within that script? Should I use `xacro.main(['arg1', 'arg2', ...])`? **Edit: Scratch this as `main()` doesn't take any arguments. I'd prefer a solution that doesn't necessitate forking/modifying core code.** - Presumably python would allow me to go the "hacky" route and just run the xacro command in a shell and get the result from stdout? Any suggestions welcome. Thanks!

rviz ignores origin if it has decimal values

$
0
0
Hello, I'm trying to modeling my first robot using URDF. The problem that I have is that when I visualize it with rviz, I can see that the joint's origins are ignored if they contains decimal points (for instance, something like "origin xyz="0 0 -0.08""). If, however, I use a comma to write decimal values on the origins (such as "origin xyz="0 0 -0.08""), everything works well. This wouldn't be a problem if xacro didn't complain when I try to use math operations with comma decimals. So it is not clear to me if this is a bug on xacro, on rviz or if I am doing something wrong. Anyone would have a clue of what can be happening? For your reference, I am using ROS Lunar. Thank you very much in advance. Regards

gazebo robot model modifying

$
0
0
Dear Alruists, I have to modify some functionality of a relatively complex robot (legged & wheeled), which I did not work before. I can spawn the model(urdf, idont have xacro file) and change joint angles in rviz roslaunch urdf_sim_tutorial gazebo.launch model:='$(find urdf_tutorial)/urdf/tt3.urdf' - . I want to add force torque sensor to calculate efforts on wheel (added below portion but it shows > [FATAL] [1515084753.020957716, 0.114000000]: gazebo_ros_ft_sensor plugin error: jointName: force_torque_sensor_rear_right does not exist )true100.0ft_sensor_topicforce_torque_sensor_rear_right - Move the robot on that flat surface (so added transmissions, but is differential drive applicable in wheel which are in different legs? ) - Control pose from topics can you suggest any easy solution for this? Seeing some tutorials it seems modifying xacro, it would have been easier, but I dont have this, so have to add all manually.

Need help with find error in this urdf

$
0
0
Hi, I am learning the tutorial about urdf. I am at the exercise 8 now. The error I have when run the launch file is: [ERROR] [1478674779.727709696]: length [${bodylen}] is not a valid float [ERROR] [1478674779.727814955]: Could not parse visual element for Link [base_link] [ERROR] [1478674779.727917245]: radius [${width}] is not a valid float: bad lexical cast: source type value could not be interpreted as target [ERROR] [1478674779.727969693]: Could not parse visual element for Link [head] ..... I will include here to the code from start to base_link. Please help me point out the issue. I cannot find out what is wrong. ... Edit 1: I found the problem. I missed the 4 rows below the link but I got a new error and I don't understand what it is: ... process[rviz-4]: started with pid [7571] [ERROR] [1478753950.661833770]: Error reading end tag. [robot_state_publisher-3] process has died [pid 7563, exit code -11, cmd /opt/ros/indigo/lib/robot_state_publisher/state_publisher __name:=robot_state_publisher __log:=/home/ubuntu/.ros/log/6a4eafd8-a702-11e6-98d1-00044b581868/robot_state_publisher-3.log]. log file: /home/ubuntu/.ros/log/6a4eafd8-a702-11e6-98d1-00044b581868/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 239, column 0 [joint_state_publisher-2] process has died [pid 7555, exit code 1, cmd /opt/ros/indigo/lib/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/ubuntu/.ros/log/6a4eafd8-a702-11e6-98d1-00044b581868/joint_state_publisher-2.log]. log file: /home/ubuntu/.ros/log/6a4eafd8-a702-11e6-98d1-00044b581868/joint_state_publisher-2*.log [ERROR] [1478753953.368324386]: No link elements found in urdf file Edit 2: Full urdf xacro.
Viewing all 152 articles
Browse latest View live


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