Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move command not working as explained #58

Open
ahar opened this issue Apr 28, 2018 · 1 comment
Open

Move command not working as explained #58

ahar opened this issue Apr 28, 2018 · 1 comment

Comments

@ahar
Copy link

ahar commented Apr 28, 2018

I want P3-DX to move 2000mm in forward direction. So, within rosaria.cpp in the following function I added one extra line within cmdvel_cb callback.

ArRobot robot;
void RosAriaNode::cmdvel_cb( const geometry_msgs::TwistConstPtr &msg)
{
robot->move(2000);
}

But the robot does not move in the same speed for 2000mm. Instead it moves much faster than commanded velocity and does not stop after 2000m. Can anybody point out the mistake that I am making?

thanks,

@reedhedges
Copy link
Contributor

reedhedges commented Dec 6, 2018

You can't really use velocity control and position control simultaneously in ARIA. If you have any cmd_vel publisher active it will certainly not work. (The speed that the robot uses for the MOVE command is a preset max speed.)

To do it well in ROSARIA, a concept of control mode or state needs to be implemented using a ROS "action server". For an example of how this might be done, see the ros-arnl project: https://github.com/MobileRobots/ros-arnl/blob/master/rosarnl_node.cpp#L81 However, instead of using ArServerModeJogPosition, we would want to use ArRobot directly (move(), isMoveDone() or our own checking, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants