Skip to content

robotStateMsgToRobotState returns success when state message is empty #496

Closed

Description

@jrgnicho

Description

The robotStateMsgToRobotState returns true (success) even when the robot state message is empty.

Your environment

  • ROS Distro: [Kinetic]
  • OS Version: e.g. Ubuntu 16.04
  • Binary build
  • If binary, which release version?

Steps to reproduce

  1. Clone Repo and build
    This issue can be recreated by cloning this repo and buildind the robotMsgToState_issue branch in a catkin worspace.

  2. In a sourced terminal, Run Moveit demo launch file

roslaunch stomp_test_kr210_moveit_config demo.launch
  1. In another sourced terminal, run executable:
rosrun test_planning trajectory_node 

Expected behaviour

The terminal from where the demo.launch file was ran will print the received Start RobotState Message which isn't populated. The issue is that the code gets to that point even though the robotStateMsgToRobotState was called to copy the message into a moveit::core::RobotState.

Actual behaviour

If the robotStateMsgToRobotState function were to work correctly it should return false when it gets and empty RobotState message and the planner code shouldn't be able to reach the point where it prints the message.

Backtrace or Console output

Use gist.github.com to copy-paste the console output or segfault backtrace using gdb.

Activity

  1. davetcoleman commented on May 1, 2017

    @davetcoleman
    Member

    Seems it could use something like if (RobotState.JointState.name.empty()) return false;

  2. v4hn commented on May 8, 2017

    @v4hn
    Contributor

    Maybe planning_scene::PlanningScene::isEmpty(RobotState) instead?
    Either way, MultiDOFJointStates should be respected too.

    The functions ignore is_diff, which makes the state non-empty when set to true.
    I'm not sure where this function is used throughout MoveIt and whether there is some use-case that would break if we add the check, but I'm fine with finding this out through a merged pull-request.
    All translation functions in this file should behave the same with respect to empty input messages though.

  3. davetcoleman commented on Jun 4, 2017

    @davetcoleman
    Member

    This can be closed now, correct?

  4. 130s commented on Jun 5, 2017

    @130s
    Contributor

    This can be closed now, correct?

    I think so, addressed by #499.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions