Hey all,
I am trying to move my catkin workspace from my old computer to my new one. I copied the folder from my old computer, pasted into the new one with ROS installed. catkin)make gave no errors. However, when i try to run my program, i get this error:
$ rosrun sim_pkg sim_init
[rosrun] Couldn't find executable named sim_init below /home/icepaka89/algsim_ws/src/sim_pkg
Clearly there is a problem with ROS_PACKAGE_PATH. But I can't seem to figure it out? Does anyone know an easy way to fix this? I made sure i ran source devel/setup.bash before running my program. Thanks!
↧
[rosrun] Count' find executable named ... ?
↧
rosrun rqt_graph rqt_graph (Import error: no module named rospkg)(Is this is related to anaconda?)
Problem started when i executed rosrun as mentioned in question, then i installed rospkg using command
> sudo apt-get install python-rospkg
and rospkg got installed in /usr/lib/python2.7/dist-packages/rospkg , but after that import error still showing. I am using anaconda too on my laptop and python2.7 is default for anaconda. One interesting point i got here that i have installed **rospkg** in python2.7 but when i am importing rospkg in **python3.4**, it is working.
↧
↧
Can't establish connection to UR5 using ROS-Industrial driver
Hello,
I am currently running on Ubuntu 14.04.5 LTS and UR Software 3.3.0.145. I have gone through the ROS tutorial for installing Indigo and setting up my catkin workspace. Next I cloned the the github repo for the `ur_modern_driver` into `catkin_ws/src` and made it with `catkin_make`. From there I have tried to follow the universal robot getting started with ROS Industrial tutorial...
[Universal Robot ROS Industrial Tutorial](http://wiki.ros.org/universal_robot/Tutorials/Getting%20Started%20with%20a%20Universal%20Robot%20and%20ROS-Industrial)
I can ping the UR5 and run my own python scripts with URScript commands so the communication appears to be in check.
My problem is with step 3.3 in the tutorial when I try to run
roslaunch ur_bringup ur5_bringup.launch robot_ip:=IP_OF_THE_ROBOT [reverse_port:=REVERSE_PORT]
and
rosrun ur_driver test_move.py
When I run the roslaunch command from the `~/catkin_ws` directory I get the error
[ur5_bringup.launch] is neither a launch file in package [ur_bringup] nor is [ur_bringup] a launch file name
However, I have been able to get it to launch once by switching to the `~/catkin_ws/src/ur_modern_driver/launch` directory and omitting `ur_bringup` at the start of the command, but the `rosrun` command would not do anything on the arm. Coming back after the weekend and trying to run the same thing I get an
Error connecting to get firmware version
So I appear to be back at square one trying to get `roslaunch` to work.
I'm not sure if this would be an issue, but the computer I am currently running from is not connected to the internet when I run commands because there is only one ethernet port which needs to be connected to the UR5. I have made sure to run `source devel/setup.bash` before the `roslaunch` command and have checked that the .launch files do in fact exist in the launch folder.
Any insight / ideas are greatly appreciated!
Cheers,
Pawel
[UPDATE]
After trying the suggested line
`roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=IP.OF.YOUR.UR`
I get the same sort of error as before with the `Error connecting to get firmware`. It appears that it is trying to use the UR3 driver for some reason? Once again I made sure to run `source ~/catkin_ws/devel/setup.bash` beforehand. I pasted the error below...
auto-starting new master
process[master]: started with pid [4135]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to a2d5b39c-7a9d-11e6-b304-001cc0933a57
process[rosout-1]: started with pid [4148]
started core service [/rosout]
process[robot_state_publisher-2]: started with pid [4151]
process[ur_driver-3]: started with pid [4152]
[FATAL] [1473872815.699936438]: Error connecting to get firmware version
terminate called after throwing an instance of 'std::system_error'
what(): Invalid argument
[ur_driver-3] process has died [pid 4152, exit code -6, cmd /home/robots/catkin_ws/devel/lib/ur_modern_driver/ur_driver __name:=ur_driver __log:=/home/robots/.ros/log/a2d5b39c-7a9d-11e6-b304-001cc0933a57/ur_driver-3.log].
log file: /home/robots/.ros/log/a2d5b39c-7a9d-11e6-b304-001cc0933a57/ur_driver-3*.log
↧
How to use test_move.py script from ur_modern_driver
Hello,
I am currently running on Ubuntu 14.04.5 LTS, UR Software 3.3.0.145, and am running Indigo. I am able to get `roslaunch` to work, however when I try to run `rosrun ur_modern_driver test_move.py`. I get the error
rospkg.common.ResourceNotFound: ur_driver
I have run the `rosrun` command in a new terminal after running `source ~/catkin_ws/devel/setup.bash`
Any thoughts or insights are greatly appreciated!
Cheers,
Pawel
↧
got problem with rviz in ubuntu 16.04
hi all.
recently i install rosmake and rviz and other related packages such
ros-desktop-full
python-rosmake
rviz
i think have unknown problem when i try to run rviz.
first i run roscore then i run rviz.
but i cant put any shape in this plane.
i cant see target frame in global options and so on.
even when i want to run rviz with rosrun rviz rviz i get this error:
/usr/bin/rosrun: line 56: rospack: command not found
i use ubuntu 16.04.
and i'm very new to this word so i think i miss some packages.
thanks
↧
↧
Bash:ROSRUN:command not found
I need some help. I tried to modify some topics in other computer usin Node Manager but it sends me: bash: rosrun: command not found.
↧
Downloaded packages don't work
Dear all,
for the outstep i have to clarify that I'm new to ROS and C++.
I installed my ROS Indigo on UBUNTU 14.04 as it is done in the tutorials. (full-desktop) and afterwards i added the path of the setup.bash to my .bashrc file to source it automatically for each termial startup.
I also created my own catkin workspace as shown in the tutorials (catkin_init_workspace, catkin_make and so on) and afterwards i sourced the setup.bash file from my devel folder of the workspace i created. When I echo ROS_PACKAGE_PATH it looks like that:
/home/my_path/catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks.
Sometimes I sourced the setup.bash file of my workspace by hand and sometimes (I already tried a lot) I added the command to the .bashrc file. The ROS_PACKAGE_PATH always looks like above.
After playing around with turtlesim and so on I wanted to get a driver for a gps board i have (ublox).
So i changed the directory to my workspace via
cd /my_catkin_ws_path/src
and then cloned the source code (it says it is a catkinized version -- what does this mean?) to it with
git clone https://github.com/KumarRobotics/ublox.git
Then i installed the dependencies of the package with
rosdep install ublox
and finally i built it with
catkin_make
Afterwards i checked the rospack profile and ublox was there.
I also checked rospack list and it was there (ublox_gps, ublox_msgs and ublox_serialization).
This was the moment when i thought i can run a ublox node. Should this be the moment? Did i forget anything? Because it just don't works, however i try to.
I tried: rosrun ublox_gps ublox_gps_node and some other versions. When i go into the ublox_gps CMakeLists.txt it says "add_executeable(ublox_gps_node src/node.cpp)". Rosrun tells me then that it couldn't find executable named ublox_gps_node below ...ublox/ublox_gps.
At this moment i said to myself, ok let's try another one. I took the book "Learning ROS for Robotics Programming" and tried to install the driver for the first sensor which is used in this book, a joystick, like it is done in the book:
sudo apt-get install ros-indigo-joystick-drivers
rosstack profile & rospack profile
There was no joystick package in any of the profiles. Is this normal?
rosrun joy joy_node
also didn't work! It says: [ERROR] [1476314154.407197494]: Couldn't open joystick /dev/input/js0. Will retry every second.
What am I doing wrong? Can anyone help me?
↧
Consume a service from a Master node
Hello!
I want to consume a service running in a computer from another computer in the same network. Is this possible?
I have set up ROS_MASTER_URI correctly on both, I know its correct since I was able to do the talker/listener example from the tutorials.
If I run roscore and the service from the basic tutorial:
rosrun beginner_tutorials add_two_ints_server.py
and this on the client computer:
rosrun beginner_tutorials add_two_ints_client.py
I get nothing.
Does anybody know what could be wrong?
Thanks in advance.
EDIT: One runs the server and one runs the client, I do not have the server running on both computers.
↧
Navigation nodes aren't found if devel setup.bash sourced in addition to the opt devel
Hi,
I have a problem with my navigation nodes in (this is for use with a husky if it matters, but I don't think it does).
It came to light when i tried to use mapserver as part of a launch file. ROS complains that "ERROR: cannot launch node of type [map_server/map_server]: can't locate node [map_server] in package [map_server]". This happens for all other nodes in the navigation package.
In my setup i have the following two lines in my .bashrc file so a new terminal would have all the variables it needs.
source /opt/ros/indigo/setup.bash
source /home/alex/catkin_ws/devel/setup.bash
My solution to this is to open a new terminal and manually source /opt/ros/indigo/setup.bash in it, and then rosrun whatever node i'm interested in. That's quite clunky however and it would be neat to have all the relevant nodes in the project launch file.
Has anyone seen this before?
↧
↧
Error: package 'rqt_graph' not found
Hi people!
i almost finish my first program with ROS and I want to watch the map with nodes and topic, but when I use `rqt_graph` I get this error returns
Error: package 'rqt_graph' not found
I am using this instruccion
rosrun rqt_graph rqt_graph
maybe the instruccion is wrong, I don't sure.
anybody can help me?
---
Edit: I try to install it, but not the package is located
sudo apt-get install ros-indigo-rqt
sudo apt-get install ros-indigo-rqt-graph
sudo apt-get install ros-indigo-rqt-common-plugins
↧
Launching multiple instances of same ROS node (with different names)
The problem is in simulating two independent different robots in Gazebo: Copter and Rover with same mavros functionality. (Two independent instances of mavros would do great) Can two instances of mavros nodes be run using different names?
So, I tried to call mavros and the problem turned out to be "A new node registered with same name" which terminates Gazebo. To avoid this problem, I have tried to rename node-calls and the attempts include the following mentioned below.
**1.** Using namespaces as shown above; This still registers the node name as "/mavros" instead of "/copter/mavros" and "/rover/mavros"
**2.** Coding separate mavros_node codes for copter and rover instead of [mavros_node.cpp](https://github.com/mavlink/mavros/blob/master/mavros/src/mavros_node.cpp). The modified version contains the lines shown below.
ros::init(argc, argv, "mavros_copter"); //In mavros_node_copter.cpp
ros::init(argc, argv, "mavros_rover"); //In mavros_node_rover.cpp
mavros_node.cpp, mavros_node_copter.cpp and mavros_node_rover.cpp source files are all placed in the same original folder. The entire package is then compiled with catkin_make. But, even then, using "mavros_copter" and "mavros_rover" as node name won't work with ROS Service properly while using "mavros" works.
`` is the original code in launch file which works.
type="mavros_node_copter" name="mavros" (works)
type="mavros_node_copter" name="mavros_copter" (doesn't work)
**3.** I tried rqt_graph and this is the most confusing part in the software simulation. mavros node is shown as an independent node. [I tried to assess how mavros is interacting with Gazebo and where how that is getting called and rqt_graph doesn't provide that information](https://drive.google.com/file/d/0B9GEXq3wS5JMc2Uwb2p1UXlIQVk/view?usp=sharing) (even for original code which works).
**4.** [Remapping nodes is not possible using roslaunch while command-line options like rosrun can be used.](http://answers.ros.org/question/198873/how-to-changeremap-ros-node-name-in-launch-file/)
I even tried `_name:="something"` [in command line](https://github.com/mavlink/mavros/issues/279) along with roslaunch; But, that does not seem to work. (Original name is retained somehow)
Can you please let me know how multiple instances of same node can be run? (Optional: It will be great if you let me know how mavros is interacting with Gazebo)
Any help will be **greatly, gratefully and whole-heartedly** appreciated. Thanks for your time and consideration.
Prasad N R
Reference question: http://robotics.stackexchange.com/questions/10898/multiple-robots-in-ros-gazebo-sitl-with-separate-mavlink-mavproxy-codes
↧
Change path of rosrun. Couldn't find executables?
I am following tutorials of ROS at the ROS wiki
//www.ros.org/wiki/ROS/Tutorials/ExaminingPublisherSubscriber.
When I try to run `rosrun beginner_tutorials talker`. It tells me that:
[rosrun] Couldn't find executable named talker below /home/maverick/catkin_ws/install/share/beginner_tutorials
I know that the executable is not in the install folder but rather in devel. How can I make it search for rosrun beginner_tutorial talker in
devel/lib/beginner_tutorials/talker
Additional information: When I ran find -executable -type f the output is given as below:
*./devel/lib/beginner_tutorials/add_two_ints_client
./devel/lib/beginner_tutorials/talker
./devel/lib/beginner_tutorials/add_two_ints_server
./devel/lib/beginner_tutorials/listener
./devel/_setup_util.py
./devel/env.sh
./install/_setup_util.py
./install/env.sh
./build/CMakeFiles/CompilerIdC/a.out
./build/CMakeFiles/CompilerIdCXX/a.out
./build/CMakeFiles/CMakeDetermineCompilerABI_C.bin
./build/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin
./build/catkin_generated/installspace/_setup_util.py
./build/catkin_generated/installspace/env.sh
./build/catkin_generated/setup_cached.sh
./build/catkin_generated/env_cached.sh*
After using the `env | grep ROS_PACKAGE_PATH` I get:
ROS_PACKAGE_PATH=/opt/ros/groovy/share:/opt/ros/groovy/stacks
and I have sourced the file using the following command:
source ./devel/setup.bash
↧
rospack segmentation fault
Hi guys,
I am using ros::package::getPath to resolve the path to a config file I am loading within my program.
When I am starting the node using
> rosrun node_pkg node
everything works just fine, but when I directly launch the generated executable in the devel directory, I immediately get a segmentation fault
#0 0x00007ffff33056ad in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x00007ffff18511f3 in rospack::Stackage::~Stackage() () from /opt/ros/jade/lib/librospack.so
#2 0x00007ffff1847ecf in rospack::Rosstackage::addStackage(std::string const&) ()
from /opt/ros/jade/lib/librospack.so
#3 0x00007ffff184bfad in rospack::Rosstackage::crawlDetail(std::string const&, bool, int, bool, std::vector>&, boost::unordered::unordered_set, std::equal_to, std::allocator>&) ()
from /opt/ros/jade/lib/librospack.so
#4 0x00007ffff184bef3 in rospack::Rosstackage::crawlDetail(std::string const&, bool, int, bool, std::vector>&, boost::unordered::unordered_set, std::equal_to, std::allocator>&) ()
from /opt/ros/jade/lib/librospack.so
#5 0x00007ffff184cbe5 in rospack::Rosstackage::crawl(std::vector>, bool) () from /opt/ros/jade/lib/librospack.so
#6 0x00007ffff185b2d1 in rospack::rospack_run(int, char**, rospack::Rosstackage&, std::string&) ()
from /opt/ros/jade/lib/librospack.so
#7 0x00007ffff1857e3c in rospack::ROSPack::run(int, char**) () from /opt/ros/jade/lib/librospack.so
#8 0x00007ffff1858169 in rospack::ROSPack::run(std::string const&) () from /opt/ros/jade/lib/librospack.so
#9 0x00007ffff597bf01 in ros::package::command(std::string const&) () from /opt/ros/jade/lib/libroslib.so
#10 0x00007ffff597c0cd in ros::package::getPath(std::string const&) () from /opt/ros/jade/lib/libroslib.so
can anybody explain this behavior?
#include
std::string path = ros::package::getPath("x_common");
Thank you for your time!
↧
↧
Is it possible to use a certain data value of a topic for executing some code?
Hello, i will try to be as clear as possible.
I have a ROS topic in which are published only 0 and 1. In another node i have a subscriber that is subscribed to that topic. Then i had an idea to implement a callback function, that as some code to execute inside, that is called by the subscriber.
Let's say that every ten data valued 1 a data valued 0 will show up in the topic.
So my question is, is it possible to execute the code inside the callback function only when the subscriber reads 0 in the topic?
I mean with a sort of if(...) {...} mechanism or something similar.
I apologize if it's not clear, i can provide other details or explanations; just let me know.
Thank you in advance!
EDIT: here is the correct code of the callback function that i mentioned in the comment:
void orderCallback(const std_msgs::Bool::ConstPtr& msg)
{
if (msg->data == 0)
{
chdir("/home/marco/catkin_ws/src/heart_rate_monitor");
system("get_hrv -R my_data_file.txt >doc.txt");
}
}
↧
How to pass topic name as the input argument using rosrun?
This is my code snippet for retrieving messages published by the topic. I want to pass the topic name as the input argument.
#include
#include
using namespace std;
void topicCallBack(const sensor_msgs::PointCloud2::ConstPtr&msg)
{
cout<< msg->header;
cout<< msg->height;
cout<< msg->width;
cout<< msg->point_step;
}
int main(int argc, char **argv)
{
ros::init(argc, argv,"parser");
ros::NodeHandle nh;
//intializing the subscriber
ros::Subscriber sub = nh.subscribe(argv[3],1000,topicCallBack);
ros::spin();
return 0;
}
On running the rosnode
rosrun gmm parser "/camera/depth/points"
I get this error
terminate called after throwing an instance of 'ros::InvalidNameException'
what(): Character [=] at element [14] is not valid in Graph Resource Name [XDG_SESSION_ID=c2]. Valid characters are a-z, A-Z, 0-9, / and _.
Aborted (core dumped)
How do I pass my input argument ?
Thanks!
↧
How to pass topic names as input argument in the command line terminal?
Hello !
I have a problem that states "Read a rosbag, to parse a topic, that is passed as an input argument"
How do I pass the input argument using "rosrun" in the command line terminal?
My code snippet:
#include
#include i
#include
using namespace std;
void topicCallBack(const sensor_msgs::PointCloud2::ConstPtr&msg)
{
cout<<"Reading message of type PointCloud2\n"<header;
if(msg->width)
cout<< "\nInpoint Cloud\nwidth is"<width;
//THIS LINE WILL NOT WORK AS MSG IS OF TYPE POINT CLOUD
if(msg->transforms.transform.translation)
cout<< " reading message of type TF\n";
}
int main(int argc, char **argv)
{
ros::init(argc, argv,"parser");
ros::NodeHandle nh;
//intializing the subscriber
ros::Subscriber sub = nh.subscribe("/camera/depth/points",1000, topicCallBack);
ros::spin();
return 0;
}
Here I have given my topic name as "/camera/depth/points" which publishes the message of type sensor_msgs/PointCloud2. But in my command line terminal, if I pass the topic name as "/tf", how do I ask it to publish the message of type tf/tfMessage because the subscriber is of type PointCloud2?
In total, I have three topics that publish messages of type PointCloud2, tf, odom messages. But I am not able to see, how to pass different topic names in the command line argument and publish the respective message type
Thanks!
↧
How to run nodelet as standalone with rosparams?
Good morning all,
I currently have a nodelet that I would like to debug using the following command:
"*rosrun nodelet nodelet standalone pkg/Type*"
or just
"./ros_mods/nodelet/bin/nodelet standalone pkg/Type"
but I am having problems with the initialisation of all my ROS parameters.
What I would like to do is replicate an experiment I logged as a rosbag file, along with a rosparam dump file. I originally tried simply to load the parameters from the dump file (using "*rosparam load < dump file >.yaml*") then run the nodelet and play the rosbag content.
Now, the nodelet runs without problems and receives the ROS msgs from the rosbag but the rosparams, although loadad an visible when using "*rosparam list*", are not found by the nodelet. What am I doing wrong? I checked my ROS namespace but everything seemed to be in order. The rosparams (when listed) look identical to when I originally made the experiment and loaded them from a configuration file.
Thank you for your help!
-A
↧
↧
please create subscriber to the marker (warn)
i did:
rosrun using_markers basic_shapes
and got the warning:
please create a subscriber to the marker
I dont get it i want to create the basic shapes in rviz and i dont noe whats going on
↧
roslaunch error , rplidar
From this part, I have several error.
When I input this,
$ roslaunch rplidar_ros rplidar.launch
it shows
[rplidar.launch] is neither a launch file in package [rplidar_ros] nor is [rplidar_ros] a launch file name
The traceback for the exception was written to the log file
However, if I input
ubuntu@ubuntu:~/catkin_ws$ source /home/ubuntu/catkin_ws/devel/setup.bash
ubuntu@ubuntu:~/catkin_ws$ roslaunch rplidar_ros rplidar.launch
... logging to /home/ubuntu/.ros/log/687ff54e-e312-11e6-a5f7-0022cffa2d4b/roslaunch-ubuntu-7014.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:54487/
SUMMARY
========
PARAMETERS
* /rosdistro: indigo
* /rosversion: 1.11.20
* /rplidarNode/angle_compensate: True
* /rplidarNode/frame_id: laser
* /rplidarNode/inverted: False
* /rplidarNode/serial_baudrate: 115200
* /rplidarNode/serial_port: /dev/ttyUSB0
NODES
/
rplidarNode (rplidar_ros/rplidarNode)
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
process[rplidarNode-1]: started with pid [7032]
RPLIDAR running on ROS package rplidar_ros
SDK Version: 1.5.7
Error, cannot bind to the specified serial port /dev/ttyUSB0.
[rplidarNode-1] process has died [pid 7032, exit code 255, cmd /home/ubuntu/catkin_ws/devel/lib/rplidar_ros/rplidarNode __name:=rplidarNode __log:=/home/ubuntu/.ros/log/687ff54e-e312-11e6-a5f7-0022cffa2d4b/rplidarNode-1.log].
log file: /home/ubuntu/.ros/log/687ff54e-e312-11e6-a5f7-0022cffa2d4b/rplidarNode-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
↧
Stdout for a subprocess when launching with --screen
I have the following three lines buried within a node (let's call it `network_scanner.py`):
cmd = ["sudo", "iwlist", "wlan0", "scan"]
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
iwlist_output = proc.communicate()[0].decode('utf-8')
If I call my launch file (`roslaunch network_scanner network_scanner.launch --screen`), `iwlist_output` is completely empty.
If I run the node directly (`rosrun network_scanner network_scanner.py`), I get expected output in `iwlist_output`.
I'm assuming the problem is that `proc` is unable to provide output to `stdout` for some reason when I `roslaunch` my node. Shouldn't `--screen` fix that?
Edit: Question assumed that there was an issue with `stdout`, but that wasn't the issue. The problem was that `cmd` wasn't being properly called because of permissions. [This post](http://answers.ros.org/question/165246/launch-node-with-root-permissions/) provides a solution.
↧