Following the [UnderstandingServicesParams Tutorial](http://wiki.ros.org/ROS/Tutorials/UnderstandingServicesParams)
I create another turtle using
`$ rosservice type spawn| rossrv show`
I can control the turtle2 by publish a topic to it directly.
`$ rostopic pub /turtle1/cmd_vel geometry_msgs/Twist -r 1 -- '[2.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]' `
but I want to use
`$ rosrun turtlesim turtle_teleop_key`
then I can control it using my keyboard.
So I think I should do a argument remapping. There should be a argument control which turtle I want to control.(just call it _id instead) so I can run
`$ rosrun turtlesim turtle_teleop_key _id:=turtle2`
so I'm wondering how to find the argument's name.(i.e. what is the real name of "_id")
↧
argument remapping: how to find the argument name
↧
Roslaunch cannot launch node of type: gazebo
Hi All,
Currently I am trying to insert hector quadrotor model in gazebo 1.9. When I use rosrun to spawn robot model:
rosrun gazebo_ros spawn_model -file /opt/ros/hydro/share/hector_quadrotor/hector_quadrotor_urdf/urdf/quadrotore.urdf -urdf -x 0 -y 0 -z 1 -model quadrotore
It works fine and tell me:
[INFO] [WallTime: 1392758020.076054] [0.000000] Loading model xml from file
[INFO] [WallTime: 1392758020.077949] [0.000000] Waiting for service /gazebo/spawn_urdf_model
[INFO] [WallTime: 1392758020.082473] [0.000000] Calling service /gazebo/spawn_urdf_model
[INFO] [WallTime: 1392758020.323186] [1471.849000] Spawn status: SpawnModel: Successfully spawned model
However, when I use roslaunch:
roslaunch hector_quadrotor gazebo.launch model:="/opt/ros/hydro/share/hector_quadrotor/hector_quadrotor_urdf/urdf/quadrotore.urdf"
It gives me
ERROR: cannot launch node of type [gazebo/spawn_urdf_model]: gazebo
ROS path [0]=/opt/ros/hydro/share/ros
ROS path [1]=/home/cds/catkin_ws/src
ROS path [2]=/opt/ros/hydro/share
ROS path [3]=/opt/ros/hydro/stacks
Why it can find gazebo/spawn_urdf_model when using rosrun but can not find it when using roslaunch? I am using ROS Hydro.
Below also please find my gazebo.launch:
↧
↧
Failed to rosrun static tf publisher
**
Usage: static_transform_publisher x y z qx qy qz qw frame_id child_frame_id period(milliseconds)
This transform is the transform of the coordinate frame from frame_id into the coordinate frame
of the child_frame_id.
[ERROR] [1380079370.694111859]: static_transform_publisher exited due to not having the right number of arguments
**
Here's the problem when I tried to confirm whether my static_transform_publisher is running.
I have tried out to 'roslaunch kinect_frames.launch' with 'rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 1 base_link base_scan 100' running on another terminal (just simply fill in some argument).
Here's the output.
... logging to /home/user/.ros/log/590fda42-2a34-11e3-8212-0022fb8421da/roslaunch-ubuntu-3072.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://ubuntu:32821/
SUMMARY
========
PARAMETERS
* /rosdistro
* /rosversion
NODES
/
camera_base_link (tf/static_transform_publisher)
camera_base_link1 (tf/static_transform_publisher)
camera_base_link2 (tf/static_transform_publisher)
camera_base_link3 (tf/static_transform_publisher)
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
ERROR: cannot launch node of type [tf/static_transform_publisher]: can't locate node [static_transform_publisher] in package [tf]
ERROR: cannot launch node of type [tf/static_transform_publisher]: can't locate node [static_transform_publisher] in package [tf]
ERROR: cannot launch node of type [tf/static_transform_publisher]: can't locate node [static_transform_publisher] in package [tf]
ERROR: cannot launch node of type [tf/static_transform_publisher]: can't locate node [static_transform_publisher] in package [tf]
No processes to monitor
shutting down processing monitor...
... shutting down processing monitor complete
↧
How to Extract video from bag file?
Hi,
I am using ROS hydro on Ubuntu 12.04.
After using the command "**rosrun image_view extract_images _sec_per_frame:=0.01 image:={IMAGE_TOPIC_IN_BAGFILE}**" I'm having an error when executing"**ffmpeg -r -b -i frame%04d.jpg .avi**" The thing is I am not seeing the sequence of images after I play the bagfile.I ran "rosbag info" to obtain the topic in the bag file but when I run **"rosrun rqtgraph rqtgraph"** the /extract_image frame node is there all by itself.
When I follow the tutorials on http://wiki.ros.org/rosbag/Tutorials/Exporting%20image%20and%20video%20data I get an error "*[FATAL] [1394583654.335465840]: Error opening file: play*".After replacing play by "--clock" or just removing "play" everything seemed to go just fine but there are no frames*.jpg in **/home/.ros**.
I feel like I'm lacking something.Can anyone help?
↧
rosrun error - illegal instruction (core dumped)
Hello,
I am new to ROS and PCL. I just installed ROS on my machine, Ubuntu 12.10, and tried to run the following command:
rosrun pcl_ros pcd_to_pointcloud FILENAME.pcd 1
I got the following error:
[ INFO] [1394409998.308043682]: Publishing data on topic /cloud_pcd with frame_id /base_link.
Illegal instruction (core dumped)
Can you please explain to me why this is happening?
Thanks.
↧
↧
Namespace without roslaunch
Hi
I like to run a rosnode within a namespace but without roslaunch.
I have to find a problem related to a multi-robot scenario because I use name spaces to start rosnotes for each robot.
It looks like there is a problem with one node and I like to debug the node, so I like to start the node with a debugger but within a namespace.
Is this possible?
Greetings
↧
rosrun cannot find my executable
I have a wet package called velodyne, which provides a roscpp node called conversion. It builds alright, I can see it in the devel space ([WS]/devel/lib/velodyne/conversion), it has the executable bit set, but rosrun cannot find because it looks for it in the source folder.
I've had this problem a lot recently. Usually, after resourcing my setup several times, rebuilding several times, and other random fiddling, I finally can launch the node. I would like to know what's the issue and how to get rid of it...
my catkin workspace is located in /data/driving_repos/catkin_ws
in my bashrc I source /data/driving_repos/catkin_ws/devel/setup.bash
$ rosrun velodyne conversion
[rosrun] Couldn't find executable named conversion below /data/driving_repos/catkin_ws/src/rdr_v2/packages/perception/velodyne
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:
[rosrun] /data/driving_repos/catkin_ws/src/rdr_v2/packages/perception/velodyne/src/conversion
Indeed, /data/driving_repos/catkin_ws/src/rdr_v2/packages/perception/velodyne/src/conversion is a folder!
Interestingly, after typing 'rosrun velodyne ' and using tab completion, it lists all the executables in my velodyne package alright...
Also, uninstalling ros-hydro-velodyne solves my problem. I checked the source code of rosrun and it calls
catkin_find --without-underlays --libexec --share velodyne
which returns /opt/ros/hydro/share/velodyne !
It's strange however that it returns that path... shouldn't the packages in my workspace have priority?
↧
rosrun or roslaunch
Hellow,
Easy question does roslaunch just execute a set of rosrun or is it slightly different ? I couldn't find it in the doc...
I'm asking that because I'm under the impression that my node run slower when launch with a roslaunch then with a rosrun.
Thanks.
↧
Starting rviz tutorial, fail to send markers
Hi Guys,
I am following rviz tutorial below
http://wiki.ros.org/rviz/Tutorials/Markers%3A%20Basic%20Shapes
I have downloaded the C++ Codes and use catkin to make it as a ros-package. Then I have runned
roscore
rosrun rviz rviz
rosrun using_markers basic_shapes
But I still not able to find any markers and shapes in rviz.
After I did `rosrun using_markers basic_shapes`, no information showed in the terminal. Can anyone help me this problem?
↧
↧
Can I roslaunch a rosjava node?
In previous versions of rosjava, I used to be able to start my node using roslaunch or rosrun. Now, it seems that to execute a node (as shown in the tutorials), I have to use the following syntax:
./my_pub_sub_tutorial com.github.rosjava_catkin_package_a.my_pub_sub_tutorial.Talker &
Please advise if it is still possible to use roslaunch and a launch file. I prefer to launch my java nodes this way, to be able to set parameters in a consistent way with my C++ based nodes. Now, I get an errror, "cannot launch node of type [execute]".
Also, it is not clear if I should be creating my rosjava subprojects as libraries (jar files) or executables to do this.
Thanks in advance.
↧
how to get catkin package recognized by rosrun
I created a catkin workspace folder ~/catkin-ws, and downloaded usb_cam (http://wiki.ros.org/usb_cam) source into ~/catkin-ws/src. I called catkin_make and ~/catkin-ws/devel/lib/usb_cam/usb_cam_node is created.
But when I type rosrun usb[TAB Key], nothing happened.
I think this is because usb_cam not registered to ros system yet, since there is no usb_cam in /opt/ros/hydro/lib(I am using hydro). so I tried this:
sudo cp -r ~/catkin-ws/devel/lib/* /opt/ros/hydro/lib/
still not working. how to get a catkin complied package recognized by rosrun?
by the way, running "~/catkin-ws/devel/lib/usb_cam/usb_cam_node" directly does work. is that the correct way?
↧
rosrun fails on Qt binding
I am working my way through the tutorials and cannot use anything related to rosrun. I am running 64-bit Ubuntu and I just installed hydro (installed hydro-full).
When I run "rosrun rqt_graph rqt_graph" I get an error with the following final statements:
ImportError: Could not find Qt binding (looked for: 'pyqt', 'pyside'):
ImportError for 'pyqt': No module named sip
ImportError for 'pyside': No module named QtCore
Thanks in advance.
↧
How to automate the launching procedure of ROS nodes
Hi,
I am ***interested in automating*** the commands that I **have to type in separate new terminals to launch various nodes**.
step:1.**sudo su**
step:2.**cd /root/fuerte_workspace**
step:3.**source /root/fuerte_workspace/setup.sh**
Above three steps need to be **repeated every time when I launch new terminals(ctrl+alt+t). with following commands**
command:1 roscore
command:2 roslaunch move_base.launch
command:3 rosrun rviz rviz
**to launch command4**, I need to go **to /opt/ros/fuerte/stacks/yujin_cmd_vel_mux**
command:4 roslaunch cmd_vel_mux standalone.launch
**Procedure One:** `Through shell script`
I have written a sample directly [executable shell script](http://pastebin.com/xsPsVeF6). but it is not working properly and following error occurs in the new terminal when roscore tries to initialize.
[Script ERROR.jpg](/upfiles/13993889295103188.jpg)
**Procedure Two**: Through **include tag** in one launch file. But I don't know **how to incorporate rosrun commands inside a launch file.**
↧
↧
rosrun of a working python script fails
I have written a python code using different libraries I already installed (pygame, pyaudio etc...).
My script is working very well when I run it using
python myscript.py
but when I put it in my ros package and after making it executable and running it using
rosrun mypackage myscript
it shows some error messages when I click with the mouse and then crashes.
Here is the error I get:
import: unable to grab mouse `': Resource temporarily unavailable @ error/xwindow.c/XSelectWindow/9052.
import: unable to grab mouse `': Resource temporarily unavailable @ error/xwindow.c/XSelectWindow/9052.
import: unable to grab mouse `': Resource temporarily unavailable @ error/xwindow.c/XSelectWindow/9052.
import: unable to grab mouse `': Resource temporarily unavailable @ error/xwindow.c/XSelectWindow/9052.
import: unable to grab mouse `': Resource temporarily unavailable @ error/xwindow.c/XSelectWindow/9052.
import: unable to grab mouse `': Resource temporarily unavailable @ error/xwindow.c/XSelectWindow/9052.
import: unable to grab mouse `': Resource temporarily unavailable @ error/xwindow.c/XSelectWindow/9052.
from: can't read /var/mail/std_msgs.msg
import: unable to grab mouse `': Resource temporarily unavailable @ error/xwindow.c/XSelectWindow/9052.
import: unable to grab mouse `': Resource temporarily unavailable @ error/xwindow.c/XSelectWindow/9052.
/home/tlili/groovy_workspace/sandbox/BILHR_ros/src/ASR_node.py: line 16: LANG_CODE: command not found
/home/tlili/groovy_workspace/sandbox/BILHR_ros/src/ASR_node.py: line 17: KEY_TLILI: command not found
/home/tlili/groovy_workspace/sandbox/BILHR_ros/src/ASR_node.py: line 18: OTHER_KEY: command not found
/home/tlili/groovy_workspace/sandbox/BILHR_ros/src/ASR_node.py: line 20: GOOGLE_SPEECH_URL: command not found
/home/tlili/groovy_workspace/sandbox/BILHR_ros/src/ASR_node.py: line 21: FLAC_CONV: command not found
/home/tlili/groovy_workspace/sandbox/BILHR_ros/src/ASR_node.py: line 22: INITIAL_SPEECH_THRESHOLD: command not found
/home/tlili/groovy_workspace/sandbox/BILHR_ros/src/ASR_node.py: line 23: FORMAT: command not found
/home/tlili/groovy_workspace/sandbox/BILHR_ros/src/ASR_node.py: line 24: syntax error near unexpected token `('
/home/tlili/groovy_workspace/sandbox/BILHR_ros/src/ASR_node.py: line 24: `SHORT_NORMALIZE = (1.0/32768.0)'
And this is the main part of my script, it basically start saving audio from a microphone when the mouse is clicking on a small black window and when the mouse is released the audio is sent to google speech to text API.
pa = pyaudio.PyAudio() #]
stream = pa.open(format = FORMAT, #|
channels = CHANNELS, #|---- You always use this in pyaudio...
rate = RATE, #|
input = True, #|
frames_per_buffer = INPUT_FRAMES_PER_BLOCK) #]
speech_threshold = INITIAL_SPEECH_THRESHOLD #]
noisycount = 0 #|---- Variables for noise detector...
quietcount = 0 #|
errorcount = 0 #]
frames = []
isSaving = 0
pygame.init()
pygame.display.set_mode((300,200))
pygame.display.set_caption('Testing')
running = True
#Ros objects to publish strings received after ASR
pub = rospy.Publisher('speech',String)
rospy.init_node('ASR',anonymous=True)
while not rospy.is_shutdown():
try: #]
block = stream.read(INPUT_FRAMES_PER_BLOCK) #|
except IOError, e: #|---- just in case there is an error!
errorcount += 1 #|
print( "(%d) Error recording: %s"%(errorcount,e) ) #|
#]
pressed = pygame.mouse.get_pressed()[0]
if isSaving:
frames.append(block)
noisycount += 1
quietcount = 0
print(len(frames))
ev = pygame.event.get()
for event in ev:
if event.type == pygame.MOUSEBUTTONDOWN:
isSaving = 1
print 'started recording'
elif event.type == pygame.MOUSEBUTTONUP: # if its to loud...
if isSaving:
isSaving = 0
print 'speech detected!'
save_audio(frames,pa)
r = (stt_google_wav(WAVE_OUTPUT_FILENAME))
print(r)
if(len(r)):
pub.publish(r)
frames = []
quietcount += 1
noisycount = 0
pygame.event.pump()
↧
Rosrun executable not found
Hello,
I'm trying to run a node from rosrun (it works when I manually enter ./program inside build directory). Yet it doesn't work when called by rosrun - it finds the directory by tab completion, but not the executable. How can I help it? I need it to use it in launch files.
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:
[rosrun] /home/user/ros_ws/catkin_ws/src/ros_programme
↧
waiting for the map problem
I follow the tutorial " slam_gmapping Tutorials MappingFromLoggedData " ,
and when I enter this command " rosrun map_server map saver " , I have this message " waiting for the map "
and after there are nothing.
What is the problem, I had forgot a step, or any configuration?
↧
gscam::GSCam::init_stream(): assertion failed: (outpad)
Hi,
I want to view a cam on armhf. To do so, I first export GSCAM_CONFIG="v4l2src device=/dev/video0 ! video/x-raw-rgb,width=640,height=480,framerate=24/1 ! ffmpegcolorspace ! identity name=ros ! fakesink". This is tested using gst-launch with xvimagesink and it works. However, after the export, rosrun gscam gscam fails with "bool gscam::GSCam::init_stream(): assertion failed: (outpad)
Aborted (core dumped)". I tried replacing and leaving out xvimagesink, changing the resolution, framerate but it still doesn't work. Any clues ?
Addition: ERROR:/tmp/buildd/ros-groovy-gscam-0.1.1-0precise-20140131-0203/src/gscam.cpp:131:bool gscam::GSCam::init_stream(): assertion failed: (outpad)
↧
↧
Unable to create/find executable when using rosrun.
Hello all,
I am trying to run a C++ code to move the ur5 robotic arm to random configurations in moveit!. However when I am trying to run the code using rosrun I am getting the following error:
[rosrun] Couldn't find executable named move_group_interface_tutorial below /home/abhi/Desktop/universal_robot/ur_moveit_tutorials
The C++ file is this:
#include
#include
int main(int argc, char **argv)
{
ros::init(argc, argv, "lesson_move_group");
// start a background "spinner", so our node can process ROS messages
// - this lets us know when the move is completed
ros::AsyncSpinner spinner(1);
spinner.start();
move_group_interface::MoveGroup group("manipulator");
group.setRandomTarget();
group.move();
}
The CMakeLists.txt file is something like this:
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()
#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/src)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
#uncomment if you have defined messages
#rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()
rosbuild_add_executable(lesson_move_group_1 src/lesson_move_group_1.cpp)
target_link_libraries(lesson_move_group_1 moveit_move_group_interface)
Please tell me how to create the executable and run this code. I am stuck here for quite some time now.
↧
Error when running rviz "undefined symbol error: /opt/ros/hydro/lib/librviz.so: undefined symbol: _ZN3ros7package10getPluginsERKSsS2_RSt6vectorISsSaISsEEb"
This is different from the solutions and questions that are already asked. I even tried to fix this with the already existing solutions although there differed by the "/opt/ros/hydro/lib/librviz.so: undefined symbol: _ZN3ros7package10getPluginsERKSsS2_RSt6vectorISsSaISsEEb" part of the error message.
The whole cmd line says:
developer@haf:~/catkin_ws$ rosrun rviz rviz
[ INFO] [1404305441.695792813]: rviz version 1.10.16
[ INFO] [1404305441.695862492]: compiled against OGRE version 1.7.4 (Cthugha)
/opt/ros/hydro/lib/rviz/rviz: symbol lookup error: /opt/ros/hydro/lib/librviz.so: undefined symbol: _ZN3ros7package10getPluginsERKSsS2_RSt6vectorISsSaISsEEb
developer@haf:~/catkin_ws$
↧
Could not find executable running image_view from rosrun
I've been using image_view to see the contents of image topics for some time, but I encountered a problem and I have no idea what the cause is. Here's what I get when trying to check an image topic:
Command I typed:
**rosrun image_view image_view image:=/...(topic)**
Terminal output:
**[rosrun] Couldn't find executable named image_view below /opt/ros/hydro/share/image_view**
**[rosrun] Found the following, but they're either not files, or not executable:**
**[rosrun] /opt/ros/hydro/share/image_view**
It shouldn't be a source problem. Many other programs can run normaly.
I would really appreciate your help. Thanks!
↧