This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
IP_ADDR = "127.0.0.1" | |
SOCKET_PORT = 5000 | |
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as skt: | |
skt.connect((IP_ADDR, SOCKET_PORT)) | |
while True: | |
usr_ch = input("Send or receive [s/r]? (0 to exit): ") | |
if usr_ch == 's': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
IP_ADDR = "127.0.0.1" | |
SOCKET_PORT = 5000 | |
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as skt: | |
skt.bind((IP_ADDR, SOCKET_PORT)) | |
skt.listen(1) | |
(conn_skt, conn_addr) = skt.accept() | |
with conn_skt: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
# IP address and port of connection | |
IP_ADDR = "127.0.0.1" | |
PORT = 50001 | |
with socket.socket( | |
socket.AF_INET, socket.SOCK_STREAM | |
) as skt: | |
# Connect to the IP_ADDR and PORT (server address) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
# An IP address for communication | |
IP_ADDR = "127.0.0.1" # Internal loop back | |
# Port to connect to | |
PORT_NO = 50001 | |
with socket.socket( | |
socket.AF_INET, socket.SOCK_STREAM | |
) as skt: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ros/ros.h" | |
#include "math.h" | |
#include "ros/time.h" | |
#include "sensor_msgs/JointState.h" | |
int main(int argv, char **argc) { | |
// Initialize node | |
ros::init(argv, argc, "CPP_Joint_State_Controller"); | |
// Node handler | |
ros::NodeHandle nodeHandler; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<robot name="xacro_bot1" xmlns:xacro="http://www.ros.org/wiki/xacro"> | |
<!-- Parameters --> | |
<xacro:property name="a" value="0.2" /> | |
<!-- Links to be added --> | |
<!-- Add a link --> | |
<xacro:macro name="add_link" params="length name parent axis *origin"> | |
<!-- Physical link --> | |
<link name="${name}_link"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<launch> | |
<!-- Arguments --> | |
<arg name="model" default="first_xacro" doc="Model name (name of the XACRO file without extension)" /> | |
<arg name="rviz_config" default="RobotViewer" doc="Name (withoug extension) of RViZ configuration file in 'rviz' folder" /> | |
<arg name="use_gui" default="true" doc="true or false, if you want GUI" /> | |
<!-- Parameters on the ROS parameter server --> | |
<param name="robot_description" command="xacro $(find intro_robot_description)/urdf/$(arg model).xacro" /> | |
<param name="use_gui" value="$(arg use_gui)" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ros/ros.h" | |
#include "std_msgs/Header.h" | |
#include "sensor_msgs/Temperature.h" | |
int main(int argc, char **argv) { | |
// Initialize the ROS node | |
ros::init(argc, argv, "TemperatureSensor", ros::init_options::AnonymousName); | |
// Node handler | |
ros::NodeHandle nodeHandler; | |
// Publisher object |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<launch> | |
<!-- Environment using config --> | |
<env name="ROSCONSOLE_CONFIG_FILE" value="$(find intro_pkg1)/config/rosconsole_cpp.conf" /> | |
<env name="ROS_PYTHON_LOG_CONFIG_FILE" value="$(find intro_pkg1)/config/rosconsole_python.conf" /> | |
<!-- Argument parser made using C++ --> | |
<node name="Debugger1" pkg="intro_pkg1" type="AllLevelDebugger" launch-prefix="gnome-terminal --tab -e "/> | |
<node name="Debugger2" pkg="intro_pkg1" type="DebuggerAll.py" launch-prefix="gnome-terminal --tab -e" /> | |
</launch> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Override the rosconsole logger | |
# output level for this package ONLY | |
log4j.logger.ros.intro_pkg1=DEBUG |