p2os groovy C++ Velocity and C++ Pose Listener [closed]
We need help in compiling the test sketches for listening and sending information to the robot from the tutorial http: //www. ros. org/wiki/p2os-vanderbilt/Tutorials
.
How to set the dependencies and set the right paths to header files? Will it be enough to compile them with g++ and then start it using the line from the Tutorial rosrun p2osTutorial eo_pose
. But what is the p2osTutorial? Is it some package, from which the compiled file will be started?
We have created p2osTutorials package and C++ listener works correctly.
Unfortunately C++ velocity doesn't make the robot move. The first problem was solved adding the line ros::init(argc, argv, "velo");
to the file, but the robot still didn't move. We build the driving file the same way as the pose file (just added a new velo.cc file to the p2osTutorial/src) and edited the CMakeList.txt. I think we are doing something wrong?
Thanks for your answer. We compiled it the normal way but it seems that the cmd_pub.publish(cmd_msg);
line does not move the robot
When we start the node we printed out the cmd_msg it looks fine to us (robot should move). linear: x: 0.5 y: 0 z: 0 angular: x: 0 y: 0 z: 0
After looking at the tutorials (again ;) with the new informations that we have now) i can see that the code from your tutorial C++ Velocity is almost the same. I guess we still have any problems in our dependencies or something like that.
Thanks and regards
Thank you for the fast anwser and sorry that we did not tell this the motors are enabled and the robot drives over the simple commandline like: rostopic pub /cmd_vel geometry_msgs/Twist -r 10000 '[1, 0, 0]' '[0, 0, 0]'
in the scenario we try to test the C++ Velocity program we can not "move" the robot because the weels are "blocked"
or do we need to enable the motors in the way you actually described
Thanks again
Thank you for the tutorial, it worked fine everything could be compiled and also the program starts. The motors are enabled by the enableMotor command. But the robot won't drive neither with the GUI_Command nor with the C++ Velocity program. We see that some kind of data is send in the output of the terminals. The question is if this is a ROS problem or is something missing that is essentially is needed to drive with the robot.
Thanks and regards
We will geht with the ropstopic list:
- /aio /base_controller/command /battery_state /cmd_motor_state /cmd_vel /diagnostics /dio /gripper_control /gripper_state /motor_state /pose /ptz_control /ptz_state /rosout /rosout_agg /sonar /tf
C++ Velocity and echo_pose is active (p2os driver and so on also). I hope there is something in this list that is missing...
Thanks
http://oi43.tinypic.com/2dmgt3l.jpg (image description)
I hope this will clear things up thank you gain
sorry found out that there is another mode and i can see where the problem ...
hm... That's odd. Why don't you try using the gui_command program? Just rosmake it and see if you can control it. It's in the vanderbilt-ros-pkg.
do a rostopic list and post the output for me
Hm... Ok. Now do an rxgraph and post the screenshot. (sudo apt-get install rox-groovy-rxgraph)
After you install it, just run the command "rxgraph" with no rosrun in front of it.
By the way, feel free to just email me if you have p2os specific questions: hunter.allen@vanderbilt.edu
This is entirely my fault. You were publishing to the wrong topic... You need to publish to "/cmd_vel." Check the code I put in my answer.
Also, do a git pull in the root of the vanderbilt-ros-pkg. I forgot to change that code back, so I have been doing that on the wrong topic as well. It should work now. So sorry for that.
Thanks no problem in the meantime i figured it even out by myself ;) (the /cmd_vel problem) and finally got to drive it :) the rxgraph is a really good thing thanks for that. Now i hope we can finally start with our project :). Thank you very much for the help.