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

PointCloud from velodyne in rviz

$
0
0
Hello all! I am trying to add a velodyne sensor (VLP-16) to an UAV (the iris model in px4). I know that there are more questions on it but as far as I understood them, I don't have their issues. I can see the sensor in Gazebo, it's frame is connected to the fixed frame (see tf tree image below), it is receiving messages, the status is ok in Rviz but I cannot see anything. I already made the [question to the px4](https://github.com/PX4/sitl_gazebo/issues/159) people but thought someone here might know what am I missing. So in my urdf I have Here is the tf tree (the parent is base_link and unicorn is on the bottom left): ![image description](/upfiles/1515524709743413.png) And here is Rviz ![image description](/upfiles/15155246657682871.png) The launch is their posix_sitl.launch plus robot and joint publisher: Here is what the gazebo looks like ![image description](/upfiles/15155246278304813.png)

controling right and left wheels using ROS

$
0
0
Dear guys, Can anyone help me, i just follow a tutorial to make "Differential Drive Robot" from this link: "https://www.generationrobots.com/blog/en/2015/02/robotic-simulation-scenarios-with-gazebo-and-ros/" in the tutorial, Mobile robot models can be moved using cmd_vel (by controlling linear,x and angular.z). How can i control right and left wheels based on the trajectory? Im newbie :( Thank you in advance

Taking Gazebo screenshots using a ROS node

$
0
0
I'm using Gazebo to make some experiments. I want to take photos of Gazebo simulation in certain moments (decided by my ROS node). Gazebo has a screen capture utility by itself, it can be activated using a GUI button. However, there doesn't seem to be a ROS message or service to trigger it from a ROS node. Am I missing something? Otherwise, can you suggest me the most modular way to take screenshots of whole screen? Can I create a shell script and rosrun it like a node when necessary? Or should I call screenshot application directly from my ROS node using C++?

roslaunch error

$
0
0
I tried to run **roslaunch excavator_gazebo gazebo.launch** (using kinetic) ============================================================================== But I got this error : 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 XML parsing error: unbound prefix: line 5, column 2 when processing file: /home/kmj/catkin_ws/src/excavator_description/urdf/excavator.xacro Check that: - Your XML is well-formed - You have the xacro xmlns declaration: xmlns:xacro="http://www.ros.org/wiki/xacro" Invalid tag: Cannot load command parameter [description]: command [/opt/ros/kinetic/share/xacro/xacro.py '/home/kmj/catkin_ws/src/excavator_description/urdf/excavator.xacro'] returned with code [2]. Param xml is The traceback for the exception was written to the log file ============================================================================== I have no idea to solve this problem. Do you know how to fix this?

Move left and right wheel on turtlebot gazebo

$
0
0
Hi guys, Lately i learnt how to make a turtlebot in gazebo simulator, and moved it by using cmd_vel command. the question is: 1. how can i move each wheels because i should move it by using trajectory planning? 2. can we move the turtle bot to a specific point does cmd_vel only move the robot "straight" and "circle"? 3. if i should make a "sinusoidal" path using the trajectory planning, can i use cmd_vel topic? Thank you in advance :)

Publishing problem with gazebo using trajectory_msgs

$
0
0
Hi everyone, I'm working on arm robotic, first, i wrote a physical model of the arm with a URDF files. This model work with Rviz and Gazebo. Moreover, i created a controllers.yaml file (for controls all robot's joints) and when I use the command : `rostopic pub /arm_controller/command trajectory_msgs/JointTrajectory '{joint_names: ["hip","shoulder","elbow","wrist"], points: [{positions:[0.1,-0.5,0.5,0.75], time_from_start: [1.0,0.0]}]}' -1` both models (on rivz and gazebo) move simultaneously. But now, I want to create a .cpp file for the arm to move independently by using trajectory_msgs::JointTrajectory. Here's my cpp file : #include #include ros::Publisher arm_pub; int main(int argc, char** argv) { ros::init(argc, argv, "state_publisher"); ros::NodeHandle n; arm_pub = n.advertise("/arm_controller/command",1); trajectory_msgs::JointTrajectory traj; traj.header.stamp = ros::Time::now(); traj.header.frame_id = "base_link"; traj.joint_names.resize(4); traj.points.resize(4); traj.joint_names[0] ="hip"; traj.joint_names[1] ="shoulder"; traj.joint_names[2] ="elbow"; traj.joint_names[3] ="wrist"; while(ros::ok()){ for(int i=0;i<4;i++) { int j = i%3; trajectory_msgs::JointTrajectoryPoint points_n; points_n.positions.push_back(j+0.1); points_n.positions.push_back(j+0.3); points_n.positions.push_back(j+0.3); points_n.positions.push_back(j); traj.points.push_back(points_n); traj.points[i].time_from_start = ros::Duration(1.0,0.0); } arm_pub.publish(traj); ros::spinOnce(); } return 0; } When i launch my file.launch and I rosrun my cpp file, both are connected on rqt_graph. But immediately, i have an error (on launch terminal) : > [ERROR] [1497596211.214814221, 9.889000000]: Trajectory message contains waypoints that are not strictly increasing in time. Effectively, when i use the command `rostopic echo /arm_controller/command`, i have : `positions: [0.0, 1.0, 0.0, 2.0] velocities: [] accelerations: [] effort: [] time_from_start: secs: 0 nsecs: 0` The time_from_start is always 0. So, I think i've a problem in my code but i don't know where. Does anyone have an idea what is wrong? Thank you.

4 wheel robot differential controller

$
0
0
I have designed simple a 4-wheel robot and I want to make it move. The controller below is located in "myrobot.gazebo" file and it works with 2 wheels and a caster. Is it possible to modify the controller so it can control 2 wheels on each side?falsetrue20left_wheel_hingeright_wheel_hinge0.40.120cmd_velodomodomchassis

Disabling line display for .dae models in Gazebo 7

$
0
0
Hi all! I am trying to carry out a simulated experiment using ROS Kinetic and Gazebo 7. I have imported some COLLADA models with .dae format into Gazebo. One thing that bothers me is that the white triangular contour are also shown by default (see pic below) . I've searched within Gazebo and read some online posts but couldn't find a way to turn it off. Any help on the issue will be much appreciated, thanks! ![image description](/upfiles/15166076677988577.png)

how to publish a gazebo topic to a ros topic

$
0
0
Hi, I'm currently working on trying to get a gazebo topic into the ROS topic list so I can access it through the matlab interface with ROS. Right now I managed to create a subscriber to the gazebo topic in question (gazebo/default/physics/contacts) but I can't figure out exactly what type of ROS message it is to allow me to publish it again in ROS. Here is the python code: import trollius from trollius import From import pygazebo import pygazebo.msg.contacts_pb2 @trollius.coroutine def publish_loop(): manager = yield From(pygazebo.connect()) def callback(data): message = pygazebo.msg.contacts_pb2.Contacts.FromString(data) print(message) subscriber = manager.subscribe('/gazebo/default/physics/contacts', 'gazebo.msgs.Contacts', callback) yield From(subscriber.wait_for_connection()) while(True): yield From(trollius.sleep(1.00)) print('wait...') print(dir(manager)) import logging logging.basicConfig() loop = trollius.get_event_loop() loop.run_until_complete(publish_loop()) So, my problem could be solved in two ways: 1. Figuring out a way to find the corresponding essage type in ROS to publish it. 2. Figuring out a simpler way to do what i want to do. Currently I'm working on both possibilities but I'm having a hard time... Thank you for your help!

ROS kinetic gazebo turtlebot - explanation of otpic

$
0
0
Hello, Is there any article that explains what each topic from turtlebot simulated in gazebo does?

Optimize Navigation Stack / Turtlebot drives circles

$
0
0
Hello Guys, i am using Ros Kinetic on a Ubuntu 16.04 PC. I using Turtlebot package for simulation in Gazebo. A few weeks a go a posted a similar question with rtab map without an answer so i am back on the default navigation paket. I created a map with gmapping and now i can start the map with : roslaunch turtlebot_gazebo amcl_demo.launch map_file:=/home/user/turtlebot_custom_maps/tutorial.yaml This works fine i see my robot in rviz and i could drive to specific point. My problem now is that the robot drives in circles to reach a specific point. Even is there is no obstacle near him. So i am new in the planner configuration could u give me a tip which parameter i need to change that the robot don´t drive in circles to a point? Here is my code for reaching a point: class GoToPose(): def __init__(self): self.goal_sent = False # What to do if shut down (e.g. Ctrl-C or failure) rospy.on_shutdown(self.shutdown) # Tell the action client that we want to spin a thread by default self.move_base = actionlib.SimpleActionClient("move_base", MoveBaseAction) rospy.loginfo("Wait for the action server to come up") # Allow up to 5 seconds for the action server to come up self.move_base.wait_for_server(rospy.Duration(5)) def goto(self, pos, quat): # Send a goal self.goal_sent = True goal = MoveBaseGoal() goal.target_pose.header.frame_id = 'map' goal.target_pose.header.stamp = rospy.Time.now() goal.target_pose.pose = Pose(Point(pos['x'], pos['y'], 0.000), Quaternion(quat['r1'], quat['r2'], quat['r3'], quat['r4'])) # Start moving self.move_base.send_goal(goal) # Allow TurtleBot up to 60 seconds to complete task success = self.move_base.wait_for_result(rospy.Duration(80)) state = self.move_base.get_state() result = False if success and state == GoalStatus.SUCCEEDED: # We made it! result = True else: self.move_base.cancel_goal() self.goal_sent = False return result def shutdown(self): if self.goal_sent: self.move_base.cancel_goal() rospy.loginfo("Stop") rospy.sleep(1) if __name__ == '__main__': try: rospy.init_node('nav_test', anonymous=False) navigator = GoToPose() # Customize the following values so they are appropriate for your location position = {'x': 1.89, 'y' : 1.21} quaternion = {'r1' : 0.000, 'r2' : 0.000, 'r3' : 0.000, 'r4' : 1.000} rospy.loginfo("Go to (%s, %s) pose", position['x'], position['y']) success = navigator.goto(position, quaternion) if success: rospy.loginfo("Hooray, reached the desired pose") position = {'x': -2.76, 'y' : 2.68} quaternion = {'r1' : 0.000, 'r2' : 0.000, 'r3' : 0.000, 'r4' : 1.000} rospy.loginfo("Go to (%s, %s) pose", position['x'], position['y']) success2 = navigator.goto(position, quaternion) else: rospy.loginfo("The base failed to reach the desired pose") # Sleep to give the last log messages time to be sent rospy.sleep(1) except rospy.ROSInterruptException: rospy.loginfo("Ctrl-C caught. Quitting") In the code i let him drive to 2 points this works after some time he reaches the points but like i described the way to the point is not very straight it more like the robot rotates a bit drives forward rotates a bit and so on...

Nodelet error while running turtlebot gazebo on kinetic

$
0
0
i am not able to figure out how install nodelet separately, i tried to look in cmake file as well but got confused. PS i am new to ros. Is there any one who can help? with some defined steps? Please

rqt-image-view datatype mismatch

$
0
0
When I run the rqt_image_view via command below: rosrun rqt_image_view rqt_image_view I have received an error: [ERROR] [1517309067.634525993, 814.130000000]: Client [/gazebo] wants topic /ardrone/bottom/image_raw to have datatype/md5sum [sensor_msgs/Image/060021388200f6f0f447d0fcd9c64743], but our version has [geometry_msgs/Point/4a842b65f413084dc2b10fb484ea7f17]. Dropping connection. I has something to do with data type mismatch but I am not sure how I should resolve it. Any workaround?

Controll robot in gazebo with ROS

$
0
0
Hi, I'm trying to integrate the Leap Motion with ROS and controlling a 3-finger gripper in gazebo with variables given by the Leap Motion. These variable, in this case, I'm using the grabStrength is published in a topic subscribed by gazebo and the gripper moves (open/close). However I notice that when I try to stabilize my hand, the values of grabStrength given are similar, the variation is in the magnitude of 0.1 (in a scale of 0 to 1) and the model in gazebo is not fixed in the position, the joints kind of shake. Anyone has a suggestion on how I could tackle this problem? I'd prefer it wouldn't move at all when the variation is so low

GPS doesn't show true data when moving in Gazebo

$
0
0
Hello everyone! I have installed Gazebo 8 with ROS Kinetic on Ubuntu 16.04 LTS. I have built a custom robot model in Gazebo and added a libhector_gazebo_ros_gps plugin. Also attached a base_footprint on the robot. But when i run `rostopic echo /fix` and `rostopic echo /fix_velocity`, none of them shows true data. Do i need to build a map first? I tried to build a map through turtlebot tutorials, but i see no map on Rviz either. I have been searching for a long time, but i can't find a solution to the problem. Any suggestions will be helpful! Thank you, moshimojo

merger map position

$
0
0
Hi there, I tried to run 5 robots in a map to explore the map. In rviz the positon of the merger_map is different from the others. Here is the map_merge launch file. Could you help me please?

gazebo is crashing:Segmentation fault

$
0
0
Hi, i have been trying to run gazebo7.0.0. with turtlebot3 burger simulation using ubuntu 16.04 and ros kinetic.When i do roslaunch it is throwing this error: ROS_MASTER_URI=http://localhost:11311 process[gazebo-1]: started with pid [9109] process[gazebo_gui-2]: started with pid [9114] process[spawn_urdf-3]: started with pid [9119] [ INFO] [1517391849.942038025]: Finished loading Gazebo ROS API Plugin. [ INFO] [1517391849.944605688]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... Segmentation fault (core dumped) [gazebo-1] process has died [pid 9109, exit code 139, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /home/az/catkin_ws/src/turtlebot3_simulations/turtlebot3_gazebo/models/empty.world __name:=gazebo __log:=/home/az/.ros/log/b5f081e4-05e5-11e8-b31b-001aa0c71fa4/gazebo-1.log]. log file: /home/az/.ros/log/b5f081e4-05e5-11e8-b31b-001aa0c71fa4/gazebo-1*.log I have read on few locations that it can be due to poor graphics card.Is there any way to confirm it or any other thing i should check? Also when i just write gazebo in terminal it doesnt throw any error but GUI doesnt come up either.i tried gazebo --verbose which looks fine with following output: Gazebo multi-robot simulator, version 7.0.0 Copyright (C) 2012-2016 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org [Msg] Waiting for master. Gazebo multi-robot simulator, version 7.0.0 Copyright (C) 2012-2016 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org [Msg] Waiting for master. [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 192.168.11.4 Thanks

IOError: [Errno 13] Permission denied

$
0
0
makerhan@makerhan-Inspiron-15-3567:~$ roslaunch turtlebot_gazebo turtlebot_world.launch ... logging to /home/makerhan/.ros/log/d3447fd4-0716-11e8-8422-44032cf50938/roslaunch-makerhan-Inspiron-15-3567-13942.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. 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 xacro.py is deprecated; please use xacro instead started roslaunch server http://localhost:46237/ SUMMARY ======== PARAMETERS * /bumper2pointcloud/pointcloud_radius: 0.24 * /cmd_vel_mux/yaml_cfg_file: /opt/ros/kinetic/... * /depthimage_to_laserscan/output_frame_id: /camera_depth_frame * /depthimage_to_laserscan/range_min: 0.45 * /depthimage_to_laserscan/scan_height: 10 * /robot_description: import tf.transformations as tft File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf/__init__.py", line 28, in from tf2_ros import TransformException as Exception, ConnectivityException, LookupException, ExtrapolationException File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_ros/__init__.py", line 39, in from .buffer_interface import * File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_ros/buffer_interface.py", line 32, in import roslib; roslib.load_manifest('tf2_ros') File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslib/launcher.py", line 62, in load_manifest sys.path = _generate_python_path(package_name, _rospack) + sys.path File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslib/launcher.py", line 93, in _generate_python_path m = rospack.get_manifest(pkg) File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 167, in get_manifest return self._load_manifest(name) File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 211, in _load_manifest retval = self._manifests[name] = parse_manifest_file(self.get_path(name), self._manifest_name, rospack=self) File "/usr/lib/python2.7/dist-packages/rospkg/manifest.py", line 412, in parse_manifest_file _static_rosdep_view = init_rospack_interface() File "/usr/lib/python2.7/dist-packages/rosdep2/rospack.py", line 58, in init_rospack_interface lookup = _get_default_RosdepLookup(Options()) File "/usr/lib/python2.7/dist-packages/rosdep2/main.py", line 128, in _get_default_RosdepLookup verbose=options.verbose) File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 613, in create_default sources = load_cached_sources_list(sources_cache_dir=sources_cache_dir, verbose=verbose) File "/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py", line 510, in load_cached_sources_list with open(cache_index, 'r') as f: **IOError: [Errno 13] Permission denied: '/home/makerhan/.ros/rosdep/sources.cache/index' [spawn_turtlebot_model-3] process has died [pid 13972, exit code 1, cmd /opt/ros/kinetic/lib/gazebo_ros/spawn_model -unpause -urdf -param robot_description -model mobile_base __name:=spawn_turtlebot_model __log:=/home/makerhan/.ros/log/d3447fd4-0716-11e8-8422-44032cf50938/spawn_turtlebot_model-3.log]. log file: /home/makerhan/.ros/log/d3447fd4-0716-11e8-8422-44032cf50938/spawn_turtlebot_model-3*.log** Why error???

Use of diff_drive_controller to simulate a differential drive in Gazebo

$
0
0
Did anybody manage to use **diff_drive_controller** in to simulate a **differential drive** in Gazebo**? Theoretically should work if the gazebo_ros_control (libgazebo_ros_control.so) plug in is used in Gazebo but there is a note that the hardware_interface::VelocityJointInterface is not fully implemented.

SystemC processor in Gazebo/ROS?

$
0
0
I have to work on a drone which will be controlled by a given processor. I have a SystemC version of the processor, and I'd like to use it to simulate the control of the drone. I was wondering if this could be done in Gazebo. I am familiar with ROS, but I only used it with a raspberry PI in a robot, so I had no custom hardware in the loop. At the same time, I don't have (yet) any experience in SystemC. According to the person who will provide me with the processor, it is a precise model, to which I provide the SW in binary, and then simulate it for how many ns I want. So I was wondering, since after all SystemC is a set of C++ classes, would it be possible to integrate this model directly into ROS/Gazebo? So a Gazebo world with a drone in it would take as inputs the commands to the motors (or something like that) from the processor's model, and send back to the model the sensor's readings. If any of you guys have ever done something like that, I'd be very interested to hear about it! And if not, do you think it is feasible ? *Edit: since this might require some very specific knowledge, I've asked the same question of stackoverflow (robotics) and on the gazebo forum.*
Viewing all 1516 articles
Browse latest View live


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