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

Unable to control motors with joystick input #167

Closed
bholden1 opened this issue Nov 19, 2014 · 4 comments
Closed

Unable to control motors with joystick input #167

bholden1 opened this issue Nov 19, 2014 · 4 comments

Comments

@bholden1
Copy link

Hi! I am using MAVROS to try and control my pixhawk with a joystick. I have been running:

roslaunch mavros_extras teleop.launch

This will set up communication with qgroundcontrol and the pixhawk. When I run this I can arm and disarm the motors with my joystick, but nothing I do changes the motor speed. I can use a RC controller to change the motor speeds, but the motors never respond to the joystick inputs. I've monitored the messages in ROS and it looks like MAVROS is receiving the correct things, but something is wrong in the communication between MAVROS and the pixhawk. I looked at previous issues and saw Issue #133 and about halfway down in that thread vooon stated:

Perhaps PX4 don't handle RC override messages, i can't find handler for
MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE message.

Is that still true or am I doing something wrong?

Thanks for any help,

Ben

My launch files are below in case they are relevant.

My teleop.launch file looks like:

<launch>
    <!-- vim: ft=xml -->
    <!-- mavteleop example launch script -->

    <include file="$(find mavros)/launch/px4.launch" />

    <arg name="teleop_args" default="-att" />
    <!-- <arg name="teleop_args" default="-rc" /> -->
    <!-- <arg name="teleop_args" default="-vel" /> -->
    <!-- <arg name="teleop_args" default="-pos" /> -->

    <node pkg="joy" type="joy_node" name="joy" required="True">
        <param name="autorepeat_rate" value="10" /> <!-- Minimal update rate, Hz -->
    </node>

    <node pkg="mavros_extras" type="mavteleop" name="mavteleop" args="$(arg teleop_args)" required="True" output="screen">
        <rosparam command="load" file="$(find mavros_extras)/launch/f710_joy.yaml" />
    </node>
</launch>

And my px4.launch file looks like:

<launch>
    <!-- vim: ft=xml -->
    <!-- Launch script for PX4 based FCU's -->

    <arg name="fcu_url" default="/dev/ttyUSB0:57600" />
    <!-- <arg name="fcu_url" default="/dev/ttyACM0:57600" /> -->

    <arg name="gcs_url" default="udp://localhost:14555@localhost:14550" />
    <arg name="tgt_system" default="1" />
    <arg name="tgt_component" default="50" />
    <!-- <arg name="startup_px4_usb_quick" default="true" /> -->

    <include file="$(find mavros)/launch/node.launch">
        <arg name="blacklist_yaml" value="$(find mavros)/launch/px4_radio_blacklist.yaml" />
        <!-- <arg name="blacklist_yaml" value="$(find mavros)/launch/px4_blacklist.yaml" /> -->
        <arg name="config_yaml" value="$(find mavros)/launch/px4_config.yaml" />

        <arg name="fcu_url" value="$(arg fcu_url)" />
        <arg name="gcs_url" value="$(arg gcs_url)" />
        <arg name="tgt_system" value="$(arg tgt_system)" />
        <arg name="tgt_component" value="$(arg tgt_component)" />
    </include>
</launch>
@vooon vooon added the question label Nov 19, 2014
@vooon
Copy link
Member

vooon commented Nov 19, 2014

What FCU Firmware do you use? Pixhawk can run APM or PX4 native stack (todo: add notes to readme).
Note that you can override <arg> value by adding name:=value to roslaunch.

@vooon vooon added the extras label Nov 19, 2014
@mhkabir
Copy link
Member

mhkabir commented Nov 20, 2014

Hi,

PX4 native stack doesn't have RC override support (and with good reason).
APM stack does, and you should be able to get it to work. We don't
recommend it though.
On Nov 20, 2014 2:29 AM, "Vladimir Ermakov" notifications@github.com
wrote:

What FCU Firmware do you use? Pixhawk can run APM or PX4 native stack
(todo: add notes to readme).
Note that you can change value by adding name:=value.


Reply to this email directly or view it on GitHub
#167 (comment).

@bholden1
Copy link
Author

Using the PX4 native stack. Thanks for the help :)

@LorenzMeier
Copy link
Member

@bholden1 To be more clear: There is ongoing work for external attitude set points, which is what you probably want. Please post to the PX4 mailing list to contact developers / users of this:
https://groups.google.com/forum/#!forum/px4users

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

No branches or pull requests

4 participants