Ask Your Question
0

Launch files: How to call rosaria and transforms

asked 2016-02-26 04:02:20 -0600

DanThe gravatar image

Hi all,

I created a launch file to perform autonomous navigation with the robot. The launch file's contents can be seen below:

###launching rviz###
  <node name="rviz" pkg="rviz" type="rviz" />

###start laser###
  <node pkg="sicktoolbox_wrapper" type="sicklms" name="sicklms" output="screen">
  <param name="port" value="/dev/ttyS1"/>
  <param name="inverted" value="true"/>
  </node>

###get map###
  <node pkg="map_server" type="map_server" name="map_server" args="/home/powerbot67/FacultyGNDFloorMapDan.yaml"/>

###RosAria###
  <node pkg="rosaria" type="RosAria" name="RosAria" output="screen" args="/home/powerbot67/catkin_ws/src" >
  <param name="port" value="/dev/ttyS0"/>
  <param name="DriftFactor" value="-20"/>
  <param name="TicksMM" value="115"/>
  </node>

</launch>

To launch rosaria and transforms, I usually run the following commands succesfully in 2 separate terminals:

cd ~/catkin_ws
source ./devel/setup.bash
rosrun rosaria RosAria _port:=/dev/ttyS0 _DriftFactor:=-20 _TicksMM:=115

cd ~/transform_ws
source ./devel/setup.bash
rosrun transform transform

However, when I try to run rosaria using the launch file mentioned, I get the following error:

ERROR: cannot launch node of type [rosaria/RosAria]: rosaria ROS path [0]=/opt/ros/hydro/share/ros ROS path [1]=/home/powerbot67/ros/eband_local_planner ROS path [2]=/home/powerbot67/ros/sbpl_lattice_planner ROS path [3]=/home/powerbot67/hydro/sandbox ROS path [4]=/opt/ros ROS path [5]=/opt/ros/hydro/share ROS path [6]=/opt/ros/hydro/stacks

Any ideas as to why this is happening? How should I call transforms in this launch file? I would appreciate any help.

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-03-04 09:01:00 -0600

ReedHedges gravatar image

Hello, it looks like roslaunch is unable to find the RosAria node in its ROS search path. Did you source devel/setup.bash before running roslaunch? (Same as you do before using rosrun)

edit flag offensive delete link more

Comments

Thanks for your reply. What should I add to the launch file in order to source devel/setup.bash ?

DanThe gravatar imageDanThe ( 2016-03-07 15:51:45 -0600 )edit

Just in case, someone has the same problem: Adding the launch file to the catkin_ws folder and then typing the following commands solves the issue:

cd ~/catkin_ws source ./devel/setup.bash roslaunch Navigation.launch

Thanks all

DanThe gravatar imageDanThe ( 2016-03-23 06:27:20 -0600 )edit

@DanThe That's not the best way to go about it. It's pretty common to source the workspace from your ~/.bashrc file then use roslaunch to launch it from the package. If you do things differently from the "ROS way" then you start making it harder to share your work and for others to use it.

jayess gravatar imagejayess ( 2017-06-20 14:21:04 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-02-26 04:02:20 -0600

Seen: 237 times

Last updated: Mar 04 '16