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

Multiple launchs in terminal

$
0
0
Hi! I'm running experiments in my project using turtlebot and kinect but i'd like to improve the speed of that by launching all the .launch files once for each experiment. Is that possible? For example, i need to run `roslaunch openni_launch openni.launch, roslaunch turtlebot_bringup minimal.launch, roslaunch turtlebot_teleop keyboard_teleop.launch,` etc... I know that for each terminal the bashrc is initialized, so running this in multiple terminals could be a problem (i guess). Any thoughts? Thanks in advance!!

NameError: global name 'ms' is not defined after running learning_tf start_demo.launch

$
0
0
Hi. Running through the tf tutorials in sequence and currently at [tfTutorialsWriting a tf listener (Python)](http://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20broadcaster%20%28Python%29). Run roslaunch learning_tf start_demo.launch and get following errors: [ERROR] [WallTime: 1432379077.642128] bad callback: Traceback (most recent call last): File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/topics.py", line 709, in _invoke_callback cb(msg, cb_args) File "/home/andrew/catkin_ws/src/learning_tf/nodes/turtle_tf_broadcaster.py", line 12, in handle_turtle_pose tf.transformations.quaternion_from_euler(0, 0, ms.theta), NameError: global name 'ms' is not defined Can see the 2 turtles appearing in the window. Can move 1 turtle via arrow keys but 2nd turtle does not follow turtle 1 Note: have run apt-get update and lots of ROS packages updated.

Unable to change background colour using .launch file

$
0
0
Hello, I am trying to use .launch file to change the backgroud colour of the turtlesim node. Here are my Codes: First one: background_b: 10 and the second one: the output for rosparam_get / nac@nac-Lenovo-G560:~/nachiket_ws/src/handouts/launch$ rosparam get / background_b: 255 background_g: 86 background_r: 69 rosdistro: 'indigo ' roslaunch: uris: {host_nac_lenovo_g560__40475: 'http://nac-Lenovo-G560:40475/'} rosversion: '1.11.10 ' run_id: e57a1672-0332-11e5-87f2-ec55f98a32e6 turtlelaunch: {background_b: 100} and the rosparam list nac@nac-Lenovo-G560:~/nachiket_ws/src/handouts/launch$ rosparam list /background_b /background_g /background_r /rosdistro /roslaunch/uris/host_nac_lenovo_g560__40475 /rosversion /run_id /turtlelaunch/background_b I am still unable to change the background colour. Even if the global namespace is specified, a new namespace is being create and the turtlesim background paramter that is to be set is getting sent under that namespace. What am I missing ?

roslaunch XML "if" comparison

$
0
0
In [the page on roslaunch XML](http://wiki.ros.org/roslaunch/XML#if_and_unless_attributes), it discusses the use of "if" and "unless" attributes for tags. In the examples, however, it only shows how to do it if the argument you are checking is a boolean. I need to do something like this: where the "if" attribute is doing a comparison instead of checking a boolean. This syntax throws an error though. Is there an alternative way to do this?

How to write to a file using roslaunch (Python)

$
0
0
Hi, I am trying to write to file with a python script using pickle. I am able to do this if I run the script directly using python (file name) but when I run the script using roslaunch it does not write to the file. How can I make it write to the file while using roslaunch to launch the script? Thanks!

Roslaunch not working

$
0
0
I have two nodes - Mission Control and Simulator. Mission control publishes to command topic and subscribes to telemetry topic while simulator node subscribes to command topic and publishes to telemetry topic. When I use rosrun both runs fine but only mission control node runs when I use roslaunch command. the printed message on the terminal is "The Goal Latitude is 33 and Goal Longitude is -84" and it keeps on running ... No error message. I also know that both nodes are running (used rosnode list to check it). Also both telemetry topic and commands topic are running (rostopic list) The following is my XML code. Please help. Thanks in advance.

ImportError: No module named roslaunch

$
0
0
Hello, I'm trying to launch the `roslaunch kobuki_node minimal.launch` command in my software (a Qt app, more precisely). Firstly, I was forced to use `/opt/ros/indigo/bin/roslaunch` command instead of `roslaunch` to have a result. Unfortunatly, the complete command doesn't work. With a `QProcess`, I have no result. When I use the standard C `execv` command, I have the below result: ``` Traceback (most recent call last): File "/opt/ros/indigo/bin/roslaunch", line 34, in import roslaunch ImportError: No module named roslaunch ``` Do you have an idea to solve the problem? Thanks in advance! DarkPatate.

respawn controllers

$
0
0
Hi all, My setup uses **ros_control** together with **VRep** for simulation. In order to start the demo I have a launch file which starts a node spawning the controllers I use (node **spawner** from package **controller_manager**) and I then start vrep manually. This work fine but every time I close Vrep and reopen it I need to kill roslaunch and relaunch my launch file. This is because the spawner node has done its job once and then disappeared so it no longer can spawn the controllers again. Is there a way to have my controllers respawned when I close and reopen Vrep without needing to call the launch file. I have tried the **respawn="true"** option but it does not work. Thanks, Antoine

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.

Supplying filename arguments to launch files

$
0
0
I have a node that has a filename as a private parameter. The files can be located anywhere and have really long filenames. What I would like to do is $ roslaunch package_name launch_file.launch file:=reallylongfilename12345932.txt where I running this command from the directory containing the file, so I can take advantage of tab-completing the filenames. I have an `arg` in my launch file called `file` that accepts this filename, but **not the path**. As a result, my node cannot open the file because it doesn't have the full path, just the name. Short of hardcoding in the path in the launch file, and being able to tab-complete the long file names, is there a way I can pass the full path of the file to my parameter?

If statement in launch file

$
0
0
I want to cancel the creation of a node in the launch file if a value, which is entered by user in console, equals a certain value. For instance I am launching a file: roslaunch file attr1:='1' attr2:='2' and in my launch file i want to do a check. the syntax in any other language would be : if (attr1 == value){ cancel node}; problem is, in the launch file I tried to use a unless="$(arg attr1)" but it's not a bool because when i enter the value in the console, it is an int. So i realized the unless and if conditionals in the launch file are explicitly looking for a true or false, and that they can't do a comparison: unless="$(arg attr1 == '1')" did not work. any suggestions? Any syntax I can use launch file that would make this work? THANKS!

running several nodes automatically and as per need

$
0
0
Hello, I am looking to figure out how to setup an Automatic Launch method for a project in ROS involving several nodes in different packages. Idea is that those nodes need to be executed at different times, as per need or pause and re-run if a certain condition arose. I can be wrong but as far as i know with a Launch file you can start the the nodes at one time or - somewhere in this website i read - nodes could be launched conditionally through the launch file. What i am looking to figure out is how to go about to achieve the following type of automatic Execution of nodes: Run the initial node (node A) from a package and then when there is the right time (depending on; a condition is met or an interesting information is received or a job is done by another node) Node B starts and deals with its own assignment and sleeps again waiting to be called again or not. project could have more nodes and different orders of executions. *Lets say there is a Patrol Robot that starts its job, then when it receives an alarm or detects an abnormality in the area it enters a Sweep mode (node from another package) to thoroughly explore that certain part of the perimeter and when it clears the area, robot pause or stops the Sweeping and goes back to normal Patrolling mode unless there is another alarm, etc. (Something like this or more complex in terms of number of nodes)* Would be nice if you could either explain the way to go about it or link resources for me read.

Preventing spawn of two nodes with same parameter

$
0
0
I have a launch file that takes a serial number and a index number and launches the node based on those numbers, however if I launch one node with a serial number, and then a second node with the same serial number, then the second node will cause the first to shutdown because of "ros node with same name" and then since I have my respawn set to true (for other reasons) then the first node respawns and shutsdown node 2, and etc etc. Any ideas how i can check for the serial number already being used? assuming the user is completely ignorant to any node already launched. I wanted to ideally check in the launch file, but I can only do boolean expressions with the "if" or "unless" statements, and for what I am trying, it doesnt work. PLEASE HELP!XD Thanks perhaps there is an xarco type statement I can write? I am just not extremely familiar with it.

Xacro unless property check -> error

$
0
0
Running this file with roslaunch command, and passing the cam_serial and cam_index. But I'm getting error: `Invalid roslaunch XML syntax: unbound prefix: line 3, column 0 The traceback for the exception was written to the log file` What is wrong? <>

roslaunch log files flush period

$
0
0
I have a lot of processes being launched with roslaunch. I'm setting the output parameter to send the logs to files. I can see that the files are created, however, some of the logs never get written to disk. This appears to be due to the frequency of writes to synchronize with the disk. At a guess, I would say that some logs are too short and never get written. It would seem that this is related to http://answers.ros.org/question/200593/why-in-this-simple-sample-my-logs-are-not-written-in-logfile-or-is-there-a-way-to-control-the-flushing-period-of-the-log-files/ Is it the case that logs are only written once over a certain size? Is there anyway to force the logs to be flushed more frequently?

roslaunch if condition

$
0
0
Hi how can say: run this node if argX==y The following does not work, and the documentation on this is lacking.

equivalent of rosparam get or rosparam list in launch file

$
0
0
Does anyone know if there is an equivalent of the console command "rosparam get 'parameter'" or "rosparam list" that can be written in to a .launch file. Wanting to check if a parameter is set or exists. So i was thinking that I could use an unless or if check but I don't know how to tell it to check if it exists in the parameter server... Please someone help hahaha

roslaunch not working

$
0
0
http://wiki.ros.org/rosbag/Tutorials/Exporting%20image%20and%20video%20data I am following this tutorial to export images from a bag file. in `src` in catkin workspace, I created a new package `myimage`. created a folder `launch`, and copy-pasted `export.launch` in that folder. I then, did `roslaunch export.launch` and I got the error message: Unable to contact my own server at [http://192.168.1.4:43535/]. This usually means that the network is not configured properly. A common cause is that the machine cannot ping itself. Please check for errors by running: ping 192.168.1.4 For more tips, please see http://www.ros.org/wiki/ROS/NetworkSetup I have tried this: http://answers.ros.org/question/10238/unable-to-contact-my-own-server/ but, it did not help in my case. It is still showing the same error

Error launching remote node: not a valid URL

$
0
0
Hi all: I have an issue launching a single talker and listener in two machines. It seems like one of the nodes is launched properly but with the other one (launched in the remote machine) is unable to start due to an error parsing the URI of the host. I tried to find some more information about the error but I have found nothing on the Internet. This is the log of the roslaunch process: seems like both machines are connected properly and roslaunch tries to execute the listener node in the remote machine after launching the talker node successfully, and then it fails: [roslaunch][INFO] 2015-07-02 10:23:40,469: ... successfully launched [talker_java-1] [roslaunch][INFO] 2015-07-02 10:23:40,470: launch_nodes: launching remote nodes ... [roslaunch][INFO] 2015-07-02 10:23:40,568: [172.16.243.46-0]: launching nodes... [roslaunch][ERROR] 2015-07-02 10:23:40,633: error launching on [172.16.243.46-0, uri http://172.16.243.46:44845/]: ERROR: Traceback (most recent call last): File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/server.py", line 331, in launch succeeded, failed = runner.launch() File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/launch.py", line 646, in launch self._setup() File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/launch.py", line 622, in _setup self._launch_master() File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/launch.py", line 386, in _launch_master validate_master_launch(m, self.is_core, self.is_rostest) File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/launch.py", line 81, in validate_master_launch if not rosgraph.network.is_local_address(m.get_host()): File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/core.py", line 272, in get_host host, _ = rosgraph.network.parse_http_host_and_port(self.uri) File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph/network.py", line 91, in parse_http_host_and_port raise ValueError('not a valid URL') ValueError: not a valid URL [roslaunch][ERROR] 2015-07-02 10:23:40,633: Launch of the following nodes most likely failed: beginner_tutorials/listener [roslaunch][INFO] 2015-07-02 10:23:40,633: ... launch_nodes complete [more unrelated log lines here after the error...] [roslaunch.pmon][INFO] 2015-07-02 10:23:47,637: ProcessMonitor exit: killing 172.16.243.46-0 [roslaunch][INFO] 2015-07-02 10:23:47,637: [172.16.243.46-0] killing on exit [roslaunch.remoteprocess][INFO] 2015-07-02 10:23:47,651: remote[172.16.243.46-0]: closing ssh connection [roslaunch.remoteprocess][INFO] 2015-07-02 10:23:47,729: remote[172.16.243.46-0]: ssh connection closed [roslaunch][INFO] 2015-07-02 10:23:48,037: process[talker_java-1]: SIGINT killed with return value 130 This is the .launch file I am trying to test: And the env-loader in the remote machine is this one: #!/bin/bash export ROS_MASTER_URI=172.16.243.50:11311 export ROS_HOSTNAME=172.16.243.46 exec "$@" Thank you in advance for your help, Adrian

COM port conflicts with RGBD-SLAM

$
0
0
Hi all, I have some troubles running RGBD-SLAM (rgbdslam_freiburg) with YEI three-space sensor ([link](http://www.yeitechnology.com/yei-3-space-sensor)). I run RGBD-SLAM with roslaunch using ASUS Xtion camera and use python to get IMU data from the sensor via COM port. They can run separately but not at the same time. Anybody knows how to fix this problem? Thank you.
Viewing all 598 articles
Browse latest View live


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