-
Notifications
You must be signed in to change notification settings - Fork 205
Execute test_high_level.py in launch file #170
Comments
If you run a launch file, the current working directory is different. You can, e.g., change the file path to an absolute path to avoid this error. |
Hi, whoenig, thanks for your help. I succeed launch file by changing file path to an absolute path. For my next purpose, I want add a rosbag node into launch file with test_high_level.py node together. The launch file likes this: launch <node name="move" pkg="crazyflie_demo" type="test_high_level.py" <node pkg="rosbag" type="record" name="rosbag_record_test" <launch But the error occur: If I only execute rosbag node in launch, it works well: |
Looks to me like you had a typo (additional [) in your first launch file? |
Hi all, I trying to execute test_high_level.py and rosbag command in launch file together after I roslaunch external_position_vicon.launch. I write a test_high_level.launch file like this:
But when I launch this file after launching external_position_vicon.launch: the error occurs:
process[move-1]: started with pid [2688]
Traceback (most recent call last):
File "/home/hc/cf_ws/src/crazyflie_ros/crazyflie_demo/scripts/test_high_level.py", line 29, in
traj1.loadcsv("takeoff.csv")
File "/home/hc/cf_ws/src/crazyflie_ros/crazyflie_demo/scripts/uav_trajectory.py", line 93, in loadcsv
data = np.loadtxt(filename, delimiter=",", skiprows=1, usecols=range(33))
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 962, in loadtxt
fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/_datasource.py", line 266, in open
return ds.open(path, mode, encoding=encoding, newline=newline)
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/_datasource.py", line 624, in open
raise IOError("%s not found." % path)
IOError: takeoff.csv not found.
If I run python test_high_level.py. everything goes well.
The text was updated successfully, but these errors were encountered: