0
$\begingroup$

Rosanswers logo

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

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

You have a P3AT-H8 with AROS (See "Type: Pioneer; Subtype: p3at" in the output). The manual for this robot is http://robots.mobilerobots.com/docs/all_docs/P3-P2H8OpMan3.pdf

For a p3at h8, TicksMM should be 132, RevCount should be 36300, DriftFactor should be 0. You can set these when launching the node with rosrun, or use rosparam, or change using dynamic reconfigure.

Yes, also try it with ARIA demo to make sure the robot itself works with ARIA.

The problem with these calibration factors set incorrectly is a bug currently in rosaria right now. You could use the earlier version linked by Dereck, or my hacked version: https://github.com/reed-adept/rosaria.git or you could just remove the readParameters() function from src/rosaria/RosAria.cpp. This is just a hack, the problem will be fixed differently in the main amor-ros-pkg version sometime soon.


Originally posted by ReedHedges with karma: 821 on 2013-10-17

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Arthur89 on 2013-10-17:
I set the RevCount in the Rosaria.cfg to 36300 but it is still showing me 16570. TicksMM at 132. i am gonna try your hacked version tomorow. Thanks for your help

Comment by ReedHedges on 2013-10-17:
Use rosparam or the dynamic reconfigure panel in rqt to change the parameters. src/rosaria/cfg/RosAria.cfg is input to a code generator used when building RosAria, and the default values there are not actually used in RosAria.

Comment by Arthur89 on 2013-10-18:
I can change the RevCount to max. 32760 with dynamic reconfigure. Edit: it works. i can move it :-) thank you very much

$\endgroup$
0
$\begingroup$

Rosanswers logo

This appears to be mis-configured:

[ INFO] [1381931113.571203537]: Setting TicksMM from ROS Parameter: 1

Try setting this value to something like 160 or so and see if that helps.

Your first attempt to send the command via rostopic pub ... is the best way to test at first. Perhaps set a higher velocity such as 0.3, my robots don't seem to move when the speed is too low.

Did you try to send a rotation command as well?


Originally posted by Dereck with karma: 1070 on 2013-10-16

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by Arthur89 on 2013-10-17:
Thank you for your reply. I have changed the TicksMM to 128 in the rosaria.cfg [ INFO] [1382018958.887692632]: Setting TicksMM from ROS Parameter: 128 but the Pioneer does not move. I have also tried a higher velocity. rotation does not work either. Another idea? Thanks for the help

Comment by Dereck on 2013-10-17:
can you control it from the aria 'demo' application?

Info found in the P3DX manual @ http://robots.mobilerobots.com/wiki/Manuals

Comment by Arthur89 on 2013-10-17:
yes I can control it with the keyboard without a problem.

Comment by Dereck on 2013-10-17:
could you try an older version of the rosaria driver for me? @ https://github.com/amor-ros-pkg/rosaria/tree/dd589b03477662072c5ea520607c638296fda750

Comment by Arthur89 on 2013-10-17:
yes i will try it.

Comment by Arthur89 on 2013-10-17:
[ INFO] [1382031498.221348927]: RosAria: Accelerations reconfigure request: Translational accel: 0.000000, decel: 0.000000 Lateral accel: 0.000000, decel: 0.000000 Rotational accel: 0.000000, decel: 0.000000 ArRobot: setTransAccel of 0 is below 0, ignoring it ArRobot: setTransDecel of 0 is below 0, ignoring it ArRobot: setLatAccel of 0 is below 0, ignoring it ArRobot: setLatDecel of 0 is below 0, ignoring it ArRobot: setRotAccel of 0 is below 0, ignoring it ArRobot: setRotDecel of 0 is below 0, ignoring it

Comment by Arthur89 on 2013-10-17:
the robot still does not move. now i cant see the motor state. Do i have to enable the motor?

Comment by Dereck on 2013-10-17:
The motor should be activated when you launch RosAria. There is certainly something funky going on here.... try to insert some debug statements into the rosaria cmd_vel callback function and make sure that you are getting the topic data as expected.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.