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

problem of executing the planning #23

Open
benbenji opened this issue Dec 19, 2017 · 4 comments
Open

problem of executing the planning #23

benbenji opened this issue Dec 19, 2017 · 4 comments

Comments

@benbenji
Copy link

benbenji commented Dec 19, 2017

Dear professor Wiselby:
I ran your code in my computer(ubuntu 14.04 indigo) but I face a new problem.The plan of moveit! is ok.The trail can appear in the rviz like this picture.
rviz_quad
But after I clicked execute button,the rviz showed the planning is executed but nothing happened in gazebo like this picture,and the status of the robot did not update.
gaze_quaz
The terminal aslo showed the execution is successful.
terminal
the rqt_graph is as this picture
rosgraph_quaz
this is another error "[ERROR] [1513682297.860795914]: Couldn't open joystick /dev/input/js0. Will retry every second." I don't have a joystick so I just ignore it.the "/multi_dof_joint_trajectory_action/goal" can be printed when I clicked execute and "/multi_dof_joint_trajectory_action/result" is
"header: ###
seq: 1
stamp:
secs: 354
nsecs: 285000000
frame_id: ''
status:
goal_id:
stamp:
secs: 352
nsecs: 661000000
id: /move_group-2-352.661000000
status: 3
text: ''
result:
error_code: 0
---"
However,I found the "/cmd_vel" which is published by action_controller is empty.on the contrary .The "/cmd3d_nav" have content as
" x: 0.0
y: 0.0
z: 0.0
acceleration:
x: 0.0
y: 0.0
z: 0.0
jerk:
x: 1.0
y: 0.0
z: 0.0
snap:
x: 0.0
y: 0.0
z: 0.0
yaw: 1.52000000044
yaw_rate: 0.0
---"
The "/cmd_3dnav"'s info is shown as follow
"Type: mav_msgs/CommandTrajectory

Publishers:

  • /action_controller

Subscribers:

  • /quad/waypoint_node
  • /rostopic_27482_1513690395456 "
    I checked rqt_consale but I found no info from "waypoint_node",I only found this info from waypoint.
    "[ INFO] [1513695317.625598203]: Waypoint_publisher_node Paramters Initialized."
    even if I clicked execute ,no info from waypoint showed.
    That really confuses me.Would you please tell me what may cause this problem or how to debug it?I'm a ROS novice and I'm not very proficient at using and debugging moveit!.Thank you very much.
@wilselby
Copy link
Owner

You need to enable the mode that reads in the computed trajectory. You should first enable GPS mode. This is currently done by pressing "B" on the Xbox. After that you can launch the quad with "A." When you execute the trajectory, then you need to press "LB." This is all on an Xbox controller but you can edit this in the following file:

https://github.com/wilselby/ROS_quadrotor_simulator/blob/master/quad_joystick_interface/src/joy.cpp

Hope that helps!

@benbenji
Copy link
Author

Thank you professor.I know the problem,I will try as your word,best wish! @wilselby

@Yogi30
Copy link

Yogi30 commented Jul 25, 2018

@benbenji how did you do that ?
I'm stuck at the same point.

@KenanA17
Copy link

KenanA17 commented Mar 11, 2020

It might be late, but someone might still want this. I found a workaround. You can simulate joystick through ROS topic "/quad/joy", since this is where the joystick message would go if you had used one. You just need to send the right ROS topic message that would simulate "B" and "LB" buttons from joystick, i.e. open a new command line window and publish this message ("B"):

rostopic pub /quad/joy sensor_msgs/Joy "header:
seq: 0
stamp:
secs: 0
nsecs: 0
frame_id: ''
axes:
- 0
buttons:
- 1"

Now you stop publishing previous message and publish a new one ("LB"):

rostopic pub /quad/joy sensor_msgs/Joy "header:
seq: 0
stamp:
secs: 0
nsecs: 0
frame_id: ''
axes:
- 0
buttons:
- 4"

Number 1 means B, and number 4 means LB. You can use this method to simulate other possible joystick commands. Conversions can be found here http://wiki.ros.org/joy.

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

4 participants