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

rostopic - command to set the trajectory #37

Closed
Nelson89 opened this issue Dec 10, 2020 · 1 comment
Closed

rostopic - command to set the trajectory #37

Nelson89 opened this issue Dec 10, 2020 · 1 comment
Assignees
Labels
type: question Further information is requested

Comments

@Nelson89
Copy link

Hello,

I'm trying to master the drone control using ROS and gazebo. I would like to take control using rostopic. Now I can get this by setting angular velocities. I would like to do this by designating a point in space.

If I use:
$ roslaunch bebop_simulator multiple_bebop_without_controller.launch

I can see the options available to control the angular velocities.

$ rostopic list
...
/bebop_2/bebop2/command/motors
...

I can change angular velocities of motor with command:
$ rostopic pub bebop_2/bebop2/command/motors mav_msgs/Actuators '{angular_velocities: [1000, 1000, 1000, 1000]}'

It works.

I have problem, when I will set a trajectory.
If I run:
$ roslaunch bebop_simulator multiple_task2_world.launch

I can see the option available to control a trajectory:

$ rostopic list
...
/bebop_2/bebop2/command/motors
/bebop_2/bebop2/command/trajectory
...

This is my problem: In place of the question marks, I do not know what header to insert, what values and in what order.
$ rostopic pub bebop_2/bebop2/command/trajectory trajectory_msgs/MultiDOFJointTrajectory ????

The primary problem is I don't know how to check things like this? It should be in the documentation or it is somewhere in the code?

@Nelson89
Copy link
Author

Nelson89 commented Dec 11, 2020

I have found solution. This issue was very helpful.
I used this command to set a new position of drone in space:

$ roslaunch bebop_simulator multiple_task2_world.launch

$ rostopic pub bebop_3/bebop3/command/trajectory trajectory_msgs/MultiDOFJointTrajectory "joint_names: [base_link]
points: [transforms: [translation: [x, y, z]]]"

I think it would be a good idea to add this to the readme in the Basic Usage section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants