qboticslabs / ros_robotics_projects

Example codes of new book ROS Robotics Projects
http://rosrobots.com
317 stars 214 forks source link

chapter 3 error with aiml_server process dies #20

Closed andrpana closed 4 years ago

andrpana commented 4 years ago

started roslaunch server http://ros-HP-Pro-3130-Microtower-PC:39855/

SUMMARY

PARAMETERS

NODES / aiml_client (ros_aiml/aiml_client.py) aiml_server (ros_aiml/aiml_server.py)

ROS_MASTER_URI=http://localhost:11311

process[aiml_server-1]: started with pid [13045] process[aiml_client-2]: started with pid [13046]

Enter your text :> /home/catkin_ws/src/ros_aiml/data Traceback (most recent call last): File "/home/ros/catkin_ws/src/ros_aiml/scripts/aiml_server.py", line 54, in load_aiml('startup.xml') File "/home/ros/catkin_ws/src/ros_aiml/scripts/aiml_server.py", line 22, in load_aiml os.chdir(data_path) OSError: [Errno 2] No such file or directory: '/home/catkin_ws/src/ros_aiml/data' [aiml_server-1] process has died [pid 13045, exit code 1, cmd /home/ros/catkin_ws/src/ros_aiml/scripts/aiml_server.py __name:=aiml_server __log:=/home/ros/.ros/log/354d530e-5e36-11ea-8105-6c626ddb86cd/aiml_server-1.log]. log file: /home/ros/.ros/log/354d530e-5e36-11ea-8105-6c626ddb86cd/aiml_server-1*.log

below is the log file of aiml_server-1.log

[rospy.client][INFO] 2020-03-04 18:36:16,733: init_node, name[/aiml_server], pid[12262] [xmlrpc][INFO] 2020-03-04 18:36:16,734: XML-RPC server binding to 0.0.0.0:0 [xmlrpc][INFO] 2020-03-04 18:36:16,734: Started XML-RPC server [http://ros-HP-Pro-3130-Microtower-PC:32909/] [rospy.init][INFO] 2020-03-04 18:36:16,734: ROS Slave URI: [http://ros-HP-Pro-3130-Microtower-PC:32909/] [rospy.impl.masterslave][INFO] 2020-03-04 18:36:16,734: _ready: http://ros-HP-Pro-3130-Microtower-PC:32909/ [rospy.registration][INFO] 2020-03-04 18:36:16,735: Registering with master node http://localhost:11311 [xmlrpc][INFO] 2020-03-04 18:36:16,735: xml rpc node: starting XML-RPC server [rospy.init][INFO] 2020-03-04 18:36:16,835: registered with master [rospy.rosout][INFO] 2020-03-04 18:36:16,835: initializing /rosout core topic [rospy.rosout][INFO] 2020-03-04 18:36:16,839: connected to core topic /rosout [rospy.simtime][INFO] 2020-03-04 18:36:16,842: /use_sim_time is not set, will not subscribe to simulated time [/clock] topic [rospy.core][INFO] 2020-03-04 18:36:16,852: signal_shutdown [atexit] [rospy.impl.masterslave][INFO] 2020-03-04 18:36:16,855: atexit [rospy.client][INFO] 2020-03-04 18:39:43,146: init_node, name[/aiml_server], pid[13045] [xmlrpc][INFO] 2020-03-04 18:39:43,146: XML-RPC server binding to 0.0.0.0:0 [xmlrpc][INFO] 2020-03-04 18:39:43,147: Started XML-RPC server [http://ros-HP-Pro-3130-Microtower-PC:38156/] [rospy.init][INFO] 2020-03-04 18:39:43,147: ROS Slave URI: [http://ros-HP-Pro-3130-Microtower-PC:38156/] [rospy.impl.masterslave][INFO] 2020-03-04 18:39:43,147: _ready: http://ros-HP-Pro-3130-Microtower-PC:38156/ [rospy.registration][INFO] 2020-03-04 18:39:43,148: Registering with master node http://localhost:11311 [xmlrpc][INFO] 2020-03-04 18:39:43,148: xml rpc node: starting XML-RPC server [rospy.init][INFO] 2020-03-04 18:39:43,247: registered with master [rospy.rosout][INFO] 2020-03-04 18:39:43,248: initializing /rosout core topic [rospy.rosout][INFO] 2020-03-04 18:39:43,252: connected to core topic /rosout [rospy.simtime][INFO] 2020-03-04 18:39:43,255: /use_sim_time is not set, will not subscribe to simulated time [/clock] topic [rospy.core][INFO] 2020-03-04 18:39:43,266: signal_shutdown [atexit] [rospy.impl.masterslave][INFO] 2020-03-04 18:39:43,269: atexit

when i check the ros topics im getting only
/chatter /rosout /rosout_agg please help

qboticslabs commented 4 years ago

Hello

Make sure you have the data folder in the following location '/home/catkin_ws/src/ros_aiml/data, please check the launch file if you want to change the location of data folder

andrpana commented 4 years ago

is in the right location

andrpana commented 4 years ago

i copied all the files from your tutorials and modified them . it builds normally but im stuck on this point

andrpana commented 4 years ago

File "/home/ros/catkin_ws/src/ros_aiml/scripts/aiml_server.py", line 22, in load_aiml os.chdir(data_path) it was a silly mistake i forgot the usr in the path so its /home/ros/catkin_ws/src/ros_aiml/data