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

Getting Kinect images from Gazebo

$
0
0
I want to get kinect rgb images to further process on ROS, but I need to simulate a kinect on gazebo, so I'm not understanding well how to parse the images. I know normally I can get the kinect images following [this tutorial](http://wiki.ros.org/cv_bridge/Tutorials/UsingCvBridgeToConvertBetweenROSImagesAndOpenCVImages) but how is the code to get them from gazebo? I also asked this question on gazebo answers but I didn't have any reply so I was thinking maybe this forum was the best place.

How to properly configure wheel links in gazebo and ros urdf to provide proper propulsion?

$
0
0
Hi, My question is regarding configuring the properties of wheel links and the associated joints (motors). I'm building a four wheeled differential car, and i finished my urdf seamlessly, and connected ROS_control too, everything is fine except that the wheels don't provide proper propulsion for the vehicle, so i thought that the properties might not be configured properly. I started messing around to see if i can get it working, but no luck. Gazebo/Blackfalse0.01transmission_interface/SimpleTransmissionEffortJointInterfaceEffortJointInterface1 If i move the vehicle forward or backward it works like a piece of cake, but when i try to rotate it, (differentially) the wheels start to skid and the vehicle moves in a strange manner Any one can help me with this? I'd be really grateful

Turtlebot Simulator World not coming up properly

$
0
0
Hi All--- I have been new to ROS and Gazebo and have been trying to get the hands on the turtle bot in Gazebo simulator. I am using Ubuntu 14.04 version and ROS--Indigo and I have followed [this](http://wiki.ros.org/turtlebot_gazebo/Tutorials/indigo/Gazebo%20Bringup%20Guide) tutorial to bring up the Turtle bot in the world describe in the the same link. However, I am not able to get the same world; infact I am only getting a blank world. Moroever, I got the following warning jashanvir@jashanvir-Dell-System-XPS-L502X:~$ roslaunch turtlebot_gazebo turtlebot_world.launch ... logging to /home/jashanvir/.ros/log/68c77ab0-7d9e-11e6-8601-88532e0c5102/roslaunch-jashanvir-Dell-System-XPS-L502X-19685.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://jashanvir-Dell-System-XPS-L502X:39528/ SUMMARY ======== PARAMETERS * /bumper2pointcloud/pointcloud_radius: 0.24 * /cmd_vel_mux/yaml_cfg_file: /opt/ros/indigo/s... * /depthimage_to_laserscan/output_frame_id: /camera_depth_frame * /depthimage_to_laserscan/range_min: 0.45 * /depthimage_to_laserscan/scan_height: 10 * /robot_description:

Properly restarting the gazebo simulation for iterative learning

$
0
0
I've seen this question posted many times, but with no definitive answer (and they are old). To name a few: [1](http://answers.gazebosim.org/question/8552/how-can-i-reset-the-simulation-properly-in-gazebo-4-with-ros-indigo/) [2](http://answers.gazebosim.org/question/8801/how-to-reset-the-simulation/) [3](http://answers.ros.org/question/118186/how-to-re-initiate-simulation-gazebo-rviz/) However, many of these solutions don't really answer the question. reset_world seems to break all of the controllers. Just calling it with the pr2 model leads to a flow of red errors. What I'm using now is the [SetModelConfiguration](http://docs.ros.org/kinetic/api/gazebo_msgs/html/srv/SetModelConfiguration.html) service call. This works well...at the beginning. However, after the 10th or so experiment, the robot arm beings to "fling around" after the service call. After 20 or so experiments, the whole robot starts rocking as it gets called. It's as if the model is colliding with itself. I'm wondering why this is. Thoughts: Could it be the effort controller? To test this I set all of the efforts to 0 between experimental runs, and give the controllers a second or two to settle before calling SetModelConfiguration. This didn't help. Is gazebo storing some sort force? It seems like the controller would remove that. I use the "/gazebo/clear_body_wrenches" and the "/gazebo/clear_joint_forces" service calls to reset all forces, but that doesn't help either. I'm out of ideas!

Turtlebot doesn't move in Gazebo

$
0
0
Hello, I am trying to add different local planner to my ROS navigation stack, eband_local_planner is one among them. I'm using the navfn as global planner and eband as local planner which I downloaded from [here](https://github.com/utexas-bwi/eband_local_planner). I created a [launch file]( http://textuploader.com/dsc28!) for the stack. The configuration files are taken from [here]( https://github.com/utexas-bwi/segbot/tree/master/segbot_navigation/config/segbotv2). Once I launch the file Gazebo gives out exact local and global path, however the turtlebot doesn't move in the simulation. I'm also attaching the [video link](https://www.magisto.com/video/YEEVIFNRHzFpQwFgCzE) of the process. Can anybody point out the mistake with the process. Thanks, Karthi.

Can not launch a simulation demo of fetch_gazebo

$
0
0
I just downloaded package of fetch robot sudo apt-get install ros-indigo-fetch* I wanted to run one of its simulation example, following this [page](http://docs.fetchrobotics.com/gazebo.html) roslaunch fetch_gazebo simulation.launch However, it failed. I got this following error message: [ INFO] [1474451972.968305067, 0.105000000]: Camera Plugin (ns = /) , set to "" [urdf_spawner-5] process has finished cleanly log file: /home/osboxes/.ros/log/15935e86-7fe2-11e6-a92e-000c29a1f7dd/urdf_spawner-5*.log Segmentation fault (core dumped) [gazebo_gui-3] process has died [pid 4990, exit code 139, cmd /opt/ros/indigo/lib/gazebo_ros/gzclient __name:=gazebo_gui __log:=/home/osboxes/.ros/log/15935e86-7fe2-11e6-a92e-000c29a1f7dd/gazebo_gui-3.log]. log file: /home/osboxes/.ros/log/15935e86-7fe2-11e6-a92e-000c29a1f7dd/gazebo_gui-3*.log [ WARN] [1474451978.035079126, 0.105000000]: The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF. [ INFO] [1474451978.041333169, 0.105000000]: Started arm_controller/gravity_compensation [ INFO] [1474451978.260176485, 0.105000000]: Started base_controller [ WARN] [1474451978.475835321, 0.105000000]: The root link base_link has an inertia specified in the URDF, but KDL does not support a root link with an inertia. As a workaround, you can add an extra dummy link to your URDF. [ INFO] [1474451978.824362297, 0.105000000]: Started bellows_controller [ INFO] [1474451978.847899271, 0.105000000]: Finished initializing FetchGazeboPlugin [ INFO] [1474451978.900933599, 0.126000000]: waitForService: Service [/head_camera/head_camera_nodelet_manager/load_nodelet] is now available. [ INFO] [1474451978.901428909, 0.126000000]: waitForService: Service [/head_camera/head_camera_nodelet_manager/load_nodelet] is now available. [ INFO] [1474451979.182359958, 0.187000000]: Started gripper_controller/gripper_action [ INFO] [1474451979.185061525, 0.187000000]: Started arm_controller/follow_joint_trajectory [ INFO] [1474451979.185298191, 0.187000000]: Started head_controller/follow_joint_trajectory [prepare_robot-6] process has finished cleanly log file: /home/osboxes/.ros/log/15935e86-7fe2-11e6-a92e-000c29a1f7dd/prepare_robot-6*.log Background: I use VMware , Ubuntu 14.04, Indigo, gazebo 2. Apparently it's segmentation fault, but idk why cause i can run gazebo simulation, with other robots e.g.: robonaut2, turtlebot. They work fine. -------. I tried to launch other demo, but it also failed with different reasons e.g. Error [Visual.cc:418] -------. Yes, I already tried to reinstall the package Any help will be appreciated

PR2 stuck picking object

$
0
0
Hey everybody. I'm working on a grasping node, using a PR2 robot simulated in Gazebo (Ubuntu 12.04 + Hydro). So far I have been able to generate a pickup goal and a grasp message that allows me to "attempt" to grasp an object (I have tested the approach directions, grasping pose, retreat pose, etc), but every time I try to pick a simulated object the robot gets stuck closing the gripper when trying to grasp the object. I've tried to grasp the object using MoveIt and the MoveGroup interface and also using an ActionClient, but in both cases the result is the same. After some debug I noticed that the problem is that the gripper is closing but the object is blocking it (of course), so it never reaches the closing goal and that makes the grasping attempt to timeout. Despite a lot of reading and experimentation I haven't been able to the generate a grasp that doesn't ask the gripper to be fully closed. The grasp message specifies a grasping posture where the joints positions can be given, but despite any value I'm only able to generate postures indicating the gripper fully opened or fully close. The current message I'm sending is something like the following: moveit_msgs::Grasp grasp; grasp.id = "TARGET_GRASP"; grasp.grasp_pose = graspPose; grasp.pre_grasp_approach.direction.header.frame_id = "r_wrist_roll_link"; grasp.pre_grasp_approach.direction.vector.x = 1; grasp.pre_grasp_approach.direction.vector.y = 0; grasp.pre_grasp_approach.direction.vector.z = 0; grasp.pre_grasp_approach.min_distance = 0.05; grasp.pre_grasp_approach.desired_distance = 0.18; grasp.pre_grasp_posture.joint_names.resize(1, "r_gripper_motor_screw_joint"); grasp.pre_grasp_posture.points.resize(1); grasp.pre_grasp_posture.points[0].positions.resize(1); grasp.pre_grasp_posture.points[0].positions[0] = 0.8; grasp.pre_grasp_posture.points[0].time_from_start = ros::Duration(45.0); grasp.grasp_posture.joint_names.resize(1, "r_gripper_motor_screw_joint"); grasp.grasp_posture.points.resize(1); grasp.grasp_posture.points[0].positions.resize(1); grasp.grasp_posture.points[0].positions[0] = 0.01; grasp.grasp_posture.points[0].time_from_start = ros::Duration(45.0); grasp.post_grasp_retreat.direction.header.frame_id = "base_footprint"; grasp.post_grasp_retreat.direction.vector.x = 0; grasp.post_grasp_retreat.direction.vector.y = 0; grasp.post_grasp_retreat.direction.vector.z = 1; grasp.post_grasp_retreat.min_distance = 0.08; grasp.post_grasp_retreat.desired_distance = 0.3; grasp.allowed_touch_objects.clear(); grasp.allowed_touch_objects.push_back(TARGET_ID); grasp.allowed_touch_objects.push_back(SUPPORT_ID); So, do anybody have an idea whats the problem here?? In my launch file I have given the following parameters: I understand that those are used for the gripper stall detection. I changed them because the default values (stall_velocity_threshold = 0.2) were causing the gripper client to detect a false stall, aborting the grasp action prematurely and messing with the grasping attempt. Any help is greatly appreciated!!

Ackermann Gazebo Plugin

$
0
0
Hi, Currently I am working in ackermann steering. I have created one urdf model. I need ackeman gazebo plugin to make it work in gazebo. I saw some "libackermann_plugin.so" in urdf but it is not available for installing. Can anybody provide the link or location to get it? Thanks, Shyam

How to get robot position in gazebo?

$
0
0
I want get the robot position(something like the coordinate x,y,z) , I know that hector_gazebo_plugins can do this,but I don't know how to use the API,did something more simple to get the robot position in gazebo?

set gravity on each object Gazebo7

$
0
0
I am tryng to set the gravity on each individual objects in gazebo. I am spawning a robot model that needs to have 0 gravity. But The objects it needs to interact with need to have gravity,so they don't float away. I am not sure how to accomplish this I can turn on/off gravity for the entire world, but not individual models. Here is my world file, model://sunmodel://ground_plane0 10 0 0 0 00 0 -9.81model://button_panel0 0 0 I would greatly appreciate any guidance.

Reading bump sensors on simulated turtlebot

$
0
0
This must have been dealt with many times before, but as beginner with ROS I can't find an answer I understand. Here's my code adapted from Mark Silliman import rospy from kobuki_msgs.msg import BumperEvent from geometry_msgs.msg import Twist def processBump(data): print ("Bump") global bump if (data.state == BumperEvent.PRESSED): bump = True else: bump = False rospy.loginfo("Bumper Event") rospy.loginfo(data.bumper) def GoForward(): print("Starting..") # initiliaze rospy.init_node('GoForward', anonymous=False) # tell user how to stop TurtleBot rospy.loginfo("To stop TurtleBot CTRL + C") # What function to call when you ctrl + c rospy.on_shutdown(shutdown) # Create a publisher which can "talk" to TurtleBot and tell it to move # Tip: You may need to change cmd_vel_mux/input/navi to /cmd_vel if you're not using TurtleBot2 cmd_vel = rospy.Publisher('cmd_vel_mux/input/navi', Twist, queue_size=10) sub = rospy.Subscriber('mobile_base/events/bumper', BumperEvent, processBump) #TurtleBot will stop if we don't keep telling it to move. How often should we tell it to move? 10 HZ r = rospy.Rate(10); # Twist is a datatype for velocity move_cmd = Twist() # let's go forward at 0.2 m/s move_cmd.linear.x = 0.2 # let's turn at 0 radians/s move_cmd.angular.z = 0.0 # as long as you haven't ctrl + c keeping doing... while not rospy.is_shutdown(): # publish the velocity cmd_vel.publish(move_cmd) # wait for 0.1 seconds (10 HZ) and publish again r.sleep() def shutdown(self): # stop turtlebot rospy.loginfo("Stop TurtleBot") # a default Twist has linear.x of 0 and angular.z of 0. So it'll stop TurtleBot cmd_vel.publish(Twist()) # sleep just makes sure TurtleBot receives the stop command prior to shutting down the script rospy.sleep(1) if __name__ == '__main__': try: GoForward() except rospy.ServiceException as exc: rospy.loginfo("GoForward node terminated.") print("Service did not process request: " + str(exc)) The issue is that processBump() never gets called, even though the turtlebot is moving and then clearly runs into to something. I guess I'm not understanding the Subscriber functionality, but isn't like a listener i.e in this case, when a BumperEvent occurs the specified function, processBump() is called? Excuse my newbieness and any clues greatly appreciated. Cheers, Rob Similar to this topic: Help on my basic turtlbot node http://answers.ros.org/question/240925/help-on-my-basic-turtlbot-node/

I am using robot_pose_ekf, but I am getting incorrect output, and I'm not sure why.

$
0
0
Hello, I'm trying to get robot_pose_ekf working in ROS Indigo with a model I have in Gazebo, but I can't seem to get it to output the correct values. I have searched through documentation and various help threads for a while, and I can't seem to narrow down my problem. I have a model in gazebo that has an differential drive controller using the plugin “libgazebo_ros_diff_drive.so”, a GPS sensor using “libhector_gazebo_ros_gps.so”, and an IMU sensor using “libgazebo_ros_imu.so”. As far as I can tell, all of these sensors are producing correct values on their topics, so this led me to believe that my problem lies somewhere in my ROS code rather than anything with Gazebo. Per this thread (http://answers.ros.org/question/229722/how-to-stop-gazebo-publishing-tf/), I have set the output of robot_pose_ekf to the head of my tf tree and remapped the gazebo transform output to a different topic. Here is my current frame tree with the base_link, IMU, GPS, and my two laser sensors. The odom at the head is the odometry output from robot_pose_ekf: ![image description](http://i.imgur.com/eBfNg3U.png) For my GPS sensor, per this page (http://wiki.ros.org/robot_pose_ekf/Tutorials/AddingGpsSensor) I remapped the input to the robot_pose_ekf vo topic. I have also written a node that converts the GPS coordinates to the Gazebo simulator coordinates in the local area of the Gazebo world I am using. So, if my robot model state is at (x=0,y=0), then the GPS coordinates are transformed and sent as (x=0,y=0). I plan to add some noise to that, but currently, it is very small in order to test. Here is my launch file section that launches robot_pose_ekf: I have tested several scenarios described below where I switch vo_used, imu_used, and odom_used to true/false to hopefully give a better indication of the problem. After I had odometry(with robot_pose_ekf subscribed to the odometry topic from the differential controller), IMU, and GPS setup, I performed several test. For the first test, I ran robot_pose_ekf with only odometry and IMU. As the robot moved, I got good output until the robot hits an obstacle and stops. At that point, the robot_ekf output shows the robot still moving forward. I also get the message “Robot pose ekf diagnostics discovered a potential problem”. I have looked into that per the description on the ROS robot_pose_ekf page, but I don't see a problem. The two sensors have nearly identical timestamps, and I assume this falls under the category of “very different information about robot pose” since the wheels seem to still be moving which causes the odometry to show the robot moving, yet the IMU shows no motion or acceleration. The following are the (x,y) plots of the robot position according to the differential drive odometry (red), the odometry combined of robot_pose_ekf (green), the GPS coordinates translated to (x,y) position from the node I wrote (blue), and the actual model position in Gazebo using get_model_state (pink). Due to currently having little noise, the model state and GPS are overlapped on all the graphs. ![image description](http://i.imgur.com/cQ3lyvh.png) As can be seen in the graph, the green line (robot_pose_ekf) continues after the model stops in the simulator (purple,blue lines). While the odometry line (red) also continues due to the wheels spinning against the obstacle. The next test I performed was with odometry, and GPS. IMU was deactivated. I set the GPS covariance to have a higher confidence than the odometry. This caused a new problem. Now the output for robot_pose_ekf shows a fairly straight line with minimal changes when the robot turns. However, if it encounters an obstacle and stops, the robot_pose_ekf registers this and the output stops at that point. ![image description](http://i.imgur.com/JHTMXJw.png) As can be seen in the graph, the robot_pose_ekf (green) is giving the wrong robot location, but when it hits the obstacle, the green like stops like it should as can be seen by how the red odometry line continues moving. Next I tried equal confidence in the sensors, and this produced a result somewhat halfway between the previous two. The robot_pose_ekf output doesn't stop when it hits an obstacle, but it only slightly registers the positon changes when the robot turns so the robot drift is extremely large too. ![image description](http://i.imgur.com/EOa041X.png) In this graph we see that the robot_ekf_output (green) follows slightly better on the turns, however, it continues plotting once the robot hits an obstacle as can be seen by where the purple line stops plotting. I hope I have provided all of the relevant information. I'm not sure where I am going wrong with this, can anyone offer any suggestions? Thank you.

The real turtlebo pose in gmapping

$
0
0
Hi, I'm a beginner in ROS and learn the gmapping package now. I would like to visualize the real robot pose and the estimated robot pose in RVIZ. Now when I run gmapping and teleop to move the robot to explore the world, the robot jumps from one position to another, which, I guess, comes from the update of the robot pose in SLAM. But can I also have the real robot pose from gazebo? Thank you guys, Yue

Use Geomagic touch for controlling 7 dof robot in rvizz or gazebo

$
0
0
Hi, I am new in ros and trying to implement a simulation framework to control a 7dof robot using geomagic touch device. I have studied basics of ros and simulation in gazebo and rviz. Can anyone provide me with guidelines that how should I proceed ?

Multi robot position_controller problem

$
0
0
Hello everybody, I am trying to spawn several robot which use ros_control. I have a problem with my position controllers : > [INFO] [WallTime: 1454516624.223580] [1.800000] Loading controller: left_arm_position_controller [ERROR] [1454516624.266122670, 1.839000000]: Could not find parameter robot_description on parameter server [ERROR] [1454516624.266369289, 1.839000000]: Failed to parse urdf file [ERROR] [1454516624.266397313, 1.839000000]: Failed to initialize the controller [ERROR] [1454516624.266420609, 1.839000000]: Initializing controller 'left_arm_position_controller' failed [ERROR] [WallTime: 1454516625.272021] [2.753000] Failed to load left_arm_position_controller But I have two velocity controllers (defined in the same files) which are working fine. I have a launch file that include my robot launch file : main.launch The gazebo_env.launch is in charge of the gazebo environment. In the robot launch, I don't use any namespace in the node (they are already launch in a group). There is the spawn node and controllers node in the robot launch file : Is there a bug with the position controllers ? Thanks in advance

I want to run PR2 simulation on my laptop. On what ROS version would it be easy? Indigo? Hydro? groovy? and which Ubuntu version should i go for? 12.04? or 14.04? 16.04?

$
0
0
1. I want to run PR2 simulation; 2. on Gazebo or Rviz either is good; i dont know on which ROS version are these PR2 packages released.

i tried to run gazebo husky simulation but everytime i get a black screen on the gazebo!

$
0
0
my real time factor is zero also the screen is completely black! cant run the simulation

no name spaces found while running gazebo what to do?

$
0
0
output [ INFO] [1475697876.777354049]: [twist_marker_server] Initialized. Msg Waiting for master Msg Connected to gazebo master @ http://127.0.0.1:11345 Msg Publicized address: 192.168.100.3 [ INFO] [1475697876.864233669]: Finished loading Gazebo ROS API Plugin. Msg Waiting for master Msg Connected to gazebo master @ http://127.0.0.1:11345 Msg Publicized address: 192.168.100.3 [ INFO] [1475697876.867930339]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... Warning [ModelDatabase.cc:334] Getting models from[http://gazebosim.org/models/]. This may take a few seconds. Warning [gazebo.cc:215] Waited 1seconds for namespaces. Warning [gazebo.cc:215] Waited 1seconds for namespaces. Warning [gazebo.cc:215] Waited 1seconds for namespaces. Warning [gazebo.cc:215] Waited 1seconds for namespaces. Warning [gazebo.cc:215] Waited 1seconds for namespaces. Warning [gazebo.cc:215] Waited 1seconds for namespaces. Warning [gazebo.cc:215] Waited 1seconds for namespaces. Warning [gazebo.cc:215] Waited 1seconds for namespaces. Warning [gazebo.cc:215] Waited 1seconds for namespaces. Warning [gazebo.cc:215] Waited 1seconds for namespaces. Error [gazebo.cc:220] Waited 11 seconds for namespaces. Giving up. Error [Node.cc:90] No namespace found Error [Node.cc:90] No namespace found Error [Node.cc:90] No namespace found Error [Node.cc:90] No namespace found Error [Node.cc:90] No namespace found Error [Node.cc:90] No namespace found Error [Node.cc:90] No namespace found Error [Node.cc:90] No namespace found Error [Node.cc:90] No namespace found Error [Node.cc:90] No namespace found Error [Node.cc:90] No namespace found Error [Visual.cc:2133] No mesh specified Error [Visual.cc:2133] No mesh specified Error [Visual.cc:2133] No mesh specified Error [Visual.cc:2133] No mesh specified Error [Visual.cc:2133] No mesh specified Error [Visual.cc:2133] No mesh specified [WARN] [WallTime: 1475697907.379394] [0.000000] Controller Spawner couldn't find the expected controller_manager ROS interface. [base_controller_spawner-5] process has finished cleanly log file: /home/abhinav/.ros/log/f04c0b4a-8b36-11e6-804a-ec8eb5421ac3/base_controller_spawner-5*.log Error [Visual.cc:2133] No mesh specified Error [Visual.cc:2133] No mesh specified Error [Visual.cc:2133] No mesh specified Error [Visual.cc:2133] No mesh specified Error [Visual.cc:2133] No mesh specified

Gazebo Crashing Immediately

$
0
0
Hello, I used this to launch: roslaunch turtlebot_gazebo turtlebot_world.launch And I ended up with the below in red: [gazebo-2] process has died [pid 27527, exit code 134, cmd /opt/ros/indigo/lib/gazebo_ros/gzserver -e ode /opt/ros/indigo/share/turtlebot_gazebo/worlds/playground.world __name:=gazebo __log:=/home/logan/.ros/log/7a97476a-8c4f-11e6-ac72-4c8093b62d1c/gazebo-2.log]. log file: /home/logan/.ros/log/7a97476a-8c4f-11e6-ac72-4c8093b62d1c/gazebo-2*.log I have no clue what to do, any help is appreciated.

How do I control lwa arm using geomagic touch ?

$
0
0
Hi, I have already made URDF model of the lwa arm and its working in gazebo using ros_control. Now I need to control it using geomagic touch haptic device. How should I proceed now ? I know I have to make some sort of ros controller for mapping haptic device joint position to lwa's but how should I go about it. Any hints would be appreciated. Thanks
Viewing all 1516 articles
Browse latest View live


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