Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Jesse Haviland edited this pageJan 18, 2021 ·4 revisions

Work in progress (not implemented)

The toolbox can control a real robot through ROS.

User side

The ROS backend is created as usual by

env = rtb.backends.ros()

and the actual driver is created with

# This will launch a ros core, or connect to local roscore, or a remote roscoreenv.launch(core=True, ros_master_uri='http://localhost:11311', ros_ip=192.168.0.1)

whereroscore can be started or the toolbox can use an existing roscore. If roscore is running remotely, the URI and IP can be supplied via arguments to the launch function.

From here we can make our robot object as usual

# Make a Pandapanda = rtb.models.Panda()

and then we must add it to the environment as we would with a different backend

env.add(panda, state_topic, connector, vel_topic)
  • state_topic is the name of a ros topic which is publishing the robot state.
  • connector is a function which takes in the data recieved bystate_topic and stores the relevent robot state information. This needs to happen because we cannot anticipate a universal message structure for all avaliable manipulators.
  • vel_topic is the name of the topic to publish joint velocity commands to.

Behind the scenes

We can haverospy androspkg as dependencies for the toolbox which allows us to use ros methods.

Through multithreading we can create a ros node which can publish velocity commands at a specific rate to the desiredvel_topic.

Through another thread we can have a subscriber which listens tostate_topic and returns useful robot state information.

Issues

How to get updates fromrobot.qd to the publisher?

We can use a Queue and perhaps wrap the setter to send the updatedqd values to the publisher.

Instead use thestep() method to update theqd being sent to the robot.

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp