Hello,
I need some help.
I am trying to move a P3 AT with Rosaria.
I have installed ROS groovy on Ubuntu 12.04
First of all i am starting roscore
at the base machine. Then i am starting RosAria with
rosrun rosaria RosAria
then i am getting:
seminar@pioneer:~$ rosrun ROSARIA RosAria
[ INFO] [1381931112.785472031]: RosAria: using port: [/dev/ttyUSB0]
Could not connect to simulator, connecting to robot through serial port /dev/ttyUSB0.
Syncing 0
Syncing 1
Syncing 2
Connected to robot.
Name: Hagen_1931
Type: Pioneer
Subtype: p3at
ArConfig: Config version: 2.0
Loaded robot parameters from p3at.p
ArRobotConnector: Connecting to MTX batteries (if neccesary)...
ArRobotConnector: Connecting to MTX sonar (if neccesary)...
[ INFO] [1381931113.571203537]: Setting TicksMM from ROS Parameter: 1
[ INFO] [1381931113.578212915]: Setting DriftFactor from ROS Parameter: 0
[ INFO] [1381931113.585235919]: Setting RevCount from ROS Parameter: 16570
[ INFO] [1381931113.620352721]: RosAria: publishing new recharge state -1.
[ INFO] [1381931113.621532616]: RosAria: publishing new motors state 0.
[ INFO] [1381931113.664051599]: RosAria: publishing new motors state 1.
Now I want to move the robot. I have tried the command in another terminal
rostopic pub -1 /RosAria/cmd_vel geometry_msgs/Twist '{linear: {x: 0.1, y: 0.0, z: 0.0}, angular: {x: 0.0, y: 0.0, z: 0.0}}'
There is no error but he do not move. here whats rostopic list is saying.
rostopic list
/RosAria/battery_recharge_state
/RosAria/battery_state_of_charge
/RosAria/battery_voltage
/RosAria/bumper_state
/RosAria/cmd_vel
/RosAria/motors_state
/RosAria/parameter_descriptions
/RosAria/parameter_updates
/RosAria/pose
/RosAria/sonar
/rosout
/rosout_agg
/tf
I have tried also a little this code:
#include <ros/ros.h>
#include "geometry_msgs/Twist.h"
using geometry_msgs::Twist;
using namespace std;
const double TWIST_LINEAR = 0.5; //.5 m/s forward
const double TWIST_ANGULAR = 0; //0 rad/s
int main(int argc, char **argv)
{
ros::init(argc, argv, "test");
ros::NodeHandle n;
ros::Publisher cmd_pub = n.advertise<geometry_msgs::Twist>("/cmd_vel", 100);
ros::Rate loop_rate(10);
while (ros::ok())
{
geometry_msgs::Twist cmd_msg;
cmd_msg.linear.x = TWIST_LINEAR;
cmd_msg.angular.z = TWIST_ANGULAR;
cmd_pub.publish(cmd_msg);
ros::spinOnce();
loop_rate.sleep();
}
return 0;
}
I just want to unterstand how I can move the Robot. I think I have installed ROSARIA correct and the local machine communicates with the base correct. Thank you very much. I would be very thankful for help.
Best Regards Arthur
Originally posted by Arthur89 on ROS Answers with karma: 1 on 2013-10-16
Post score: 0