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

Xacro convert property to integer

$
0
0
I'm using ROS Indigo and I want to create a robot with parametrizable camera resolution using just one urdf.xacro file. The camera width gets passed into the myrobot.urdf.xacro file via the prefix parameter when I spawn the robot: In the myrobot.urdf.xacro I then create the properties for a 4:3 aspect ratio: Later I pass the values into the field:10.0${M_PI/2}${cam_width}${cam_height}R8G8B8 ... ... So far so good. Now when I input a camera_resolution parameter of 1024, the `cam_width` get's correctly set to 1024, but for the height I just get the default value with an error: Error [Param.cc:181] Unable to set value [768.0] for key[height] I investigated the error and it seems, the sensor field can't handle float values, but xacro automatically creates `cam_height` as float. If I manually insert the value `768.0` the same error message appears, but if I manually insert `768`, the parameter get's set correctly. Now to my question: is there a way to manually convert the `cam_height` property to an integer? I know with ROS Jade arbitrary python expressions will get supported by xacro, so I could use the floor() function, but is there any other way apart from switching to ROS Jade? I already tried stuff like `cam_height / 1` without success. Alternatively, maybe someone has a better idea how I could realize the parametrizable camera resolution. Best regards, Malefitz

Problem in creating .urdf files

$
0
0
Hello everyone. I want to create .urdf file from the file lwa.urdf.xacro. My OS is Ubuntu 14.04 and ROS distribution is indigo. In the folder: `opt/ros/indigo/stacks/schunk_description/urdf/lwa` There are 3 files: - lwa.gazebo.xacro - lwa.transmission.xacro - lwa.urdf.xacro In terminal, I direct to this directory and command: ros@ros:~$ rosrun xacro xacro.py lwa.urdf.xacro > lwa.urdf ros@ros:/opt/ros/indigo/stacks/schunk_modular_robotics/schunk_description/urdf/lwa$ rosrun xacro xacro.py lwa.urdf.xacro > lwa.urdf bash: lwa.urdf: Permission denied I know that my question might be somehow silly. I am sorry but it probably refers to my lack of proper knowledge, esp. with Linux. I just guess it must have something to do with permissions. I would appreciate if someone help me or share his/her experience in creating .urdf files with me. Thanks a lot, Damon P.S. Why do I need .urdf file? Gazebo works with .xacro files smoothly and I already can load the robot in gazebo or send the commands to it. The point is that I want to use Moveit! Moveit has an "assistant" which helps you make Moveit recognize your robot. When I load xacro file of PR2 robot in Moveit, the assistant works fine and seemingly creates a .urdf file for itself. But this doesn't work when I load xacro file of schunk. And the reason is that Moveit tries to build .urdf file and fails. This makes me feel if I want moveit work, I should first be able to create .urdf files. --- Edit: First of all, thanks for your time and attention. :) xacro has been introduced to replace urdf. Basically we should be able to create urdf from xacro. My schunk package (schunk_description) is in: opt/ros/indigo/stacks/schunk_modular_robotics I thought if the problem is permissions, what if I try to make a copy of the package somewhere else and try again. So I copied the package to /Documents. And: ros@ros:~$ cd Documents ros@ros:~/Documents$ cd schunk_modular_robotics/schunk_description/urdf/lwa ros@ros:~/Documents/schunk_modular_robotics/schunk_description/urdf/lwa$ rosrun xacro xacro.py lwa.urdf.xacro > lwa.urdf This created an empty .urdf file. Here is the contents: Moveit used to use .urdf file. But recently, they say the user can also browse to .xacro file as well. I think this is exactly what Moveit tries to do automatically, and probably the urdf file is also created. But since it is empty, Moveit fails. Here is when I try to browse the lwa.urdf.xacro file in Moveit: An error message shown by setup assistant in a small window: "URDF/COLLADA file is not a valid robot model." And when I look at the terminal, I see this: [rospack] Error: no package given [librospack]: error while executing command [ INFO] [1434379501.633977236]: Running 'rosrun xacro xacro.py /opt/ros/indigo/share/schunk_modular_robotics/schunk_description/urdf/lwa/lwa.urdf.xacro'... [ERROR] [1434379501.934726406]: No name given for the robot. As you see, it seemingly tries to do what I try and fail: creating .urdf from .xacro. Then I do another experiment: I was able to create the urdf, when I copied the whole package in my "Documents", where probably permissions are not troublesome. In there the .urdf is created, but empty. This time, I browse that empty .urdf file to see the reaction of Moveit: [rospack] Error: no package given [librospack]: error while executing command [ERROR] [1434379684.002977198]: No name given for the robot. The same thing! Which possibly means, the problem is not Moveit. The problem is created .urdf file, and as you mentioned, maybe there is something wrong with schunk .xacro file. :(

Stage vs Gazebo

$
0
0
Hi Users: I would like to know the pros and cons between Stage and Gazebo. Is there any document where I can find out? Thanks!!!

Sensor Camera on Gazebo: Could not find parameter robot_description on parameter server

$
0
0
hi all, i'm trying to create a sensor camera on [gazebo](http://www.ros.org/wiki/gazebo), but i have this message on the terminal when i run the launch file: [ERROR] [1323711066.531080823]: Could not find parameter robot_description on parameter server [ERROR] [1323711066.531205567]: Could not generate robot model [ERROR] [1323711066.531238167]: Failed to extract kdl tree from xml robot description [robot_state_publisher-4] process has died [pid 2161, exit code 255]. log files: /home/mauro/.ros/log/0edc0fb2-24e7-11e1-ba97-0016ea548718/robot_state_publisher-4*.log i created a launch file: the file my_camera.lauch is: the file my_camera.urdf .xacro is: true640 480R8G8B8900.0110020.0true20.0finger_tip_cam/imagefinger_tip_cam/camera_infofinger_tip_camera_linktrueGazebo/BlueErratic/YellowErratic/YellowErratic/Yellow

Pausing and unpausing hector_quadrotor

$
0
0
I need to be able to control hector_quadrotor using another one of my nodes. What i exactly want : 1. My node chooses a velocity for the quad to use 2. My node tells hector_quadrotor to use this velocity using `/cmd_vel` 3. My node tells hector_quadrotor to start simulating physics for 1 second and give the outcome of the final positions. 4. After 1 second of simulation (may not be 1 second in real time) - hector_quadrotor pauses itself, and gives back the result of the step. 5. My node reads the current positions, velocities, etc and chooses the next velocity it wants to set. 6. Go back to step 2 I know of gazebo's services to pause and unpause physics - but I am unable to tell it to do it for a specific time. I am using roscpp Any help/direction of approach appreciated.

Synchronous communication with gazebo

$
0
0
Hi, I am trying to implement a robot controller using ros + gazebo - So, what I want it to tell gazebo a particular command and then gazebo should return the state after 1 second. And after that it should pause itself.Now, I do some processing and again give a command - and it should again run for only 1 second. I need my actions to be used for equal amounts of time.

Recommended ROS+Gazebo Project Structure

$
0
0
What's the recommended project structure for a basic ROS project that uses Gazebo for simulation? I'm reading through the ROS and Gazebo tutorials, as well as looking at some projects like Turtlebot, and I'm having trouble figuring out what the best practice is. In some ways, Turtlebot's project layout seems very complicated, even when compared to physically more complicated robots like the Nao, whose project layout is relatively more simple. I'm trying create an initial project layout for a small quadruped robot that I plan to simulate in Gazebo. [This tutorial](http://gazebosim.org/tutorials?tut=ros_roslaunch&cat=connect_ros) recommends creating just two packages, MYROBOT_description and MYROBOT_gazebo in a single git repo. Is that all I need? Looking at Turtlebot, they've done something similar, but they've split MYROBOT_gazebo off into a turtlebot_simulator meta-package in a separate git repo. I understand the abstraction because it lets them plug in different simulator backends other than Gazebo, but I don't understand why they manage the source in a separate repo. What's the benefit of keeping the *_description and *_gazebo projects in separate repos? Turtlebot also defines a few other packages, which I've seen replicated elsewhere, such as *_bringup, *_capabilities, and *_apps. Are these typically best practice to create for your robot?

Analyzing stability of URDF

$
0
0
Hello everyone! I just wanted to know if there is any way other than trial and error to test a robot's stability by simulation. I am developing an URDF file of a robot in which the center of mass is a little bit too high therefore sudden changes in acceleration makes it fall to one side or the other. Is there any way in gazebo or outside of it to test the worst case scenario of a URDF file? At least to locate at all times the absolute center of mass of the robot? I know it is a sort of vague question but I hope someone holds the answer!

Motion planning collision checking on Gazebo virtual worlds

$
0
0
Hello everyone, I will create a virtual building in Gazebo with the [building editor](http://gazebosim.org/tutorials?tut=building_editor&cat=build_world). Then, I want to do motion planning in that building. In the past, I was carrying out a mapping step in which I was teleoperating the robot and building an octomap from the sensor data. Then I used the octomap for collision checking. Now, I would like to directly use the environment saved for collision checking or to automatically convert it into an octomap (or just a 3D occupancy grid), so I do not need to manually sense the map. Any ideas on how to do this? Thank you!

Point Cloud transformation error

$
0
0
Hello, I am using **stereo_image_proc** to process data coming from a stereo system. When trying to visualize it in RVIZ I came across to the following issue: **The point cloud** *(pointcloud2 and pointcloud topics)* **is not properly transformed**. See the following images: **In gazebo:** https:// cloud.githubusercontent.com/assets/1283922/3115469/1744ac0e-e709-11e3-8e17-84c713713794.png **In RVIZ:** https:// cloud.githubusercontent.com/assets/1283922/3115472/2044a638-e709-11e3-8023-6b9ed6eeb568.png Any ideas? Thanks..! **P.S.: The cameras seem properly transformed.** Sorry about the links (no images/links because my karma is low). See images below: **Left:** https:// cloud.githubusercontent.com/assets/1283922/3115534/eef65dbe-e709-11e3-8ae9-793dcd54bb60.jpg **Right:** https:// cloud.githubusercontent.com/assets/1283922/3115539/fafae6fc-e709-11e3-8d06-c4366250d28e.jpg

Apply Joint Effort to Gazebo Model

$
0
0
Hello, I am using Gazebo with ROS. I created a model in Gazebo that I was able to successfully send service calls to (to get a joint to spin for example). Specifically, I used the srv file gazebo_msgs/ApplyJointEffort (with a serviceClient node). What I'm trying to do now is get the nodes to be publisher/subscription-based to match another structure I am working with. Is it possible to create my own msg file based off of the gazebo_msgs/ApplyJointEffort srv in order to make a publisher node and still an effort on a joint? I tried doing just that and the publishing happens but there is no response to the model in gazebo. I'm obviously uncertain as to how the gazebo_ros package communication exactly works so any help would be appreciated. Thank you

Hello,I want to spawn two TurtleBots in Gazebo. And also I wish to control each of the robots independently. Is there a way to do it ? Thank you

$
0
0
What should I include in my Launch file, I new to ROS and Gazebo and this has to do with my master's project.

Problems viewing Collada files in Gazebo-ROS

$
0
0
I have followed the tutorial to insert a Collada `.dae` file into Gazebo, so that my world file is:model://sunmodel://ground_plane0 0 0 0 0 0truefile://duck.dae If I run `gazebo test_world.world` I can see the duck. However, if I create the following launch file: The duck is not displayed in Gazebo, although I can see the element exists in the left-hand pannel. I have seen other people with my problem, and tried many things, but I cannot make it work. Should the `.dae` and `.world` files be in a specific folder? Any help is appreciated! (I'm using Gazebo 4.1.3 with ROS Indigo). **UPDATE:** After applying the accepted answer, this is the final state (note that `file://` has changed to `model://`) Launch file: World file: model://sunmodel://ground_plane0 0 0 0 0 0truemodel://duck.dae And the folder structure is: - my_package - models - test_world.world - duck.dae - lauch - test_launch.launch - CMakeLists.txt - package.xml

Controlling Pionner in a Simulated Environment Using p2os and gazebo

$
0
0
Dear all, I am trying to control Pionner in a simulated environment using p2os and gazebo. For that, I executed: % roscore % roslaunch p2os_urdf pioneer3dx.gazebo.launch The Pioneer appeared in the simulated environment. What I must do now for controlling it? I already tried: % rostopic pub /cmd_vel geometry_msgs/Twist '[-0.5, 0, 0]' '[0, 0, 0]' -r 100 but it didn't work. Kind regards, Claudine

Turltebot laser striking frame in gazebo simulation

$
0
0
I'm currently experimenting with navigation for a simulated turtlebot using the turtlebot_navigation package. I was having trouble getting a stable position estimate when I noticed that the simulated LIDAR appears to be striking the frame of the robot which appears to be interefering with the pose estimate generated by the amcl package. I have modified the minimum range of the laser to 0.3m, but this does seem to be a temporary solution. Should the simulated sensor be moved so that is does not strike the frame, or is there a method for directing the navigation system to ignore LIDAR returns that do not meet specific criteria? ![image description](/upfiles/13533766724472896.png)

gazebo simulation tutorial

$
0
0
Is anyone tried this tutorial before? http://gazebosim.org/tutorials/?tut=ros_urdf I follow the steps: cd ~/catkin_ws/src/ git clone https://github.com/ros-simulation/gazebo_ros_demos.git cd .. catkin_make build successful. However, when i try to run roslaunch rrbot_description rrbot_rviz.launch, it gives me this error. [rviz-4] process has died [pid 8639, exit code -11, cmd /opt/ros/indigo/lib/rviz/rviz -d /home/sam/task/src/gazebo_ros_demos/rrbot_description/launch/rrbot.rviz __name:=rviz __log:=/home/sam/.ros/log/1164600a-1ffb-11e5-ac93-485ab67bb3cb/rviz-4.log]. log file: /home/sam/.ros/log/1164600a-1ffb-11e5-ac93-485ab67bb3cb/rviz-4*.log Can anyone help me?

multiple turtlebots simulation in gazebo and visualization in rviz

$
0
0
Hi, I need to simulate multiple turtlebots in gazebo and visualize them in rviz and finally I succeed to add two robots into gazebo and rviz according to [this](http://answers.ros.org/question/115396/problem-with-multiple-navigation-on-gazebo/) but there are a few problems. 1.if I teleop one of the robot, even just rotate in place, the turtlebot will drift. I checked [this](http://answers.ros.org/question/188553/robot-drifting-in-rviz/) however when I look into the source file of gazebo_ros_kobuki.cpp(kobuki_gazebo_plugins) I find that this module is using the non-holonomic robot model. I am not sure what is the problem. 2.When I drive one robot toward the other and let these two robot collide, in the gazebo everything is ok but in rviz the moving robot just drive into the other one and pass through it, like the other one never exists. And also there is no output of bump cloud. 3.As you can see in the teleop launch file, I only publish velocity commands to one robot. But the actual result is that that turtlebot in gazebo works fine but in rviz both turtlebots react to the angular velocity. That means if I drive the robot, say robot1, linearly then only robot1 moves in rviz but when I sent angular velocity through keyboard then both robots will rotate in rviz.**[this one is solved by change sensor names]** So I check the velocity topics related to both robots, it shows that only /robot1/command/velocity receives messages other velocity related topics have no message received. But still both robots rotate. Here are related files: Gazebo related files Main launch file: agents.launch.xml for multiple robots launch agent.launch.xml for single robot launch amcl.launch.xml for localization Keyop file for key board operation. rviz file By the way I change the following lines in gazebo_ros_kobuki.cpp. Line 141 joint_state_pub_ = nh_.advertise(node_name_ +"/joint_states", 1); Line 198 odom_pub_ = nh_.advertise(node_name_ +"/odom", 1); Line 386 joint_state_.header.frame_id = node_name_+"/base_link"; Line 397 odom_.header.frame_id = node_name_+"/odom"; Line 398 odom_.child_frame_id = node_name_+"/base_footprint"; Please help me with the problems thank you very much!! [here](https://www.dropbox.com/s/2y0xxap3s22xq8j/frames.pdf?dl=0) is the tf frames topics are [here](https://www.dropbox.com/s/qnfddreiyu1d29l/topics.txt?dl=0)

Turtlebot simulator laser scan not working.

$
0
0
Hi everyone, I'm learning ROS and I'm trying to follow this tutorial link: http://wiki.ros.org/turtlebot_simulator/Tutorials/hydro/Explore%20the%20Gazebo%20world, when I put several objects in the gazebo, and ran the command **roslaunch turtlebot_rviz_launchers view_robot.launch**. I expected to see the laser sensor and camera can read this and show their information in the Rviz, however it just gave me a blank screen without any sensory information. The image doesn't work properly either. Anybody has any ideas ? I'm using ubuntu 12.04, ROS Hydro, and gazebo 1.9.6. The global fixed frame is "base_link", the laserscan topic is /scan, and the image topic is /camera/depth/image_raw and /camera/rgb/image_raw Thanks very much !

How to convert *.urdf.xacro files to *.sdf for gazebo?

$
0
0
Dear all, as with the latest gazebo version (1.7.12-s1367893033~precise) in groovy, it seems that our *.urdf.xacro files are finally not supported anymore. I found out about the latest .sdf format (1.3) and already tried to update some of our files. I.e. I replaced 54154110.0 0.0 0.0false${min_angle*180.0/M_PI}${max_angle*180.0/M_PI}0.0530.00.03${update_rate}0.005true${update_rate}${ros_topic}/${name}_link with 5411.0${min_angle*180.0/M_PI}${max_angle*180.0/M_PI}0.0530.00.03 for the urdf.xacro files for one of our sensors. However, if I then spawn our robot, I get the following message from gazebo: fxm@sony-fxm:/opt/ros/groovy/stacks/simulator_gazebo/gazebo_worlds/worlds$ roslaunch gazebo_worlds empty_world.launch ... logging to /home/fxm/.ros/log/320cbf70-bca0-11e2-9ff7-00271039ca78/roslaunch-sony-fxm-20823.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://sony-fxm:55478/ SUMMARY ======== PARAMETERS * /rosdistro * /rosversion * /use_sim_time NODES / gazebo (gazebo/gazebo) gazebo_gui (gazebo/gui) auto-starting new master process[master]: started with pid [20837] ROS_MASTER_URI=http://localhost:11311 setting /run_id to 320cbf70-bca0-11e2-9ff7-00271039ca78 process[rosout-1]: started with pid [20850] started core service [/rosout] process[gazebo-2]: started with pid [20864] process[gazebo_gui-3]: started with pid [20876] Gazebo multi-robot simulator, version 1.5.0 Copyright (C) 2013 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org Gazebo multi-robot simulator, version 1.5.0 Copyright (C) 2013 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org Warning [parser.cc:361] Converting a deprecated SDF source[/opt/ros/groovy/stacks/simulator_gazebo/gazebo_worlds/worlds/empty.world]. Set SDF value Version[1.2] to Version[1.3] Please use the gzsdf tool to update your SDF files. $ gzsdf convert [sdf_file] Msg Waiting for master[ INFO] [1368540701.989137839]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... Msg Connected to gazebo master @ http://127.0.0.1:11345 Msg Publicized address: 10.17.55.151 Msg Waiting for master Msg Connected to gazebo master @ http://127.0.0.1:11345 Msg Publicized address: 10.17.55.151 Error [Events.hh:141] Events::ConnectWorldUpdateStart is deprecated in v 1.5.0. Please use Events::ConnectWorldUpdateBegin Error [Events.hh:141] Events::ConnectWorldUpdateStart is deprecated in v 1.5.0. Please use Events::ConnectWorldUpdateBegin Error [Events.hh:141] Events::ConnectWorldUpdateStart is deprecated in v 1.5.0. Please use Events::ConnectWorldUpdateBegin [ INFO] [1368540703.812490419]: joint trajectory plugin missing , defaults to 0.0 (as fast as possible) Error [Events.hh:141] Events::ConnectWorldUpdateStart is deprecated in v 1.5.0. Please use Events::ConnectWorldUpdateBegin [ INFO] [1368540703.842767312, 0.023000000]: waitForService: Service [/gazebo/set_physics_properties] is now available. [ INFO] [1368540703.883032363, 0.057000000]: Starting to spin physics dynamic reconfigure node... Warning [parser.cc:377] SDF has no element in file[data-string] Dbg extension [5411.0-135.000315689135.0003156890.0530.00.03] not converted. Dbg extension [5411.0-135.000315689135.0003156890.0530.00.03] not converted. Dbg [base_footprint] has no parent joint Warning [parser.cc:314] parse from urdf. The robot spawns within gazebo but there no sensor message is published. It is similar for our controllers. They don't work anymore as well. My questions now are: - Why are the gazebo extensions not converted? Is there something wrong? - What is best practise to convert .urdf.xacro files into the new .sdf format? - Where can I find examples? Has the PR2 been updated yet? With best regards, Felix

Gazebo Planar Move Plugin for Omni-Directional Wheel

$
0
0
Hi, I'm trying to simulate Kuka youbot with gazebo.
I have a question about gazebo planar move plugin.
Since kuka youbot has mecanum wheels, it needs to use gazebo planar move plugin.
So I followed [this instruction](http://gazebosim.org/tutorials?tut=ros_gzplugins) and added the plugin. As a result, the mobile platform works fine, however the manipulator on the platform looks weird.
Manipulator falls down because of gravity, but the motion is very slow.
And each joint requires more torques to move than without the plugin.
Why planar move plugin affects robot motion in the above way ?
How can I avoid this situation ? Thanks in advance.
Viewing all 1516 articles
Browse latest View live


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