Results 1 to 8 of 8

Thread: How do I set up a simulation using the Interbotix Sample?

  1. How do I set up a simulation using the Interbotix Sample?

    This is my first ROS robotics project and I'm trying to understand how to set up the simulator to test my code before I use a physical device. There will be a handful of developers that will want to use this robot, so having a simulation environment set up will be helpful to share the fun.

    What I am unsure of now is figuring out
    - How do I set up the development environment? (Java or python would be preferred)
    - How is this development environment set up to use the simulator to verify the code does what is expected prior to using the real deal

    Here's what I've done so far:
    - Received our PincherX 150 (px150)
    - Installed ROS (on Ubuntu)
    - Built the https://github.com/Interbotix/interbotix_ros_arms
    - Run the moveit sample with gazebo
    roslaunch interbotix_moveit_interface moveit_interface.launch robot_name:=px150 use_gazebo:=true

    And I'm able to see the px150 model in the viewer.



  2. Re: How do I set up a simulation using the Interbotix Sample?

    I found the "Programming Robots with ROS" ( https://wiki.ros.org/Books/Programming_Robots_with_ROS ), which is giving me the foundations of ROS to understand better what's going on.

    However, I'm still having issues creating a python script to interact with the simulator.

    Here's what I've done:
    - launched the simulator
    roslaunch interbotix_moveit_interface moveit_interface.launch robot_name:=px150 use_gazebo:=true
    - updated the CMakeLists.txt to use the JointTrajectory and JointTrajectoryPoint data types
    - created a 'first.py' script


    import rospy

    from trajectory_msgs.msg import JointTrajectory
    from trajectory_msgs.msg import JointTrajectoryPoint

    rospy.init_node('first')

    pub = rospy.Publisher('/px150/arm_controller/command', JointTrajectory, queue_size = 1)

    rate = rospy.Rate(1)

    point = JointTrajectoryPoint
    point.positions = [2.0]
    point.time_from_start = 0
    joint_trajectory = JointTrajectory()
    joint_trajectory.joint_names = ["waist"]
    joint_trajectory.points = [point]

    pub.publish(joint_trajectory)

    When I run this, there is no error output and the simulator doesn't move. I tried changing the 'positions' array to values of 0.0, 1.0, 2.0, 20.0, 200.0 with no change in behavior.

  3. Re: How do I set up a simulation using the Interbotix Sample?

    I've also tried using the 'rqt_gui', but have issues getting the right format for he JointTrajectory object. I've been trying [{"positions"=[20],"time_from_start" = 0}] and similar versions, but I can't seem to get it right


    Any ideas?

    Click image for larger version. 

Name:	Screenshot from 2020-01-16 13-56-51.jpg 
Views:	13 
Size:	30.3 KB 
ID:	7645

  4. Re: How do I set up a simulation using the Interbotix Sample?

    I've also tried the 'rostopic' command, but nothing seems to happen (but I get a message 'publishing and latching message. Press ctrl-C to terminate'. Anyone with a thought of what I may be missing?

    rostopic pub /px150/arm_controller/command trajectory_msgs/JointTrajectory \
    "{\
    'header': {\
    'seq': 0,\
    'stamp': {\
    'secs': 0,\
    'nsecs': 0 },\
    'frame_id': ''},\
    'joint_names': ['wrist'],\
    'points': [{'positions':[2.0], 'time_from_start':{'secs':0, 'nsecs':0}}]\
    }"
    Last edited by not-bob; 4 Weeks Ago at 01:05 PM.

  5. Re: How do I set up a simulation using the Interbotix Sample?


    I was able to make some additional progress by getting the ‘interbotix_moveit_interface’ example working (yay!) https://github.com/Interbotix/interb...veit_interface .

    My next step is to figure out how to do this same thing in python. What resources would help me understand how to do that?




  6. #6
    Join Date
    Jun 2011
    Location
    USA
    Posts
    545
    Images
    107
    Rep Power
    42

    Re: How do I set up a simulation using the Interbotix Sample?

    I don't actually have experience with Interbotix, or with writing my own MoveIt code, but here's one library for python use of MoveIt: https://github.com/mikeferguson/moveit_python. That might help you approach a python equivalent to the interbotix sample.

    From conversations I've had with others in the past, I think there may be newer python wrappers of MoveIt than that, but I can't recall/find them.

  7. Re: How do I set up a simulation using the Interbotix Sample?

    Thanks Gertlex! I appreciate the additional samples!

  8. Re: How do I set up a simulation using the Interbotix Sample?

    I was able to successfully inject some hard-coded positions into the example code (moveit_interface_gui) and have a series of poses execute, which was my initial goal.

    One note for anyone reading this in the future with a similar issue as me, be sure to launch 'moveit_interface.launch' with the 'use_fake:=true' and 'use_cpp_interface:=true' parameters.

    Also, here is a snippet I used to set a single pose

    custom_pose = Pose()
    rospy.loginfo("First Position")
    roll = 0.0
    pitch = 0.05
    yaw = 0.0
    custom_pose.position.x = 0.1
    custom_pose.position.y = 0.0
    custom_pose.position.z = 0.14
    custom_pose.orientation = Quaternion(*quaternion_from_euler(roll, pitch, yaw))
    resp = self.moveit_planner(MoveItPlanRequest.CMD_PLAN_POS ITION, custom_pose)
    rospy.loginfo(resp.msg.data)
    resp = self.moveit_planner(cmd=MoveItPlanRequest.CMD_EXEC UTE)
    rospy.loginfo(resp.msg.data)

Thread Information

Users Browsing this Thread

There are currently 3 users browsing this thread. (0 members and 3 guests)

Similar Threads

  1. Best Software for Simulation of Arm Performance
    By mib07159 in forum Software and Programming
    Replies: 1
    Last Post: 09-09-2018, 12:25 AM
  2. pr2 projet simulation
    By light86 in forum ROS - Robot Operating System
    Replies: 2
    Last Post: 12-01-2012, 12:19 AM
  3. Controlling simulation time (ROS/Gazebo)
    By jks in forum ROS - Robot Operating System
    Replies: 0
    Last Post: 11-28-2011, 10:06 AM
  4. Sample University Proposal
    By Firestorm65 in forum Mech Warfare
    Replies: 10
    Last Post: 02-05-2009, 10:49 AM
  5. Question(s) C# Sample for RoboRealm API?
    By metaform3d in forum Software and Programming
    Replies: 2
    Last Post: 11-23-2008, 05:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •