ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how to move Pioneer 3 AT with ROSARIA

asked 2013-10-16 04:38:49 -0600

Arthur89 gravatar image

updated 2014-01-28 17:18:15 -0600

ngrennan gravatar image

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

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
1

answered 2013-10-17 04:58:55 -0600

ReedHedges gravatar image

updated 2013-10-18 07:56:23 -0600

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.

edit flag offensive delete link more

Comments

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

Arthur89 gravatar image Arthur89  ( 2013-10-17 07:50:15 -0600 )edit

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.

ReedHedges gravatar image ReedHedges  ( 2013-10-17 07:51:45 -0600 )edit

I can change the RevCount to max. 32760 with dynamic reconfigure. Edit: it works. i can move it :-) thank you very much

Arthur89 gravatar image Arthur89  ( 2013-10-18 02:27:47 -0600 )edit
1

answered 2013-10-16 06:31:19 -0600

Dereck gravatar image

updated 2013-10-16 06:47:10 -0600

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?

edit flag offensive delete link more

Comments

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

Arthur89 gravatar image Arthur89  ( 2013-10-17 04:20:15 -0600 )edit

can you control it from the aria 'demo' application? Info found in the P3DX manual @ http://robots.mobilerobots.com/wiki/Manuals

Dereck gravatar image Dereck  ( 2013-10-17 04:32:54 -0600 )edit

yes I can control it with the keyboard without a problem.

Arthur89 gravatar image Arthur89  ( 2013-10-17 04:42:44 -0600 )edit

could you try an older version of the rosaria driver for me? @ https://github.com/amor-ros-pkg/rosaria/tree/dd589b03477662072c5ea520607c638296fda750

Dereck gravatar image Dereck  ( 2013-10-17 04:50:30 -0600 )edit

yes i will try it.

Arthur89 gravatar image Arthur89  ( 2013-10-17 04:57:07 -0600 )edit

[ 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

Arthur89 gravatar image Arthur89  ( 2013-10-17 07:41:28 -0600 )edit

the robot still does not move. now i cant see the motor state. Do i have to enable the motor?

Arthur89 gravatar image Arthur89  ( 2013-10-17 07:42:18 -0600 )edit

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.

Dereck gravatar image Dereck  ( 2013-10-17 08:04:52 -0600 )edit
0

answered 2014-01-19 08:13:00 -0600

Wojciech gravatar image
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2013-10-16 04:38:49 -0600

Seen: 4,246 times

Last updated: Jan 19 '14