How can I correct the problem in a simple question 2 [closed]
I learnt rosignite in these days, I don't know how to correct the problems. Slogan of the question: Create a package that launches the code. Modify the code in order to print the odometry of the robot. 1. The odometry of the robot is published by the robot into the /odom topic. 2. You will need to figure out what message uses the /odom topic, and how the structure of this message is.
odom_subscriber.py import rospy from nav_msgs.msg import Odometry
def callback(msg): print msg.data
rospy.init_node('odom_sub_node') sub = rospy.Subscriber('/odom',Odometry,callback) rospy.spin()
odom_subscriber.launch <launch> <node pkg="exercise22" type="odom_subscriber.py" name="odom_sub_node" output="screen"> </node> </launch>
Problem: user:~$ roslaunch exercise_22 odom_subscriber.launch ... logging to /home/user/.ros/log/d040bc5e-6476-11e8-88f0-065a2c6c1cb0/roslaunch-ip-172-31-47-59-20167.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://10.8.0.1:37393/
SUMMARY
PARAMETERS * /rosdistro: kinetic * /rosversion: 1.12.12
NODES / odom_sub_node (exercise22/odom_subscriber.py)
ROS_MASTER_URI=http://10.8.0.1:11311
ERROR: cannot launch node of type [exercise22/odom_subscriber.py]: exercise22 ROS path [0]=/opt/ros/kinetic/share/ros ROS path [1]=/home/user/catkin_ws/src ROS path [2]=/home/simulations/public_sim_ws/src ROS path [3]=/opt/ros/kinetic/share No processes to monitor shutting down processing monitor... ... shutting down processing monitor complete
Wait, is this a learning exercise question?
Please use the "preformatted text" button (marked
101010
) to format the output in your question so that it is readable.Yes, it is in ros ignite exercise 2.2, but I can't configure the question up to now.
Sorry, I didn't know the meaning of 101010 button before.